query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
TODO Autogenerated method stub | public List<NameValuePair> AddtripObject(String vehicle_registration_number,String destination_station,
String vehicle_owner_phone_number,String customer_company_name,
String customer_name,String customer_phone_number,String driver_phone_number)
{
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
try {
nameValuePairs.add(new BasicNameValuePair("vehicle_registration_number",vehicle_registration_number));
nameValuePairs.add(new BasicNameValuePair("destination_station",destination_station));
nameValuePairs.add(new BasicNameValuePair("driver_phone_number",driver_phone_number));
nameValuePairs.add(new BasicNameValuePair("vehicle_owner_phone_number",vehicle_owner_phone_number));
nameValuePairs.add(new BasicNameValuePair("customer_company_name",customer_company_name));
nameValuePairs.add(new BasicNameValuePair("customer_name",customer_name));
nameValuePairs.add(new BasicNameValuePair("customer_phone_number",customer_phone_number));
} catch (Exception e) {
//TODO
e.printStackTrace();
}
return nameValuePairs;
} | {
"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 stores numbers of images of the sprite(frog) | public Image frogImg(int num){
frog = new Image[8];
frog[0] = new Image("file:src/main/resources/Img/froggerUp.png", FrogImgSize, FrogImgSize, true, true);
frog[1] = new Image("file:src/main/resources/Img/froggerLeft.png", FrogImgSize, FrogImgSize, true, true);
frog[2] = new Image("file:src/main/resources/Img/froggerDown.png", FrogImgSize, FrogImgSize, true, true);
frog[3] = new Image("file:src/main/resources/Img/froggerRight.png", FrogImgSize, FrogImgSize, true, true);
frog[4] = new Image("file:src/main/resources/Img/froggerUpJump.png", FrogImgSize, FrogImgSize, true, true);
frog[5] = new Image("file:src/main/resources/Img/froggerLeftJump.png", FrogImgSize, FrogImgSize, true, true);
frog[6] = new Image("file:src/main/resources/Img/froggerDownJump.png", FrogImgSize, FrogImgSize, true, true);
frog[7] = new Image("file:src/main/resources/Img/froggerRightJump.png", FrogImgSize, FrogImgSize, true, true);
return frog[num];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getSpriteArraySize();",
"private void setSpritesCount(int count) {\n this.count = count;\n }",
"public int getimagecounter() {\n\t\treturn imagecounter;\r\n\t}",
"@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\t\tgc.drawImage(image.get(n), x, y);\n\t\tn++;\n\t\tif (n>=15) n=0;\n\t}",
"public int getImageCount() {\n return imageCount;\n }",
"int getBurstNImages();",
"public void nextTextureIndexX() {\n/* 245 */ this.particleTextureIndexX++;\n/* */ }",
"public int getNumberOfImages() { return this.images.size(); }",
"public void run() {\nif(i[0] ==le.size()){\n i[0]=0;}\n File file = new File(\"/var/www/html/PawsAndClaws/web/bundles/uploads/brochures/\" + le.get( i[0]).getBrochure());\n\n Image it = new Image(file.toURI().toString(), 500, 310, false, false);\n eventspicture.setImage(it);\n i[0]++;\n }",
"public Image getImg(){\n\t\treturn imgs[count];\n\t}",
"public int getLength () { return spriteLength; }",
"public int getNoOfImages() {\n return noOfImages;\n }",
"public int getNumberOfImages() {\n\n\t\tshort zdim = getZDim();\n\t\tzdim = zdim > 0 ? zdim : 1;\n\n\t\tshort slices = getNumberOfSlices();\n\t\tslices = slices > 0 ? slices : 1;\n\n\t\tshort intervals = getNumberOfGatedIntervals();\n\t\tintervals = intervals > 0 ? intervals : 1;\n\n\t\treturn zdim * slices * intervals;\n\n\t}",
"public int getCount() {\n return cp.getmImageIds(gridType).length;\n\n }",
"public int getCount() {\n\t\t\treturn this.myImageIds.length;\n\t\t}",
"public int getCount() {\n return imageIDs.length;\n }",
"public void updateSprite() {\n //move to next frame\n if (this.curSpriteFrame == this.framesPerSprite) {\n if (this.spriteNum+1 < this.sprites.get(this.state).length) {\n this.spriteNum++;\n } else {\n this.spriteNum = 0;\n }\n this.curSpriteFrame = 0;\n }\n this.curSpriteFrame++;\n }",
"int imageCount();",
"int getNumberOfTextureCoordinates();",
"int getImgDataCount();",
"public int getPicCount(){\n return picCount;\n }",
"public static void createImages()\n {\n //Do if not done before\n if(!createdImages)\n {\n createdImages = true;\n for(int i=0; i<rightMvt.length; i++)\n {\n rightMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n leftMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n rightMvt[i].scale(rightMvt[i].getWidth()*170/100, rightMvt[i].getHeight()*170/100);\n leftMvt[i].scale(leftMvt[i].getWidth()*170/100, leftMvt[i].getHeight()*170/100);\n }\n for(int i=0; i<leftMvt.length; i++)\n {\n leftMvt[i].mirrorHorizontally();\n }\n for(int i=0; i<upMvt.length; i++)\n {\n upMvt[i] = new GreenfootImage(\"sniperEnemyUp\"+i+\".png\");\n downMvt[i] = new GreenfootImage(\"sniperEnemyDown\"+i+\".png\");\n upMvt[i].scale(upMvt[i].getWidth()*170/100, upMvt[i].getHeight()*170/100);\n downMvt[i].scale(downMvt[i].getWidth()*170/100, downMvt[i].getHeight()*170/100);\n }\n }\n }",
"@Override\n\t\t\tpublic int getCount() {\n\t\t\t\treturn imageId.length;\n\t\t\t}",
"public int getImageNumber() {\n return imageNumber;\n }",
"public int getIconImageNumber(){return iconImageNumber;}",
"int getImagesByHandlerCount();",
"private void initSprites(){\r\n try\r\n {\r\n spriteSheet = ImageIO.read (spriteSheetFile);\r\n }\r\n catch (IOException e)\r\n {\r\n System.out.println(\"SPRITE spritesheet not found\");\r\n } \r\n try\r\n {\r\n iconSheet=ImageIO.read(playerIconFile);\r\n }\r\n catch (IOException e)\r\n {\r\n System.out.println(\"PLAYERICON spritesheet not found\");\r\n } \r\n\r\n // saves images to array\r\n for(int i=0;i<3;i++){\r\n bomb[i]=new BufferedImage(32,32,BufferedImage.TYPE_INT_ARGB); \r\n bomb[i]=spriteSheet.getSubimage(i*32,6,32,32);\r\n }\r\n for(int i=0;i<4;i++){\r\n icons[i] = new BufferedImage(30,30,BufferedImage.TYPE_INT_ARGB);\r\n icons[i] = iconSheet.getSubimage(0, 31*i, 30, 30);\r\n }\r\n }",
"public void keyPressed()\n{\n // If the image counter is smaller than the no of images availabe.\n if(imageCounter < noOfImages)\n {\n // If left arrow key is pressed and image counter is greater than 1\n if (keyCode == LEFT && imageCounter > 1) \n // decrease counter to show previous image.\n imageCounter--;\n else\n // increase counter to show previous image.\n imageCounter++;\n \n // Load both normal and COSFIRE image\n if (imageCounter<10)\n {\n normal_img = loadImage(originals+\"symbol00\"+imageCounter+\".jpg\");\n }\n else\n {\n normal_img = loadImage(originals+\"symbol0\"+imageCounter+\".jpg\");\n }\n\n \n \n cosfire_img = loadImage(path+\"symbol\"+imageCounter+\"_COSFIRE.jpg\"); \n cosfire_img2 = loadImage(path2+\"symbol\"+imageCounter+\"_COSFIRE.jpg\"); \n }\n else\n {\n // Reset image counter to 1 when it reaches the maximum number of symbols.\n imageCounter=1;\n }\n}",
"public BufferedImage[] powerSprite(){\n\t\tBufferedImage arr[] = new BufferedImage[4];\n\t\tarr[0] = img.getSubimage(724, 283, 71, 67);\n\t\tarr[1] = img.getSubimage(650, 286, 72, 64);\n\t\tarr[2] = img.getSubimage(484, 292, 83, 58);\n\t\tarr[3] = img.getSubimage(257, 281, 71, 69);\n\t\treturn arr;\n\t\t\t\n\t}",
"int getExpoBracketingNImagesPref();",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn mImageIds.length;\n\t\t}",
"public int getTextureCount()\n\t{\n\t\treturn textures.length;\n\t}",
"public int getCount() {\r\n\t\t\treturn ((HerdinatorApplication) getApplication()).imageIDs.length;\r\n\t\t}",
"int getImagesByTransformCount();",
"@Override\n\t\tpublic int getCount()\n\t\t{\n\t\t\treturn imageIds.length;\n\t\t}",
"protected int getImageIndex() {\n/* 216 */ return this.mlibImageIndex;\n/* */ }",
"public int getNumberOfPictures()\r\n {\r\n return pictures.size();\r\n }",
"private void drawImages() {\n\t\t\r\n\t}",
"public void picLoader() {\n if (num==0){\n image.setImageResource(R.drawable.mario);\n }\n if(num==1){\n image.setImageResource(R.drawable.luigi);\n }\n if(num==2){\n image.setImageResource(R.drawable.peach);\n }\n if(num==3){\n image.setImageResource(R.drawable.rosalina);\n }\n }",
"public int getCount() {\n return mImages.length;\n }",
"private void populateFromSprite() {\n long start = System.currentTimeMillis();\n int bitSetIndex = 0;\n BufferedImage bImage = (BufferedImage) sprite.m_image;\n //BufferedImage img = ImageIO.read(new File(\"assets/LoopBitmap.bmp\"));\n int color;\n // Loop through image according to scale\n for(int i = 0; i < sprite.getWidth(); i+=scale) {\n for(int j = 0; j < sprite.getHeight(); j+= scale) {\n // Get color at pixel i, j, if black set Bitmap index to true.\n color = bImage.getRGB(i, j);\n if(color == Color.BLACK.getRGB()) { //tempColor.equals(Color.black)) {\n this.set(bitSetIndex, true);\n //System.out.println(\"'BLACK' Color = \"+color + \" i=\"+ i + \", j=\"+j);\n }\n bitSetIndex++;\n }\n }\n long end = System.currentTimeMillis();\n// System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n// System.out.println(\"BITMAP DONE :)\");\n// System.out.println(\"Time to build = \"+(end-start)+\"ms\");\n// System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n }",
"public int getTotalNumberOfSprites() {\n return this.getRows() * this.getColumns();\n }",
"public int getImageCount() {\n return this.imageViews.length;\n }",
"public int getSpriteID() {\n return spriteID;\n }",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn mImagePaths.size();\n\t\t}",
"@Override\n \tpublic Object[] getImageArray() {\n \t\t// Release 3 times an RGB stack with this dimensions.\n \t\tlayers.get(0).getProject().getLoader().releaseToFit((long)(getSize() * getWidth() * getHeight() * 4 * 3));\n \t\tfinal Object[] ia = new Object[getSize()];\n \t\tfor (int i=0; i<ia.length; i++) {\n \t\t\tia[i] = getProcessor(i+1).getPixels(); // slices 1<=slice<=n_slices\n \t\t}\n \t\treturn ia;\n \t}",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn imgs.length;\n\t\t}",
"public synchronized static void initialiseImages() \n {\n if (images == null) {\n GreenfootImage baseImage = new GreenfootImage(\"explosion-big.png\");\n int maxSize = baseImage.getWidth()/3;\n int delta = maxSize / IMAGE_COUNT;\n int size = 0;\n images = new GreenfootImage[IMAGE_COUNT];\n for (int i=0; i < IMAGE_COUNT; i++) {\n size = size + delta;\n images[i] = new GreenfootImage(baseImage);\n images[i].scale(size, size);\n }\n }\n }",
"public void findImages() {\n URL imgURL = ImageLoader.class.getResource(\"/BackgroundMenu.jpg\");\n this.backgroundImages.put(MenuP.TITLE, loadImage(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/backgroundGame.png\");\n this.backgroundImages.put(ArenaView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/gameOver.jpg\");\n this.backgroundImages.put(GameOverView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Player.png\");\n this.entityImages.put(ID.PLAYER, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Enemy1.png\");\n this.entityImages.put(ID.BASIC_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/boss.png\");\n this.entityImages.put(ID.BOSS_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/meteorBrown_big1.png\");\n this.entityImages.put(ID.METEOR, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/BlueBullet.png\");\n this.bulletImages.put(new Pair<>(ID.PLAYER_BULLET, ID.PLAYER), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/redBullet.png\");\n this.entityImages.put(ID.ENEMY_BULLET, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_FireBoost.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Freeze.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL)); \n \n imgURL = ImageLoader.class.getResource(\"/powerup_Health.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.HEALTH), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Shield.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.SHIELD), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/bulletSpeedUp.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadEffect(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Explosion.png\");\n this.AnimationsEffect.put(new Pair<>(ID.EFFECT, SpecialEffectT.EXPLOSION), loadEffect(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/freeze.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL));\n }",
"public int getLengthImages() {\r\n\t\treturn imageList.size();\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}",
"int getMaxRawImages();",
"private int calculateImagesNotFound() {\n int imagesNotFound = 0;\n for (int count : countImagesNotFound) {\n imagesNotFound += count;\n }\n\n return imagesNotFound;\n }",
"public void updateViewCnt(Integer imgnum) throws Exception;",
"ArrayList<Sprite> getSpriteArray();",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }",
"private void aumentarPilha() {\n this.pilhaMovimentos++;\n }",
"public void createImages(){\n for(String s : allPlayerMoves){\n String a = \"Left\";\n for(int i = 0; i < 2; i++) {\n ArrayList<Image> tempImg = new ArrayList();\n boolean done = false;\n int j = 1;\n while(!done){\n try{\n tempImg.add(ImageIO.read(new File(pathToImageFolder+s+a+j+\".png\")));\n j++;\n } catch (IOException ex) {\n done = true;\n }\n }\n String temp = s.replace(\"/\",\"\") + a;\n playerImages.put(temp, tempImg);\n a = \"Right\";\n }\n }\n imagesCreated = true;\n }",
"public Money (Bitmap res,int w, int h){\n\n x = 100;\n y = 100;\n dx = 30;\n spritesheet = res;\n height = h;\n width = w;\n row = 0;\n for (int i = 0; i < numbers; i++){\n imageMoney[i] = Bitmap.createBitmap(res, i*32 ,0,32,64);\n\n }\n\n randomize();\n\n\n //setBitmap(GamePanel.getArray().get(0),GamePanel.getArray().get(1));\n //name = \"King\";\n //spritesheet = BitmapFactory.decodeResource(getResources(), R.drawable.diamond);\n //y = GamePanel.HEIGHT;\n\n //number1 =res1;\n //number2 = res2;\n //startTime = System.nanoTime();\n }",
"@Override\n\tpublic void loadStateImages() {\n\t\tif (imageFilename[0][0] != null)\n\t\t\tthis.addStateImage(imageFilename[0][0], 0, 0);\n\t\tif (imageFilename[0][1] != null)\n\t\t\tthis.addStateImage(imageFilename[0][1], 1, 0);\n\t\tif (imageFilename[1][0] != null)\n\t\t\tthis.addStateImage(imageFilename[1][0], 0, 1);\n\t\tif (imageFilename[1][1] != null)\n\t\t\tthis.addStateImage(imageFilename[1][1], 1, 1);\n\t}",
"public void loadImage() {\r\n // creates a new image icon with the characters array and the count as a file path\r\n ImageIcon ii = new ImageIcon(game.characters[count]);\r\n // load the image\r\n image = ii.getImage(); \r\n \r\n // sets width\r\n w = image.getWidth(null);\r\n // sets height\r\n h = image.getHeight(null);\r\n }",
"public int getImagesByHandlerCount() {\n return imagesByHandler_.size();\n }",
"@Override\n\tpublic int getCount() {\n\t\treturn mImageIds.length;\n\t}",
"public HashMap<String, BufferedImage> getSprites() {\n \t\treturn sprites;\n \t}",
"public void setStartingImages() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn MainActivity.pictures.length;\r\n\t\t}",
"public Image getBulletImg(){ \n return SpriteSheet.playerProjectileSprites[this.frameNumber]; \n }",
"@Basic @Immutable\n\tpublic Sprite[] getImages() {\n\t\treturn this.images;\n\t}",
"public void setNoOfImages(int noOfImages) {\n this.noOfImages = noOfImages;\n }",
"public static int getCount()\n\t{\n\t\treturn projectileCount;\n\t}",
"private void generate() {\n preGenerate();\n\n SpriteGrid grid = new SpriteGrid(specState);\n IOHelper.pixelsToBitmap(grid.draw(), sprite);\n\n }",
"@Override\n\tpublic int getCount() {\n\t\treturn mImageId.length;\n\t}",
"public int getTexCoordCount()\n\t{\n\t\treturn texCoordCount;\n\t}",
"public int getImage();",
"@Override\n\tpublic int getCount() \n\t{\n\t\treturn mImageIds.size();\n\t}",
"private void addAllDrawables() {\n \t\n \tfor (int i = 0; i < 10; i++) {\n \t\tint res_id = c.getResources().getIdentifier(\"puzzle_\"+i, \"drawable\", c.getPackageName());\n \t\t\n \t\tif (res_id != 0) {\n \t\t\timage_id_array.add(res_id);\n \t\t}\n \t}\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 }",
"public Image sprite(){\n\t\treturn (face);\n\t}",
"public int getNumGraphics() {\r\n\t\treturn graphics.size();\r\n\t}",
"public void resetSprites() {\n\t\tSPRITE_LIST.clear();\n\t}",
"public void render(SpriteBatch batch, Vector2 relPos) {\n batch.begin();\n for (int i = 0; i < ((3 * Gdx.graphics.getHeight()) / this.img.getHeight()); i++) {\n batch.draw(this.img,\n (this.pos.x - this.size.x / 2),\n (this.pos.y - relPos.y) % this.img.getHeight() + (i * this.img.getHeight()));\n }\n batch.end();\n }",
"public Image getSix();",
"private void addImgList() {\n\t\tdogImg.add(\"./data/img/labrador.jpg\");\t\t\t\t\n\t\tdogImg.add(\"./data/img/germanshepherd.jpg\");\t\n\t\tdogImg.add(\"./data/img/bulldog.jpg\");\t\t\t\t\t\t\t\t\n\t\tdogImg.add(\"./data/img/rottweiler.jpg\");\n\t\tdogImg.add(\"./data/img/husky.jpg\");\n\n\t}",
"private void setNumbers() {\n\t\tint w = worldWidth;\n\t\tint h = worldHeight;\n\t\tfor (int x = 0; x <= w - 1; x++) {\n\t\t\tfor (int y = 0; y <= h - 1; y++) {\n\t\t\t\tint numbers = 0;\n\n\t\t\t\tint right = x + 1;\n\t\t\t\tint left = x - 1;\n\t\t\t\tint up = y - 1;\n\t\t\t\tint down = y + 1;\n\n\t\t\t\tif (left < 0) {\n\t\t\t\t\tleft = 0;\n\t\t\t\t}\n\t\t\t\tif (up < 0) {\n\t\t\t\t\tup = 0;\n\t\t\t\t}\n\t\t\t\tif (down >= h) {\n\t\t\t\t\tdown = h - 1;\n\t\t\t\t}\n\t\t\t\tif (right >= w) {\n\t\t\t\t\tright = w - 1;\n\t\t\t\t}\n\n\t\t\t\tfor (int m = left; m <= right; m++) {\n\t\t\t\t\tfor (int n = up; n <= down; n++) {\n\t\t\t\t\t\tif (!(m == x && n == y)) {\n\t\t\t\t\t\t\tif (tileArr[m][n].hasBomb()) {\n\t\t\t\t\t\t\t\tnumbers++;\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\ttileArr[x][y].setNeighbors(numbers);\n\t\t\t}\n\n\t\t}\n\n\t}",
"public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}",
"@Override\n public int getCount() {\n return imageIDs.length;\n }",
"private void fillImageMap() {\n Image shipImage;\n try {\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat.png\"));\n imageMap.put(ShipType.PATROL_BOAT, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat_sunken.png\"));\n imageMap.put(ShipType.PATROL_BOAT_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL_SUNKEN, shipImage);\n } catch(IOException e) {\n e.printStackTrace();\n }\n }",
"private void ini_Sprites()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_Sprites\");\r\n\t\tResourceCache.LoadSprites(false);\r\n\t}",
"public static void incrementCountNotImage(int actual) {\n ++countImagesNotFound[actual];\n }",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn images.size();\n\t\t}",
"@Override\n\tpublic int getCount() {\n\t\treturn IMAGES.length;\n\t}",
"public void updateImage() {\n Graphics2D g = img.createGraphics();\n for (Circle gene : genes) {\n gene.paint(g);\n }\n g.dispose();\n }",
"public int getSpriteWidth() {\n return this.spriteWidth;\n }",
"@Override\n public void onAdd() {\n onRemove();\n \n // Generate a list of renderable images\n MapChunk[] chunks = generateChunks(generate());\n \n // Ensure the list is valid\n if(chunks == null) {\n return;\n }\n \n // Move the textures onto Rectangle shapes\n int chunkWidth = getChunkWidth();\n int chunkHeight = getChunkHeight();\n \n int rows = getHeightInChunks();\n int cols = getWidthInChunks();\n \n // Init our storage\n mTextures = new Texture[ rows * cols ];\n mShapes = new RectangleShape[ rows * cols ];\n \n // Iterate the whole map in chunks\n for(int x = 0; x < cols; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Get the chunk for this position\n MapChunk thisChunk = chunks[ (y * cols) + x ];\n \n if(thisChunk == null) {\n // Something went wrong. Undo.\n onRemove();\n return;\n }\n \n // Convert our image into a texture\n Texture t = new Texture();\n if(t == null || !t.loadFromImage(thisChunk.image)) {\n onRemove();\n return;\n }\n \n // Store the texture for removal later on\n mTextures[ (y * cols) + x ] = t;\n \n // Create a rectangle shape\n RectangleShape r = new RectangleShape( chunkWidth, chunkHeight );\n \n // Apply some settings\n r.setTexture(t);\n r.setPosition( x * chunkWidth, y * chunkHeight );\n \n // Add this shape to the renderer\n if(mRenderer.add(r) < 0) {\n onRemove();\n return;\n }\n \n // Store the shape\n mShapes[ (y * cols) + x ] = r;\n \n }\n }\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 }",
"public int getNumberOfPhotos(){\n\t\tint num = 0;\n\t\ttry {\n\t\t\tFileInputStream in = new FileInputStream(\"images\");\n\t\t\t//Skipping magic number\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tin.read();\n\t\t\t}\n\t\t\tbyte[] tmpVar = new byte[4];\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\ttmpVar[i] = (byte) in.read();\n\t\t\t}\n\t\t\tnum = ByteBuffer.wrap(tmpVar).getInt();\n\t\t\tin.close();\n\t\t}catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn num;\n\t\t\n\t}",
"private void createCircleImages(){\n offScreenCircles = new Image[8];\n try {\n offScreenCircles[0] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleDown.png\"));\n offScreenCircles[1] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeftDown.png\"));\n offScreenCircles[2] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeft.png\"));\n offScreenCircles[3] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeftUp.png\"));\n offScreenCircles[4] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleUp.png\"));\n offScreenCircles[5] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRightUp.png\"));\n offScreenCircles[6] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRight.png\"));\n offScreenCircles[7] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRightDown.png\"));\n } catch (IOException ex) {\n System.out.println(\"Bild konnte nicht geladen werden!\");\n }\n activeOffScreenCircle = offScreenCircles[0];\n }",
"public int pixelCount()\n {\n int pixelCount = cat.getWidth() * cat.getHeight();\n return pixelCount;\n\n }",
"private static void loadSprites(){\n \t\tshipSprites.put(\"SCOUT_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/scout.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"HUNTER_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/hunter.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"DESTROYER_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/destroyer.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"COLONIZER_BLUE\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/blue/colonizer.png\"), 0.5f, 0.5f));\n \t\t\n \t\t/*\n \t\t * Ships Red Player\n \t\t */\n \t\tshipSprites.put(\"SCOUT_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/scout.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"HUNTER_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/hunter.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"DESTROYER_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/destroyer.png\"), 0, 0.5f));\n \t\tshipSprites.put(\"COLONIZER_RED\", new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/red/colonizer.png\"), 0.5f, 0.5f));\n \n \t\t/*\n \t\t * Path Arrows\n \t\t */\n\t\tpathTextures.put(\"HEAD\", Toolkit.getDefaultToolkit().getImage(\"res/path/head.png\"));\n\t\tpathTextures.put(\"START\", Toolkit.getDefaultToolkit().getImage(\"res/path/start.png\"));\n\t\tpathTextures.put(\"STRAIGHT\", Toolkit.getDefaultToolkit().getImage(\"res/path/straight.png\"));\n\t\tpathTextures.put(\"TURN\", Toolkit.getDefaultToolkit().getImage(\"res/path/turn.png\"));\n \t\t\n \t\t/*\n \t\t * Planets\n \t\t */\n \t\tmetalplanets.put(0, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_0.png\"), 0.5f, 0));\n \t\tmetalplanets.put(1, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_1.png\"), 0.5f, 0));\n \t\tmetalplanets.put(2, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_2.png\"), 0.5f, 0));\n \t\tmetalplanets.put(3, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/metalplanet_3.png\"), 0.5f, 0));\n \t\tgasplanets.put(0, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/gasplanet_0.png\"), 0.5f, 0));\n \t\tgasplanets.put(1, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/gasplanet_1.png\"), 0.5f, 0));\n \t\tgasplanets.put(2, new Sprite(Toolkit.getDefaultToolkit().getImage(\"res/icons/planets/gasplanet_2.png\"), 0.5f, 0));\n \t\t\n \t\t/*\n \t\t * Colony Sprite\n \t\t */\n \t\tloadColonySprites(Color.RED, \"RED\");\n \t\tloadColonySprites(Color.BLUE, \"BLUE\");\n \t}",
"@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}"
] | [
"0.7021473",
"0.67985064",
"0.66510284",
"0.6413966",
"0.64049214",
"0.6352883",
"0.63261104",
"0.63066465",
"0.6297193",
"0.6289773",
"0.6276759",
"0.62702286",
"0.6264539",
"0.6237135",
"0.62326604",
"0.6219452",
"0.618622",
"0.61841255",
"0.6155936",
"0.6149659",
"0.6142111",
"0.61389333",
"0.61327195",
"0.6125531",
"0.61116004",
"0.61114925",
"0.60916454",
"0.60650724",
"0.605661",
"0.6038672",
"0.6024505",
"0.6022312",
"0.60108954",
"0.60052127",
"0.5998237",
"0.59807247",
"0.5962695",
"0.5951383",
"0.59405196",
"0.59051883",
"0.59041727",
"0.58986205",
"0.58734",
"0.58616775",
"0.5838692",
"0.5823815",
"0.58222747",
"0.5818999",
"0.58177894",
"0.5800634",
"0.5797331",
"0.5793537",
"0.5780413",
"0.5764733",
"0.57623416",
"0.5755963",
"0.5730329",
"0.5722454",
"0.57181025",
"0.57159686",
"0.5712895",
"0.5712738",
"0.57073605",
"0.57018644",
"0.5695347",
"0.56893915",
"0.56833434",
"0.56737745",
"0.5661461",
"0.566102",
"0.56559485",
"0.5647281",
"0.5639009",
"0.5635104",
"0.5620349",
"0.56174797",
"0.5592209",
"0.5586964",
"0.55802935",
"0.5576392",
"0.55656856",
"0.555429",
"0.5553725",
"0.5532227",
"0.5514991",
"0.5513073",
"0.55126333",
"0.54975486",
"0.54932904",
"0.54926443",
"0.54862374",
"0.5485812",
"0.5485555",
"0.5485327",
"0.547648",
"0.5475791",
"0.5471268",
"0.546337",
"0.5462439",
"0.5458465"
] | 0.6044924 | 29 |
This method allows player to control the sprite with keyboard Mainly keys W,A,S,D | public void keyListener() {
setOnKeyPressed(event -> {
if(death) {}
else {
if (event.getCode() == KeyCode.W || event.getCode() == KeyCode.UP)
{
move(0, -movementY);
setImage(frogImg(4));
addPoints(10);
}
if (event.getCode() == KeyCode.A || event.getCode() == KeyCode.LEFT)
{
move(-movementX, 0);
setImage(frogImg(5));
}
if (event.getCode() == KeyCode.S || event.getCode() == KeyCode.DOWN)
{
move(0, movementY);
setImage(frogImg(6));
addPoints(-10);
}
if (event.getCode() == KeyCode.D || event.getCode() == KeyCode.RIGHT)
{
move(movementX, 0);
setImage(frogImg(7));
}
}
});
setOnKeyReleased(event -> {
if (death) {}
else {
if (event.getCode() == KeyCode.W || event.getCode() == KeyCode.UP) {
addPoints(10);
setImage(frogImg(0));
move(0, -movementY);
}
if (event.getCode() == KeyCode.A || event.getCode() == KeyCode.LEFT) {
move(-movementX, 0);
setImage(frogImg(1));
}
if (event.getCode() == KeyCode.S || event.getCode() == KeyCode.DOWN) {
move(0, movementY);
setImage(frogImg(2));
addPoints(-10);
}
if (event.getCode() == KeyCode.D || event.getCode() == KeyCode.RIGHT) {
move(movementX, 0);
setImage(frogImg(3));
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tplayer.right = true; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tplayer.left = true; \n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_Z) {\n\t\t\tplayer.shoot = true;\n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\tplayer.up = true; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tplayer.down = true; \n\t\t}\n}",
"@SuppressWarnings(\"serial\")\n private void enableGamePlayKeys() {\n if (CLASSIC_MODE.equals(myGameMode)) {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), \"left\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), \"right\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), \"down\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), \"rotateCW\");\n }\n else {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), \"left\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), \"right\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), \"down\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), \"rotateCW\");\n }\n\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), \"drop\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_P, 0), \"pause\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Z, 0), \"rotateCCW\");\n\n getActionMap().put(\"left\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.left();\n }\n });\n\n getActionMap().put(\"right\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.right();\n }\n });\n\n getActionMap().put(\"down\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.down();\n }\n });\n\n getActionMap().put(\"rotateCW\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.rotateCW();\n }\n });\n\n getActionMap().put(\"rotateCCW\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.rotateCCW();\n }\n });\n\n getActionMap().put(\"right\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.right();\n }\n });\n\n getActionMap().put(\"drop\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n myBoard.drop();\n }\n });\n\n getActionMap().put(\"pause\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n if (myTimer.isRunning()) {\n pauseTimer();\n } else {\n startTimer();\n }\n }\n });\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\n\t\t\n\t\t\n\t\tif(e.getKeyCode()== KeyEvent.VK_W||e.getKeyCode()==KeyEvent.VK_UP){\n\t\t\t\n\t\t\t\n\t\t\tif(Player.playery>0){\n\t\t\t\tup=true;\n\t\t\t\tif(Obstacles.movementCheck(Player.playerx, (Player.playery-1))){\n\t\t\t\t\tPlayer.playery-=1;\n\t\t\t\t}\n\t\t\t\tup=false;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(Player.playery==0){\n\t\t\tMap.mapChange(\"w\");\n\t\t\t}\n\t\t}\n\n\t\telse if(e.getKeyCode()==KeyEvent.VK_S||e.getKeyCode()==KeyEvent.VK_DOWN){\n\t\t\t\n\t\t\tif(Player.playery<7){\n\t\t\t\tdown=true;\n\t\t\t\tif(Obstacles.movementCheck(Player.playerx, (Player.playery+1))){\n\t\t\t\t\tPlayer.playery+=1;\n\t\t\t\t}\n\t\t\t\n\t\t\tdown=false;\n\t\t\t}\n\t\t\telse if(Player.playery==7){\n\t\t\t\tMap.mapChange(\"s\");\t\t\t\n\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if(e.getKeyCode()==KeyEvent.VK_A||e.getKeyCode()==KeyEvent.VK_LEFT){\n\t\t\t\tif(Player.playerx>0){\n\t\t\t\tleft=true;\n\t\t\t\tif(Obstacles.movementCheck((Player.playerx-1), Player.playery)){\n\t\t\t\n\t\t\tPlayer.playerx-=1;\n\t\t\t}\t\n\t\t\t\tleft=false;\n\t\t\t\t}\n\t\t\t\telse if(Player.playerx==0){\n\t\t\t\tMap.mapChange(\"a\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\t\telse if(e.getKeyCode()==KeyEvent.VK_D||e.getKeyCode()==KeyEvent.VK_RIGHT){\n\t\t\t\tif(Player.playerx<15){\n\t\t\t\tright=true;\n\t\t\t\tif(Obstacles.movementCheck((Player.playerx+1), Player.playery)){\n\t\t\t\tPlayer.playerx+=1;\n\t\t\t\t}\n\t\t\t\tright=false;\n\t\t\t\t}\n\t\t\t\telse if(Player.playerx==15){\n\t\t\t\t\tMap.mapChange(\"D\");\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\telse if(e.getKeyCode()==KeyEvent.VK_SPACE){\n\t\t\t\tObstacles.itemCheck();\n\t\t\t\tObstacles.checkDialogue();\n\t\t\t}\n\t\t\telse if(e.getKeyCode()==KeyEvent.VK_I){\n\t\t\t\tif(I){\n\t\t\t\t\tGui.inventory(I);\n\t\t\t\t\tI=false;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tGui.inventory(!I);\n\t\t\t\tI=true; \n\t\t\t\t}\n\t\t\t}\n\t\tPlayer.playerRepaint();\n\t\t\t\n\t\t\n\t}",
"@Override\n public void keyUp(KeyEvent e){\n super.keyUp(e);\n// if(e.getKeyCode() == KeyEvent.VK_S)\n// spawnControl.spawnNow();\n// if(e.getKeyCode() == KeyEvent.VK_D)\n// player.sleep();\n// if(e.getKeyCode() == KeyEvent.VK_E)\n// player.invincibility();\n// if(e.getKeyCode() == KeyEvent.VK_F)\n// player.fast();\n }",
"@Override\r\n public void keyPressed(KeyEvent e) {\n if (e.getKeyCode() == 87) {\r\n player.move(0,-1, border);\r\n }\r\n //down\r\n if (e.getKeyCode() == 83) {\r\n player.move(0,1, border);\r\n }\r\n //left\r\n if (e.getKeyCode() == 65) {\r\n player.move(-1,0, border);\r\n }\r\n //right\r\n if (e.getKeyCode() == 68) {\r\n player.move(1,0, border);\r\n }\r\n System.out.printf(\"\\nKeyCode: %d was pressed\",e.getKeyCode());\r\n }",
"private void handleInput(){\n if(\"W\".charCodeAt(0) in this.keypressed) {\n this.player1SpeedY = this.playerSpeed * -1;\n } else if (\"S\".charCodeAt(0) in this.keypressed){\n this.player1SpeedY = this.playerSpeed;\n } else {\n this.player1SpeedY = 0;\n }\n // player 2 (on the right) uses 'I' to move up and 'K' to move down\n if(\"I\".charCodeAt(0) in this.keypressed) {\n this.player2SpeedY = this.playerSpeed * -1;\n } else if (\"K\".charCodeAt(0) in this.keypressed){\n this.player2SpeedY = this.playerSpeed;\n } else {\n this.player2SpeedY = 0;\n }\n }",
"public void key()\r\n {\n int leftChange=-60;//choose the appropriate left step size ; \r\n int rightChange=60;//choose the appropriate right step size ; \r\n int upChange=-60;//choose the appropriate up step size ; \r\n int downChange=60;//choose the appropriate down step size ; \r\n if (Greenfoot.isKeyDown(\"left\"))\r\n {\r\n if (canMove(leftChange, 0)==true){\r\n setLocation(getX()+leftChange, getY()) ;}\r\n Greenfoot.playSound(\"move.wav\"); //(Sound-Ideas,2014)\r\n }\r\n if (Greenfoot.isKeyDown(\"right\"))\r\n {\r\n if (canMove(rightChange, 0)==true){\r\n setLocation(getX()+rightChange, getY()) ;}\r\n Greenfoot.playSound(\"move.wav\"); //(Sound-Ideas,2014)\r\n }\r\n if (Greenfoot.isKeyDown(\"up\"))\r\n {\r\n if (canMove(0, upChange)==true){\r\n setLocation(getX(), getY()+upChange) ;}\r\n }\r\n if (Greenfoot.isKeyDown(\"down\"))\r\n {\r\n if (canMove(0, downChange)==true){\r\n setLocation(getX(), getY()+downChange) ;}\r\n }\r\n }",
"void keyPressed() {\n if (key == 'w') {\n up = true;\n }\n if (key == 's') {\n down = true;\n }\n if (key == 'a') {\n left = true;\n\n }\n if (key == 'd') {\n right = true;\n\n }\n \n if (key == 27) {\n pause = !pause;\n }\n\n // player.turnToDir(0);\n}",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t// Key Press Left\n\t\tif (e.getKeyCode() == KeyEvent.VK_LEFT && (player.getImage().getX() - 1 >= 0)) {\n\t\t\tisMovingLeft = true;\n\t\t\tplayer.getImage().setImage(\"LeftShipStationary.png\");\n\t\t\tplayer.move(-1, 0);\n\t\t}\n\t\t// Key Press Right\n\t\tif (e.getKeyCode() == KeyEvent.VK_RIGHT\n\t\t\t\t&& ((player.getImage().getX() + player.getImage().getWidth()) + 1 <= MainApplication.WINDOW_WIDTH)) {\n\t\t\tisMovingLeft = false;\n\t\t\tplayer.getImage().setImage(\"FrontShipStationary.png\");\n\t\t\tplayer.move(1, 0);\n\t\t}\n\t\t// Key Press Up\n\t\tif (e.getKeyCode() == KeyEvent.VK_UP\n\t\t\t\t&& (player.getImage().getY() - 1 >= (topMatte.getY() + topMatte.getHeight()))) {\n\t\t\tif (isMovingLeft) {\n\t\t\t\tplayer.getImage().setImage(\"leftfacing_movingup.png\");\n\t\t\t} else {\n\t\t\t\tplayer.getImage().setImage(\"frontfacing_movingup.png\");\n\t\t\t}\n\t\t\tplayer.move(0, -1);\n\n\t\t}\n\t\t// Key Press Down\n\t\tif (e.getKeyCode() == KeyEvent.VK_DOWN && ((player.getImage().getY() + player.getImage().getHeight())\n\t\t\t\t+ 1 <= (MainApplication.WINDOW_HEIGHT - (MainApplication.WINDOW_HEIGHT / ASPECT_RATIO)))) {\n\t\t\tif (isMovingLeft) {\n\t\t\t\tplayer.getImage().setImage(\"leftfacing_movingdown.png\");\n\t\t\t} else {\n\t\t\t\tplayer.getImage().setImage(\"frontfacing_movingdown.png\");\n\t\t\t}\n\t\t\tplayer.move(0, 1);\n\t\t}\n\t}",
"@Override\r\n public void keyPressed(KeyEvent e)\r\n {\r\n if (mode == 0){\r\n mode = 1; //starts the game\r\n }\r\n\r\n if(e.getKeyChar() == 'w')\r\n {\r\n buttons[0][0] = true;\r\n }\r\n if(e.getKeyChar() == 'a')\r\n {\r\n buttons[0][1] = true;\r\n }\r\n if(e.getKeyChar() == 's')\r\n {\r\n buttons[0][2] = true;\r\n }\r\n if(e.getKeyChar() == 'd')\r\n {\r\n buttons[0][3] = true;\r\n }\r\n if(e.getKeyChar() == 'f')\r\n {\r\n buttons[0][4] = true;\r\n }\r\n if(e.getKeyChar() == 'g')\r\n {\r\n buttons[0][5] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_UP)\r\n {\r\n buttons[1][0] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_LEFT)\r\n {\r\n buttons[1][1] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_DOWN)\r\n {\r\n buttons[1][2] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_RIGHT)\r\n {\r\n buttons[1][3] = true;\r\n }\r\n if(e.getKeyChar() == '.')\r\n {\r\n buttons[1][4] = true;\r\n }\r\n if(e.getKeyChar() == '/')\r\n {\r\n buttons[1][5] = true;\r\n }\r\n }",
"@Override\r\n public void keyPressed(KeyEvent e)\r\n {\r\n\tif (e.getKeyCode() == KeyEvent.VK_P)\r\n\t{\r\n\t _paused = !_paused;\r\n\t SoundLibrary.getInstance().play(SOUND_PAUSE);\r\n\t}\r\n\tif (_paused)\r\n\t return;\r\n\tswitch (e.getKeyCode())\r\n\t{\r\n\tcase KeyEvent.VK_RIGHT:\r\n\t _level.getMario().moveRight();\r\n\t break;\r\n\tcase KeyEvent.VK_LEFT:\r\n\t _level.getMario().moveLeft();\r\n\t break;\r\n\tcase KeyEvent.VK_UP:\r\n\t _level.getMario().jump(true);\r\n\t break;\r\n\tcase KeyEvent.VK_DOWN:\r\n\t _level.getMario().doSpecial();\r\n\t break;\r\n\tcase KeyEvent.VK_R:\r\n\t _level.resetMario();\r\n\t break;\r\n\t}\r\n }",
"private void checkKeys()\n {\n if (Greenfoot.isKeyDown(\"d\") )\n {\n /*\n * \n *setImage(\"Plyr1_Right.png\");\n *moveRight();\n */\n moveRight();\n turn(30);\n setRotation(30);\n }\n else if (Greenfoot.isKeyDown(\"a\") )\n {\n //setImage(\"Plyr1_Left.png\");\n moveLeft();\n turn(-30);\n setRotation(-30);\n \n }\n else\n {\n turn(0);\n setRotation(0);\n Greenfoot.playSound(\"engine_4.wav\");\n }\n if (Greenfoot.isKeyDown(\"w\") )\n {\n moveUp();\n }\n if (Greenfoot.isKeyDown(\"s\") )\n {\n //moveDown();\n }\n {\n if(isTouching(TestProblem.class))\n {\n Greenfoot.stop();\n }\n }\n}",
"@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\tif(game.playerType == C.SERVER){\r\n\t\t\tint k = arg0.getKeyCode();\r\n\t\t\tswitch(k){\r\n\t\t\tcase KeyEvent.VK_UP: \r\n\t\t\t\tgame.direction1=(C.UP);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_RIGHT: \r\n\t\t\t\tgame.direction1=(C.RIGHT);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_DOWN: \r\n\t\t\t\tgame.direction1=(C.DOWN);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_LEFT: \r\n\t\t\t\tgame.direction1=(C.LEFT);\r\n\t\t\t\tbreak;\r\n\t\t\tcase '=': \r\n\t\t\t\tgame.mine.send(\"FASTER\");\r\n\t\t\t\tif(game.speed < C.FAST) game.changeSpeed(game.speed+1); \r\n\t\t\t\tbreak;\r\n\t\t\tcase '-':\r\n\t\t\t\tgame.mine.send(\"SLOWER\");\r\n\t\t\t\tif(game.speed > C.SLOW) game.changeSpeed(game.speed-1);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_SPACE: \r\n\t\t\t\tgame.mine.send(\"PAUSE\");\r\n\t\t\t\tpause();\r\n\t\t\t\tgame.mine.send(\"RESUME\");\r\n\t\t\t\tresume();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault : break;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tchar c = arg0.getKeyChar(); \r\n\t\t\tswitch(c){\r\n\t\t\tcase 'w': \r\n\t\t\t\tgame.mine.send(\"UP\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'a': \r\n\t\t\t\tgame.mine.send(\"LEFT\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 's': \r\n\t\t\t\tgame.mine.send(\"DOWN\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'd': \r\n\t\t\t\tgame.mine.send(\"RIGHT\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '=': \r\n\t\t\t\tgame.mine.send(\"FASTER\");\r\n\t\t\t\tif(game.speed < C.FAST) game.changeSpeed(game.speed+1); \r\n\t\t\t\tbreak;\r\n\t\t\tcase '-':\r\n\t\t\t\tgame.mine.send(\"SLOWER\");\r\n\t\t\t\tif(game.speed > C.SLOW) game.changeSpeed(game.speed-1);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_SPACE:\r\n\t\t\t\tgame.mine.send(\"PAUSE\");\r\n\t\t\t\tpause();\r\n\t\t\t\tgame.mine.send(\"RESUME\");\r\n\t\t\t\tresume();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault : break;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void keyPressed( KeyEvent event )\n {\n if( event.getKeyCode() == KeyEvent.VK_RIGHT )\n {\n player.setRight(true);\n }\n else if( event.getKeyCode() == KeyEvent.VK_LEFT )\n {\n player.setLeft(true);\n }\n if( event.getKeyCode() == KeyEvent.VK_UP )\n {\n player.setUp(true);\n }\n else if( event.getKeyCode() == KeyEvent.VK_DOWN )\n {\n player.setDown(true);\n }\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\t//Converts e.getKeyChar() to a string\n\t\tString keyPressed = e.getKeyChar() + \"\";\n\t\t//only runs if the player has pressed a valid key\n\t\t\n\t\tif (contains(keys,keyPressed)){ \n\t\t\t\n\t\t\tswitch (keyPressed){\n\t\t\t//if the key is w, then it moves the player up.\n\t\t\tcase \"w\": \n\t\t\t\tb.p.moveUp();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is a, then it moves the player left.\n\t\t\tcase \"a\": \n\t\t\t\tb.p.moveLeft();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is x, then it moves the player down.\t\n\t\t\tcase \"x\": \n\t\t\t\tb.p.moveDown();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is d, then it moves the player right.\n\t\t\tcase \"d\": \n\t\t\t\tb.p.moveRight();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is q, then it moves the player up and to the left.\n\t\t\tcase \"q\":\n\t\t\t\tb.p.moveUpLeft();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is e, then it moves the player up and to the right. \n\t\t\tcase \"e\":\n\t\t\t\tb.p.moveUpRight();\t\n\t\t\t\tbreak;\n\t\t\t\t//if the key is z, then it moves the player down and to the left.\n\t\t\tcase \"z\":\n\t\t\t\tb.p.moveDownLeft();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is c, then it moves the player down and to the right.\n\t\t\tcase \"c\":\n\t\t\t\tb.p.moveDownRight();\n\t\t\t\tbreak;\n\t\t\t\t//if the key is j, then it moves the player to a random location.\n\t\t\tcase \"j\":\n\t\t\t\tb.jump(b.p);\n\t\t\t\tbreak;\n\t\t\t\t//if the key is s, then it doesn't move\n\t\t\tcase \"s\":\n\t\t\t\tbreak;\n\t\t\t\t//if the key is y when game is over, then the game resets.\n\t\t\tcase \"y\":\n\t\t\t\tif (gameOver){\n\t\t\t\t\tgameStarted = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t//if the key is n when game is over, then JFrame window closes and program terminates.\n\t\t\tcase \"n\":\n\t\t\t\tif(gameOver){\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//Updates mho position and discards the mhos that need to be discarded\n\t\t\tif (!keyPressed.equals(\"j\") && !keyPressed.equals(\"y\") && !keyPressed.equals(\"n\")){\n\t\t\t\tfor (int i =0; i <b.mhos.size(); i++) {\n\t\t\t\t\tb.mhos.get(i).updatePosition(b);\n\t\t\t\t\tif (b.mhos.get(i).isDiscard()) {\n\t\t\t\t\t\tdiscardMhos.add(b.mhos.get(i));\n\t\t\t\t\t\tb.mhos.remove(i);\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Checks if the player won or lost\n\t\t\tif (!gameOver){\n\t\t\t\tif (b.mhos.size() == 0) {\n\t\t\t\t\tplayerWon = true;\n\t\t\t\t\tgameOver = true;\n\t\t\t\t}\n\t\t\t\tif(!b.p.canMove()){\n\t\t\t\t\tplayerWon = false;\n\t\t\t\t\tgameOver = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trepaint();\n\t}",
"@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode()==e.VK_R){\r\n\t\t\tif(GAME_STATE.equals(\"WON\")) game.setScreen(new StartScreen(game));\r\n\t\t}\r\n\t}",
"public void input() {\n \n \t\tboolean aPressed = Keyboard.isKeyDown(Keyboard.KEY_A);\n \t\tboolean dPressed = Keyboard.isKeyDown(Keyboard.KEY_D);\n \t\tboolean wPressed = Keyboard.isKeyDown(Keyboard.KEY_W);\n \t\tboolean sPressed = Keyboard.isKeyDown(Keyboard.KEY_S);\n \n \t\tif ((aPressed) && (!dPressed)) {\n \t\t\ttryToMove(Keyboard.KEY_A);\n \t\t} else if ((dPressed) && (!aPressed)) {\n \t\t\ttryToMove(Keyboard.KEY_D);\n \t\t} else if ((wPressed) && (!sPressed)) {\n \t\t\ttryToMove(Keyboard.KEY_W);\n \t\t} else if ((sPressed) && (!wPressed)) {\n \t\t\ttryToMove(Keyboard.KEY_S);\n \t\t}\n \t}",
"public void keyPressed(KeyEvent e) {\n \t\tswitch (e.getKeyCode()) {\n \t\t\tcase KeyEvent.VK_LEFT:\n \t\t\t\tif (!isPaused && !isOver) {\n \t\t\t\t\trb.setAccel(new Point2D.Double(-3, 0));\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase KeyEvent.VK_RIGHT:\n \t\t\t\tif (!isPaused && !isOver) {\n \t\t\t\t\trb.setAccel(new Point2D.Double(+3, 0));\n \t\t\t\t}\n \t\t\t\tbreak;\n \n \t\t\tcase KeyEvent.VK_ESCAPE:\n \t\t\t\tSystem.exit(0);\n \t\t\t\tbreak;\n \t\t\tcase KeyEvent.VK_SPACE:\n\t\t\t\tif (isStarted && !isOver) {\n \t\t\t\t\ttogglePaused();\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase KeyEvent.VK_WINDOWS:\n \t\t\t\tif (!isStarted) {\n \t\t\t\t\tstartGame();\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t}\n \t}",
"@Override\r\n\tpublic void keyPressed(KeyEvent e)\r\n\t{\r\n\t\tchar entered = e.getKeyChar();\r\n\t\tswitch (entered)\r\n\t\t{\r\n\t\tcase 'w':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 's':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 'a':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 'd':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 'x':\r\n\t\t\tequip.execute(entered);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tgame.updateState();\r\n\t}",
"private void manageKeys() {\n if (!gameOver) {\n if (keyStateManager.isPressed(KeyEvent.VK_UP) && \n !keyStateManager.isAlreadyPressed(KeyEvent.VK_UP)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_UP);\n if (currentPiece.rotateRight(grid)) {\n effectsReader.play(\"rotate.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_DOWN)) {\n keyStateManager.increaseBuffer(KeyEvent.VK_DOWN);\n if (keyStateManager.canBeUsed(KeyEvent.VK_DOWN)) {\n if (currentPiece.canDown(grid)) {\n currentPiece.down();\n if (!keyStateManager.isAlreadyPressed(KeyEvent.VK_DOWN)) {\n effectsReader.play(\"move.mp3\", 1);\n }\n timeBufer = 0;\n score += 1;\n keyStateManager.setAlreadyPressed(KeyEvent.VK_DOWN);\n } else if (sincePieceDown == null) {\n sincePieceDown = LocalTime.now();\n sinceLastMove = LocalTime.now();\n }\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_LEFT)) {\n keyStateManager.increaseBuffer(KeyEvent.VK_LEFT);\n if (keyStateManager.canBeUsed(KeyEvent.VK_LEFT)) {\n if (currentPiece.setXDirection(-1, grid)) {\n effectsReader.play(\"move.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n keyStateManager.setAlreadyPressed(KeyEvent.VK_LEFT);\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_RIGHT)) {\n keyStateManager.increaseBuffer(KeyEvent.VK_RIGHT);\n if (keyStateManager.canBeUsed(KeyEvent.VK_RIGHT)) {\n if (currentPiece.setXDirection(1, grid)) {\n effectsReader.play(\"move.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n keyStateManager.setAlreadyPressed(KeyEvent.VK_RIGHT);\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_SPACE) && \n !keyStateManager.isAlreadyPressed(KeyEvent.VK_SPACE)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_SPACE);\n if (currentPiece.canDown(grid)) {\n score += (currentPiece.fix() * 2);\n sincePieceDown = LocalTime.MIN;\n sinceLastMove = LocalTime.MIN;\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_C)) {\n if (!hasSwiched && !keyStateManager.isAlreadyPressed(KeyEvent.VK_C)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_C);\n if (holdPiece == null) {\n holdPiece = currentPiece;\n holdPiece.setPointsAsInitial();\n initNextPiece();\n } else {\n Piece tempPiece = holdPiece;\n holdPiece = currentPiece;\n holdPiece.setPointsAsInitial();\n currentPiece = tempPiece;\n currentPiece.initPosition(grid);\n hasSwiched = true;\n sincePieceDown = null;\n sinceLastMove = null;\n }\n effectsReader.play(\"hold.mp3\", 1);\n }\n } \n if (keyStateManager.isPressed(KeyEvent.VK_Z) && \n !keyStateManager.isAlreadyPressed(KeyEvent.VK_Z)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_Z);\n if (currentPiece.rotateLeft(grid)) {\n effectsReader.play(\"rotate.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n }\n } else {\n if (keyStateManager.isPressed(KeyEvent.VK_R)) {\n initGame();\n }\n }\n }",
"public void keyPressed(KeyEvent e) {\r\n\t\t// left arrow\r\n\t\tif (e.getKeyCode() == 37 || e.getKeyCode() == 65) {\r\n\t\t\tleft = true;\r\n\t\t\tlastPressed = 2;\r\n\t\t}\r\n\t\t// up arrow\r\n\t\tif (e.getKeyCode() == 38 || e.getKeyCode() == 87) {\r\n\t\t\t//checks if grounded if it is then it allows you to jump\r\n\t\t\tif (playerObject[0].isGrounded()) {\r\n\t\t\t\tplayerObject[0].setVelocityY(-12);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// right arrow\r\n\t\tif (e.getKeyCode() == 39 || e.getKeyCode() == 68) {\r\n\t\t\tright = true;\r\n\t\t\tlastPressed = 1;\r\n\t\t}\r\n\t\t// escape key\r\n\t\tif ((e.getKeyCode() == 27) && (!escape) && (!escapePushed) && (!dead)) {\r\n\t\t\tescape = true;\r\n\t\t\tescapePushed = true;\r\n\t\t\tpaint();\r\n\t\t} else if ((e.getKeyCode() == 27) && (escape) && (!escapePushed) && (!dead)) {\r\n\t\t\tescape = false;\r\n\t\t\tescapePushed = true;\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\tswitch(e.getKeyCode()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase KeyEvent.VK_UP:\r\n\t\t\t\t\t\tcontrol.up = true;\r\n\t\t\t\t\t\t//juego.moverBombermanUP();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase KeyEvent.VK_DOWN:\t\r\n\t\t\t\t\t\tcontrol.down = true;\r\n//\t\t\t\t\t\tjuego.moverBombermanDOWN();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase KeyEvent.VK_RIGHT:\t\r\n\t\t\t\t\t\tcontrol.der = true;\r\n//\t\t\t\t\t\tjuego.moverBombermanRIGHT();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase KeyEvent.VK_LEFT:\t\r\n\t\t\t\t\t\tcontrol.izq = true;\r\n//\t\t\t\t\t\tjuego.moverBombermanLEFT();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\r\n\t\t\t\t\tcase KeyEvent.VK_SPACE:\r\n\t\t\t\t\t\tjuego.ponerBomba();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\t}",
"private void setKeyCode() {\n if (key.equals(KeyCode.W) || key.equals(KeyCode.UP)) {\n key = KeyCode.UP;\n right_key = true;\n } else if (key.equals(KeyCode.S) || key.equals(KeyCode.DOWN)) {\n key = KeyCode.DOWN;\n right_key = true;\n } else if (key.equals(KeyCode.A) || key.equals(KeyCode.LEFT)) {\n key = KeyCode.LEFT;\n right_key = true;\n } else if (key.equals(KeyCode.D) || key.equals(KeyCode.RIGHT)) {\n key = KeyCode.RIGHT;\n right_key = true;\n } else {\n key = KeyCode.PLUS;\n }\n }",
"void controlVehicle(KeyEvent e) {\n\t\tswitch (e.getKeyCode()) {\n\t\tcase KeyEvent.VK_LEFT:\n\t\t\tss.move(-1);\n\t\t\tif(!mute)\t\t\t\t\t\t\t\t\t\t\t\t//play audio when not mute\n\t\t\t\tnew AudioLoader(\"audios/ding.wav\");\t\t\t\t\t//play now audio when spaceship as Vehicle\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_RIGHT:\n\t\t\tss.move(1);\n\t\t\tif(!mute)\t\t\t\t\t\t\t\t\t\t\t\t//play audio when not mute\n\t\t\t\tnew AudioLoader(\"audios/ding.wav\");\t\t\t\t\t//play now audio when spaceship as Vehicle\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_UP:\n\t\t\tss.move(-2);\n\t\t\tif(!mute)\t\t\t\t\t\t\t\t\t\t\t\t//play audio when not mute\n\t\t\t\tnew AudioLoader(\"audios/ding.wav\");\t\t\t\t\t//play now audio when spaceship as Vehicle\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_DOWN:\n\t\t\tss.move(2);\n\t\t\tif(!mute)\t\t\t\t\t\t\t\t\t\t\t\t//play audio when not mute\n\t\t\t\tnew AudioLoader(\"audios/ding.wav\");\t\t\t\t\t//play now audio when spaceship as Vehicle\n\t\t\tbreak;\t\t\n\t\tcase KeyEvent.VK_END :\n\t\t\tSystem.exit(0);\t\t\t\t\t\t\t\t\t\t//press key End to exit \n\t\t\tbreak;\n\t\tcase KeyEvent.VK_M:\n\t\t\tmute = !mute;\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tint cmdType = 0, nr = 0, speed;\r\n\t\tString name = null;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif( e.getKeyCode() == KeyEvent.VK_CONTROL ) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Ctrl\");\r\n\t\t\tfor(Cmd c : Cmds) {\r\n\t\t\t\tif( c.getName().equals(\"Ctrl1\") || c.getName().equals(\"Ctrl2\") || c.getName().equals(\"Ctrl3\") )\r\n\t\t\t\t{\r\n\t\t\t\t\tc.setY(-50);\r\n\t\t\t\t\r\n\t\t\t\t cmdType = rand.nextInt(3);\r\n\t\t nr = 1 + rand.nextInt(9);\r\n\t\t\t\t if(cmdType == 0)\r\n\t\t\t\t \tname = \"Ctrl\";\r\n\t\t\t\t else if(cmdType == 1)\r\n\t\t\t\t \tname = \"Alt\";\r\n\t\t\t\t else\r\n\t\t\t\t \tname = \"Shift\";\r\n\t\t\t\t \r\n\t\t\t\t speed = 1+rand.nextInt(3);\r\n\t\t\t\t name = name+\"\"+nr;\r\n\t\t\t\t\r\n\t\t\t\t c.setName(name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n\t public void keyPressed(KeyEvent e) {\n\t\t// recuperer l'objet board de la classe MainWindow depuis la classe\n\t\t// anonyme\n\t\tBoard board = MainWindow.this.board;\n\t\tswitch (e.getKeyCode()) {\n\t\t case KeyEvent.VK_UP:\n\t\t\tboard.playMove(Direction.UP);\n\t\t\tbreak;\n\t\t case KeyEvent.VK_DOWN:\n\t\t\tboard.playMove(Direction.DOWN);\n\t\t\tbreak;\n\t\t case KeyEvent.VK_LEFT:\n\t\t\tboard.playMove(Direction.LEFT);\n\t\t\tbreak;\n\t\t case KeyEvent.VK_RIGHT:\n\t\t\tboard.playMove(Direction.RIGHT);\n\t\t\tbreak;\n\t\t}\n\t }",
"private void enableInput(Scene gameScene){\n gameScene.setOnKeyPressed(new EventHandler<KeyEvent>() {\n @Override\n public void handle(KeyEvent event) {\n oldState = levelCreator.CloneDynamicGrid(dynamicLevel);\n\n switch (event.getCode()) {\n case UP:\n dynamicLevel.updatePlayerPos(Direction.UP);\n break;\n case W:\n dynamicLevel.updatePlayerPos(Direction.UP);\n break;\n case DOWN:\n dynamicLevel.updatePlayerPos(Direction.DOWN);\n break;\n case S:\n dynamicLevel.updatePlayerPos(Direction.DOWN);\n break;\n case LEFT:\n dynamicLevel.updatePlayerPos(Direction.LEFT);\n break;\n case A:\n dynamicLevel.updatePlayerPos(Direction.LEFT);\n break;\n case RIGHT:\n dynamicLevel.updatePlayerPos(Direction.RIGHT);\n break;\n case D:\n dynamicLevel.updatePlayerPos(Direction.RIGHT);\n break;\n case R:\n initLevel();\n default:\n dynamicLevel.updatePlayerPos(Direction.NOTHING);\n break;\n }\n colDetector.HandleCollision(baseLevel, dynamicLevel, oldState);\n }\n\n });\n }",
"protected void keyPressed(int keyCode) {\n switch (gameStatus) {\n\t case notInitialized: if (keyCode==END_KEY) midlet.killApp();\n\t break;\n\t case Finished:\n\t case gameOver: if (ticks<TOTAL_OBSERVING_TIME) if (ticks>ANTI_CLICK_DELAY && ticks<FINAL_PICTURE_OBSERVING_TIME)\n\t ticks=FINAL_PICTURE_OBSERVING_TIME+1;\n\t case demoPlay:\n case titleStatus : {\n\t\t // System.out.println(\"kk:\"+keyCode/*+\", ac:\"+getGameAction(keyCode)+\", acn:\"+getKeyName(keyCode)*/);\n\t\t switch (keyCode) {\n\t\t\t\t case MENU_KEY:\n\t\t\t\t midlet.ShowMainMenu();\n\t\t\t\t break;\n\t\t\t\t case END_KEY: midlet.ShowQuitMenu(false);\n\t\t\t\t break;\n\t\t\t\t default:\n\t\t\t\t if (gameStatus == demoPlay || ticks>=TOTAL_OBSERVING_TIME){\n\t gameStatus=titleStatus;\n\t\t\t ticks=0;\n\t\t\t blink=false;\n\t\t\t\t\t repaint();\n\t\t\t\t }\n\t\t }\n\t\t\t\t //midlet.commandAction(midlet.newGameCommand,this);\n } break;\n case playGame : {\n\n\t\t\t int action = getGameAction(keyCode);\n\t\t\t if (keyCode == MENU_KEY) midlet.ShowGameMenu(); else\n\t\t\t if (keyCode == END_KEY) midlet.ShowQuitMenu(true); else\n\t switch (keyCode/*action*/) {\n\t\t\t\t case Canvas.KEY_NUM6/*RIGHT*/: direct=StarGun_SB.DIRECT_RIGHT; break;\n\t case Canvas.KEY_NUM4/*LEFT*/: direct=StarGun_SB.DIRECT_LEFT; break;\n\t\t\t\t case Canvas.KEY_NUM3: direct=StarGun_SB.DIRECT_ANGLE_LEFT; break;\n\t\t\t\t case Canvas.KEY_NUM1: direct=StarGun_SB.DIRECT_ANGLE_RIGHT; break;\n\t\t\t\t case Canvas.KEY_NUM9/*RIGHT*/: direct=StarGun_SB.DIRECT_RIGHT|StarGun_SB.DIRECT_ANGLE_RIGHT; break;\n\t case Canvas.KEY_NUM7/*LEFT*/: direct=StarGun_SB.DIRECT_LEFT|StarGun_SB.DIRECT_ANGLE_LEFT; break;\n\t\t\t\t case Canvas.KEY_NUM5/*FIRE*/: direct=StarGun_SB.DIRECT_FIRE; break;\n\n\t\t\t\tdefault:direct=StarGun_SB.DIRECT_NONE;\n\t }\n }\n }\n }",
"@Override\r\n\tpublic void keyPressed(KeyEvent e) {\r\n\t\tint key = e.getKeyCode(); // search for keyCode\r\n\t\tif(key == KeyEvent.VK_RIGHT) { //if right key is used move plus 10 places to the right\r\n\t\t\tplayerShip.setXSpeed(10);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(key == KeyEvent.VK_LEFT) {\r\n\t\t\tplayerShip.setXSpeed(-10); //if left key is used move minus 10 places to the left\r\n\t\t}\r\n\r\n\t}",
"@Override\n public void keyPressed(KeyEvent e){\n // determine the key\n int key = e.getKeyCode();\n // figure out which key\n if(key == KeyEvent.VK_RIGHT){\n right1 = true;\n }else if(key == KeyEvent.VK_LEFT){\n left1 = true;\n }else if(key == KeyEvent.VK_UP){\n down1 = true;\n }else if(key == KeyEvent.VK_DOWN){\n up1 = true;\n }else if(key == KeyEvent.VK_E){\n dagger1 = true;\n }else if(key == KeyEvent.VK_F){\n grenade1 = true;\n }\n \n \n \n // PLAYER 2\n if(key == KeyEvent.VK_D){\n right2 = true;\n }else if(key == KeyEvent.VK_A){\n left2 = true;\n }else if(key == KeyEvent.VK_W){\n down2 = true;\n }else if(key == KeyEvent.VK_S){\n up2 = true;\n }else if(key == KeyEvent.VK_SHIFT){\n dagger2 = true;\n }else if(key == KeyEvent.VK_CONTROL){\n grenade2 = true;\n }\n }",
"@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tplayer.right = false; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tplayer.left = false; \n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\tplayer.up = false; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tplayer.down = false; \n\t\t}\n\t}",
"@Override\r\n\tpublic void keyPressed(KeyEvent event) {\r\n\t\tswitch(event.getKeyCode())//iterate over buttons and dispatch command\r\n\t\t{\r\n\t\tcase 38://up\r\n\t\tcase 87://w\r\n\t\t\tforwardV += 2;\r\n\t\t\tbreak;\r\n\t\tcase 40://down\r\n\t\tcase 83://s\r\n\t\t\tforwardV -= 2;\r\n\t\t\tbreak;\r\n\t\tcase 37://left\r\n\t\tcase 65://a\r\n\t\t\thorizV -= 2;\r\n\t\t\tbreak;\r\n\t\tcase 39://right\r\n\t\tcase 68://d\r\n\t\t\thorizV += 2;\r\n\t\t}\r\n\t\t\r\n\t\t//set max and min for character speed\r\n\t\tif(horizV>2)\r\n\t\t\thorizV=2;\r\n\t\tif(forwardV>2)\r\n\t\t\tforwardV=2;\r\n\t\tif(horizV<-2)\r\n\t\t\thorizV=-2;\r\n\t\tif(forwardV<-2)\r\n\t\t\tforwardV=-2;\r\n\t\t\r\n\t\t//set character speed\r\n\t\tVector v = new Vector(forwardV, horizV);\r\n\t\tv = v.rotate(aSquare.getOrientation().getAngle());\r\n\t\taSquare.setVelocity(v);\r\n\t}",
"@Override\r\n\tpublic void keyPressed(KeyEvent e) {\r\n\t\tkey = e.getKeyCode();\r\n\t\t\r\n\t\t//up arrow\r\n\t\tif (key == KeyEvent.VK_UP) {\r\n\t\t\tpacman.speed=1;\r\n\t\t\t\tnextTurn = (\"up\");\r\n\t\t}\r\n\t\t//down arrow\r\n\t\tif (key == KeyEvent.VK_DOWN) {\r\n\t\t\tpacman.speed=1;\r\n\t\t\t\tnextTurn =(\"down\");\r\n\t\t}\r\n\t\t//left arrow\r\n\t\tif (key == KeyEvent.VK_LEFT) {\r\n\t\t\tpacman.speed=1;\r\n\t\t\t\tnextTurn =(\"left\");\r\n\t\t}\r\n\t\t//right arrow\r\n\t\tif (key == KeyEvent.VK_RIGHT) {\r\n\t\t\tpacman.speed=1;\r\n\t\t\t\tnextTurn =(\"right\");\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public void keyPressed(KeyEvent e) \n\t{\n\t\tchar key = e.getKeyChar(); //get key character\n\t\t//below is a switch statement that addresses each\n\t\t//key that is relevant to the game. Then it calls\n\t\t//set key in cpu class and set at a particular location\n\t\t//to 1 - true.\n\t\tswitch(key)\n\t\t{\n\t\t\tcase '1': //if equal to 1\n\t\t\t\tcpu.setKey(0x1,1);\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\tcpu.setKey(0x2,1);\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\tcpu.setKey(0x3,1);\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\tcpu.setKey(0xC,1);\n\t\t\t\tbreak;\n\t\t\tcase 'q':\n\t\t\t\tcpu.setKey(0x4,1);\n\t\t\t\tbreak;\n\t\t\tcase 'w':\n\t\t\t\tcpu.setKey(0x5,1);\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\t\tcpu.setKey(0x6,1);\n\t\t\t\tbreak;\n\t\t\tcase 'r':\n\t\t\t\tcpu.setKey(0xD,1);\n\t\t\t\tbreak;\n\t\t\tcase 'a':\n\t\t\t\tcpu.setKey(0x7,1);\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\tcpu.setKey(0x8,1);\n\t\t\t\tbreak;\n\t\t\tcase 'd':\n\t\t\t\tcpu.setKey(0x9,1);\n\t\t\t\tbreak;\n\t\t\tcase 'f':\n\t\t\t\tcpu.setKey(0xE,1);\n\t\t\t\tbreak;\n\t\t\tcase 'z':\n\t\t\t\tcpu.setKey(0xA,1);\n\t\t\t\tbreak;\n\t\t\tcase 'x':\n\t\t\t\tcpu.setKey(0x0,1);\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\tcpu.setKey(0xB,1);\n\t\t\t\tbreak;\n\t\t\tcase 'v':\n\t\t\t\tcpu.setKey(0xF,1);\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n //used the keyPressed event \r\n public void keyPressed(KeyEvent e) {\n int key = e.getKeyCode();\r\n //If statements works if the key pressed && opposite direction from what it is travelling in \r\n //can't Double back ,should be game over so to avoid it we use the !(not) variable \r\n if ((key == KeyEvent.VK_LEFT) && (!right)) {\r\n left = true;\r\n up = false;\r\n down = false;\r\n }\r\n if ((key == KeyEvent.VK_RIGHT) && (!left)) {\r\n right = true;\r\n up = false;\r\n down = false;\r\n }\r\n if ((key == KeyEvent.VK_UP) && (!down)) {\r\n up= true;\r\n right = false;\r\n left = false;\r\n }\r\n if ((key == KeyEvent.VK_DOWN) && (!up)) {\r\n down= true;\r\n right = false;\r\n left = false;\r\n }\r\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e)\n\t{\n\t\t// TODO Auto-generated method stub\n\t\t//System.out.println(\"Source: \"+ e.getSource());\n\t\t//name = e.getKeyText(e.getKeyCode());\n\t\t//numValue = e.getKeyCode()-37;\n\t\t//JButton btn = new JButton(\"button\");\n//\t\tif(e.getKeyCode()>=37 && e.getKeyCode()<=40){\n//\t\t\ttestPlayer.move(numValue);\n//\t\t\t//\t\t\t\tx = testPlayer.xPos;\n//\t\t\t//y = ...\n//\t\t\tgameStarted = true; //tells the program that the map has been loaded once\n//\t\t\tshowMap.repaint();\n//\n//\t\t}\n\t\tnumValue = e.getKeyCode()-37;\n\t\tif(e.getKeyCode()>=37 && e.getKeyCode()<=40){\n\t\t\ttestPlayer.move(numValue);\n\t\t\tgameStarted = true; //tells the program that the map has been loaded once\n//\t\t\tshowMap.repaint();\n\t\t\tthis.repaint();\n\t\t\t//drawStuff();\n\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_ESCAPE){//press escape to exit\n\t\t\tdispose();\n\t\t}\n\t\t//\t\telse if(e.getKeyCode()==80){\n\t\t//\t\t\t//pause screen\n\t\t//\t\t\tpausePanel = new Pause();\n\t\t//\t\t\tpausePanel.setBackground(new Color(0, 0, 0,50));\n\t\t//\t\t\tcontent.add(pausePanel, BorderLayout.CENTER); \n\t\t//\t\t\tSystem.out.println(\"paused key pressed\");\n\t\t//\t\t\t//pausePanel.repaint();\n\t\t//\t\t}\n\t}",
"public void keyPressed(KeyEvent e){\n int code = e.getKeyCode();\n if (code == KeyEvent.VK_UP){\n game.playerMove(MoveDirection.NORTH);\n }\n if (code == KeyEvent.VK_DOWN){\n game.playerMove(MoveDirection.SOUTH);\n }\n if (code == KeyEvent.VK_LEFT){\n game.playerMove(MoveDirection.WEST);\n }\n if (code == KeyEvent.VK_RIGHT){\n game.playerMove(MoveDirection.EAST);\n }\n }",
"@Override\r\n public void handle(KeyEvent event){\n if (event.getCode() == KeyCode.LEFT) {\r\n //rotate counter-clockwise by one degree\r\n L = false;\r\n //Moves player right\r\n } else if (event.getCode() == KeyCode.RIGHT) {\r\n \r\n R = false;\r\n \r\n \r\n //Moves player up\r\n } else if (event.getCode() == KeyCode.UP) {\r\n Forward = false;\r\n deltaX5 = 0;\r\n deltaY5 = 0; \r\n \r\n }\r\n }",
"private void Btn_PlayKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_Btn_PlayKeyPressed\n //Down Arrow:\n if (evt.getKeyCode() == 40) {\n Btn_ChangeNickname.requestFocus();\n }\n //Enter\n if (evt.getKeyCode() == 10) {\n Btn_Play.doClick();\n }\n }",
"void handleKeyboard(KeyboardHandler kh, Player player) throws IOException {\n\n if (kh.wPressed()) {\n if (player.checkCollisionHorizWall(90) == 1) {\n player.setDeltaY(-7);\n }\n else {\n player.setDeltaY(0);\n }\n }\n if (kh.sPressed()) {\n if (player.checkCollisionHorizWall(height-220) == 0) {\n player.setDeltaY(7);\n }\n else {\n player.setDeltaY(0);\n }\n }\n if (kh.aPressed()) {\n if (player.checkCollisionVerticalWall(150) == 1) {\n player.setDeltaX(-7);\n }\n else {\n player.setDeltaX(0);\n }\n }\n if (kh.dPressed()) {\n if (player.checkCollisionVerticalWall(width-200) == 0) {\n player.setDeltaX(7);\n }\n else {\n player.setDeltaX(0);\n }\n }\n\n if (kh.shiftPressed()) {\n shiftPress = 1;\n }\n else {\n if (shiftPress == 1) {\n\n player.meleeAttack();\n }\n shiftPress = 0;\n }\n\n if (kh.onePressed()) {\n onePress = 1;\n }\n else {\n if (onePress == 1) {\n\n player.shootArrow();\n }\n onePress = 0;\n }\n\n if (!kh.wPressed() && !kh.sPressed()) {\n player.setDeltaY(0);\n }\n\n if (!kh.aPressed() && !kh.dPressed()) {\n player.setDeltaX(0);\n }\n\n if (kh.escapePressed()) {\n escapePress = 1;\n }\n else {\n if (escapePress == 1) {\n \tingamemenu = new Menuingame(window, kh, level.getLevelNum());\n }\n escapePress = 0;\n }\n\n /*\n End keyboard handling block\n */\n }",
"public void startMenu() {\n textAlign(CENTER);\n textFont(f);\n background(20, 20, 20);\n PImage img = loadImage (\"TRON.png\");\n image (img, 10, 100, width-20, 180);\n //text(\"TRON\", width/2, height/2);\n fill(color(109, 236, 255));\n textSize(34);\n text(\"Press [2-4] to Select a Game Size\", width/2, height/2 + 50);\n\n int playerSize = -1;\n\n // Below code is from: https://stackoverflow.com/questions/628761/convert-a-character-digit-to-the-corresponding-integer-in-c\n if (keyPressed) {\n playerSize = key - '0';\n\n if (playerSize >= 2 && playerSize <= 4) {\n // Later on player 1 and player 2 will be taken from text box input (same for color)\n this.players = new ArrayList();\n ArrayList<String> controls = new ArrayList();\n controls.add(\"wasd\"); // player 1\n controls.add(\"arrows\"); // player 2\n controls.add(\"ijkl\"); // player 3\n controls.add(\"gvbn\"); // player 4\n\n for (int i=0; i<playerSize; i++) {\n String controlString = controls.get(i);\n char[] controlArray = new char[4];\n if (controlString.equals(\"arrows\")) {\n controlArray[0] = UP;\n controlArray[1] = LEFT;\n controlArray[2] = DOWN;\n controlArray[3] = RIGHT;\n } else {\n for (int j=0; j<4; j++) { // Add each direction to the array using charAt\n controlArray[j] = controlString.charAt(j);\n }\n }\n this.players.add(new Player(controlArray[0], controlArray[1], controlArray[2], controlArray[3]).setControlKeys(controlString)); // One player mode breaks game\n }\n\n this.state = GameState.CREATE_PLAYER;\n }\n }\n}",
"private void ControlType2(int time) {\n\t\tif (GameEngine.isKeyHeld(\"D\")) {\n\t\t\tgraphic.setX(graphic.getX() + speed * time);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"A\")) {\n\t\t\tgraphic.setX(graphic.getX() - speed * time);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"S\")) {\n\t\t\tgraphic.setY(graphic.getY() + speed * time);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"W\")) {\n\t\t\tgraphic.setY(graphic.getY() - speed * time);\n\t\t}\n\t\tgraphic.setDirection(GameEngine.getMouseX(), GameEngine.getMouseY());\n\t\t//set hero facing cursor\n\t}",
"public void keyPressed(KeyEvent evt)\n\t{\n\t\tint key = evt.getKeyCode(); \t\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif (players[i].exist && !players[i].ai)\n\t\t\t{\n\t\t\t\tif (key == players[i].keyDown)\n\t\t\t\t\tplayers[i].dir = 'd';\n\t\t\t\telse if (key == players[i].keyLeft)\n\t\t\t\t\tplayers[i].dir = 'l';\n\t\t\t\telse if (key == players[i].keyRight)\t\n\t\t\t\t\tplayers[i].dir = 'r';\n\t\t\t\telse if (key == players[i].keyUp)\n\t\t\t\t\tplayers[i].dir = 'u';\n\t\t\t}\n\t\t}\n\t}",
"public GameKeyLisener() {\r\n\t\tplayerA_up_key_Pressed = false;\r\n\t\tplayerA_down_key_Pressed = false;\r\n\t\tplayerA_right_key_Pressed=false;\r\n\t\tplayerA_left_key_Pressed=false;\r\n\t\t\r\n\t\tplayerB_up_key_Pressed = false;\r\n\t\tplayerB_down_key_Pressed = false;\r\n\t\tplayerB_right_key_Pressed = false;\r\n\t\tplayerB_left_key_Pressed = false;\r\n\t\t\r\n\t\tenterKeyPressed = false;\r\n\t}",
"public void keyPressed(KeyEvent e) {\n if (gameMode == START_MODE) {\n controlWorld(KeyEvent.VK_S);\n } else if (gameMode == END_MODE) {\n controlWorld(KeyEvent.VK_N);\n } else {\n int key = e.getKeyCode();\n int code = key == KeyEvent.VK_LEFT ? LEFT_MOVE :\n key == KeyEvent.VK_RIGHT ? RIGHT_MOVE :\n key == KeyEvent.VK_UP ? UP_MOVE :\n key == KeyEvent.VK_DOWN ? DOWN_MOVE : -1;\n if (code > 0) {\n if (gameMode == PLAY_MODE) {\n changeState(code);\n }\n } else {\n controlWorld(key);\n }\n }\n }",
"@SuppressWarnings(\"serial\")\n private void enableStartupKeys() {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_C, 0), \"controls\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_A, 0), \"about\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_E, 0), \"end game\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_N, 0), \"new game\");\n\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_N, 0), \"new game\");\n getActionMap().put(\"new game\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n endGame();\n if (myGameOver || myWelcome) {\n startNewGame();\n }\n }\n });\n\n getActionMap().put(\"controls\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n pauseTimer();\n displayControlDialog();\n if (!myWelcome) {\n startTimer();\n }\n }\n });\n\n getActionMap().put(\"about\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n pauseTimer();\n displayAboutDialog();\n if (!myWelcome) {\n startTimer();\n }\n }\n });\n\n getActionMap().put(\"end game\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n endGame();\n }\n });\n }",
"public void keyPressed(KeyEvent e) {\r\n\t\tif(!gameOver()) {\r\n\t\t\t\r\n\t\t\tGObject top = getElementAt(player.getX() + player.getWidth(), player.getY() - 16);\r\n\t\t\tGObject bottom = getElementAt(player.getX() + player.getWidth() / 2.0, player.getY() + player.getHeight() + 16);\r\n\t\t\tGObject bottomRight = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() * .8);\r\n\t\t\tGObject bottomLeft = getElementAt(player.getX() - 1, player.getY() + player.getHeight() * .8);\r\n\t\t\tGObject topRight = getElementAt(player.getX() + player.getWidth() + 1, player.getY());\r\n\t\t\tGObject topLeft = getElementAt(player.getX() - 1, player.getY());\r\n\t\t\t\r\n\t\t\tswitch(e.getKeyCode()) {\r\n\t\t\tcase KeyEvent.VK_RIGHT:\r\n\t\t\t\tmoveRight(bottom);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_LEFT:\r\n\t\t\t\tmoveLeft(bottom);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_UP:\r\n\t\t\t\tif ((top == null || (bottom == ladder1 || bottom == ladder2 || top == ladder1 || top == ladder2)) && player.getY() > 23)\r\n\t\t\t\t\tplayer.move(0, -PLAYER_Y_MOTION);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_DOWN:\r\n\t\t\t\tif (bottom == null || (bottom == ladder1 || bottom == ladder2))\r\n\t\t\t\t\tplayer.move(0, PLAYER_Y_MOTION);\r\n\t\t\t\tbreak;\r\n\t\t\tcase KeyEvent.VK_SPACE:\r\n\t\t\t\tif(bullet == null && bottom != null && bottomLeft == null && topRight == null && bottomRight == null && topLeft == null)\r\n\t\t\t\t\tshoot(bottom, bottomLeft, topRight, bottomRight, topLeft);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void keyPressed(KeyEvent e) {\n if (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n right = true;\n }\n if (e.getKeyCode() == KeyEvent.VK_LEFT) {\n left = true;\n }\n if (e.getKeyCode() == KeyEvent.VK_UP) {\n up = true;\n }\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n down = true;\n }\n // space bar = shoot\n if (e.getKeyCode() == KeyEvent.VK_SPACE) {\n spacebar = true;\n }\n // key 3 = Grenade Launcher\n if (e.getKeyCode() == KeyEvent.VK_3){\n if (SwitchCount > 50) {\n if (three == false){\n ship.counter = 75;\n three = true;\n two = false;\n one = false;\n }\n SwitchCount = 0;\n }\n }\n // key 2 = Energy Blaster\n if (e.getKeyCode() == KeyEvent.VK_2){\n if (SwitchCount > 50) {\n if (two == false){\n ship.counter = 175;\n three = false;\n two = true;\n one = false;\n }\n SwitchCount = 0;\n }\n }\n // key 1 = Bullets\n if (e.getKeyCode() == KeyEvent.VK_1){\n if (SwitchCount > 50) {\n if (one == false){\n ship.counter = 75;\n three = false;\n two = false;\n one = true;\n }\n SwitchCount = 0;\n }\n }\n }",
"@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tsuper.keyPressed(e);\n\t\t\t\tif (e.getKeyCode() == e.VK_UP) {\n\n\t\t\t\t\tjp.zc.up = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_DOWN) {\n\t\t\t\t\tjp.zc.down = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_LEFT) {\n\t\t\t\t\tjp.zc.left = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_RIGHT) {\n\t\t\t\t\tjp.zc.right = true;\n\t\t\t\t}\n\n\t\t\t\tif (e.getKeyCode() == e.VK_W) {\n\n\t\t\t\t\tjp.gyj.up = true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_S) {\n\t\t\t\t\tjp.gyj.down = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_A) {\n\t\t\t\t\tjp.gyj.left = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_D) {\n\t\t\t\t\tjp.gyj.right = true;\n\t\t\t\t}\n\n\t\t\t\tif (e.getKeyCode() == e.VK_NUMPAD1) {\n\t\t\t\t\tif(jp.zc.att==false)\n\t\t\t\t\t{\n\t\t\t\t\tjp.zc.att=true;\n\t\t\t\t\tjp.zc.presstime+=1;\n\t\t\t\t\tjp.zc.xuli();\n\t\t\t\t\t}\n\t\t\t\t \n\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_J) {\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(jp.gyj.att==false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\tjp.gyj.att=true;\n\t\t\t\t\t\tjp.gyj.presstime+=1;\n\t\t\t\t\t\tjp.gyj.xuli();\n\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}\n\t\t\t\t\t \n\t\t\t\t\t \n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (e.getKeyCode() == e.VK_K) {\n\t\t\t\t\t\n\t\t\t\t\tif(jp.gyj.xuli==false)\n\t\t\t\t\t{\n\t\t\t\t\tjp.gyj.status=AStatus.DEFENT;\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(e.getKeyCode()==e.VK_U)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tJineng jn=jp.gyj.jns.get(0);\n\t\t\t\t\tif(jn.jnstatus==JNstatus.USEABLE)\n\t\t\t\t\t{\n\t\t\t\t\tjn.usejineng(jp.gyj);\n\t\t\t\t\tjn.jinengtime=10;\n\t\t\t\t\tjn.jnstatus=JNstatus.USEING;\t\t\t\t\n\t\t\t\t\tThread jn1yundong =new Thread(()->{\n\t\t\t\t\t\twhile(jn.jnstatus==JNstatus.USEING)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tjn.yundong();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(40);\n\t\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\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\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tjn1yundong.start();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(e.getKeyCode()==e.VK_NUMPAD4)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tJineng jn=jp.zc.jns.get(0);\n\t\t\t\t\tif(jn.jnstatus==JNstatus.USEABLE)\n\t\t\t\t\t{\n\t\t\t\t\tjn.usejineng(jp.zc);\n\t\t\t\t\tjn.jinengtime=10;\n\t\t\t\t\tjn.jnstatus=JNstatus.USEING;\t\t\t\t\n\t\t\t\t\tThread jn1yundong =new Thread(()->{\n\t\t\t\t\t\twhile(jn.jnstatus==JNstatus.USEING)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tjn.yundong();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(40);\n\t\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\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\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tjn1yundong.start();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (e.getKeyCode() == e.VK_NUMPAD2) {\n\t\t\t\t\tif(jp.zc.xuli==false)\n\t\t\t\t\t{\n\t\t\t\t\tjp.zc.status=AStatus.DEFENT;\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}",
"@Override\n public void keyPressed(KeyEvent e) {\n if(getGameState().equals(GameState.SELECCION)){\n\n if (menu.getCurrentOption().equals(menu.getOptions().get(0))) {\n\n if (e.getKeyCode() == KeyEvent.VK_ENTER) {\n setGameState(GameState.GAME_STATE);\n }\n\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n menu.setCurrentOption(\"QUIT\");\n } else if (e.getKeyCode() == KeyEvent.VK_UP) {\n menu.setCurrentOption(\"QUIT\");\n }\n } else if (menu.getCurrentOption().equals(menu.getOptions().get(1))) {\n if(e.getKeyCode() == KeyEvent.VK_ENTER) {\n this.frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n }\n\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n menu.setCurrentOption(\"Game ON\");\n } else if (e.getKeyCode() == KeyEvent.VK_UP) {\n menu.setCurrentOption(\"Game ON\");\n }\n }\n } else if (getGameState().equals(GameState.GAME_STATE)) {\n\n // Checking if the player PAUSED the game (with P key)\n if(e.getKeyCode() == KeyEvent.VK_P) {\n setGameState(GameState.PAUSED);\n }\n\n // We are going to setMoving for the first time only if the player moves to UP, DOWN or RIGHT\n if (!snake.isMoving()) {\n if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN\n || e.getKeyCode() == KeyEvent.VK_RIGHT) {\n snake.setMoving(true);\n }\n }\n\n if (e.getKeyCode() == KeyEvent.VK_UP) {\n if (snake.getyDir() != 1) {\n snake.setyDir(-1);\n snake.setxDir(0);\n }\n }\n\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n if (snake.getyDir() != -1) {\n snake.setyDir(1);\n snake.setxDir(0);\n }\n }\n\n if (e.getKeyCode() == KeyEvent.VK_LEFT) {\n if (snake.getxDir() != 1) {\n snake.setxDir(-1);\n snake.setyDir(0);\n }\n }\n\n if (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n if (snake.getxDir() != -1) {\n snake.setxDir(1);\n snake.setyDir(0);\n }\n }\n } else if (getGameState().equals(GameState.PAUSED)) {\n if(e.getKeyCode() == KeyEvent.VK_ENTER) {\n setGameState(GameState.GAME_STATE);\n }\n\n } else if (getGameState().equals(GameState.GAME_OVER)) {\n if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n this.frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n }\n }\n }",
"public void interactWithKeyboard() {\n StdDraw.setCanvasSize(WIDTH * 16, HEIGHT * 16);\n StdDraw.setXscale(0, WIDTH);\n StdDraw.setYscale(0, HEIGHT);\n createMenu();\n StdDraw.enableDoubleBuffering();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char input = Character.toUpperCase(StdDraw.nextKeyTyped());\n if (input == 'v' || input == 'V') {\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char next = StdDraw.nextKeyTyped();\n if (next == '#') {\n createMenu();\n break;\n } else {\n name += next;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n }\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1);\n interactWithInputString(toInsert);\n ter.renderFrame(world);\n startCommands();\n }\n if (input == 'n' || input == 'N') {\n toInsert += 'n';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n while (true) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n char c = StdDraw.nextKeyTyped();\n if (c == 's' || c == 'S') {\n toInsert += 's';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show(); interactWithInputString(toInsert);\n ter.renderFrame(world); mouseLocation(); startCommands();\n break;\n }\n if (c != 'n' || c != 'N') {\n toInsert += c;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1); interactWithInputString(toInsert);\n ter.renderFrame(world); startCommands();\n }\n }\n }\n }",
"@Override\n public void keyPressed(KeyEvent e)\n {\n if(this.Visible() && (e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_A))\n {\n this.speed = -2;\n }\n else if(this.Visible() && (e.getKeyCode() == KeyEvent.VK_RIGHT || e.getKeyCode() == KeyEvent.VK_D))\n {\n this.speed = 2;\n }\n //Check to see if the laser is firing\n else if(this.Visible() && !this.laser.Visible())\n {\n this.laser.KeyPressed(e, this.x, this.y);\n }\n }",
"private void disableGamePlayKeys() {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Z, 0), \"none\");\n }",
"public void setKeyDown() {\r\n keys[KeyEvent.VK_P] = false;\r\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e){\n\t\tint key = e.getKeyCode();\n\t\tfor (int i=0; i<handler.objects.size(); i++){\n\t\t\tGameObject tempObj = handler.objects.get(i);\n\t\t\tif(tempObj.getId()== ID.Player){\n\t\t\t\t// all key events are handled here for player 1\n\t\t\t\tif (key == KeyEvent.VK_UP){ tempObj.setVelY(-4); keyPressed[0] = true;}\n\t\t\t\tif (key == KeyEvent.VK_DOWN){ tempObj.setVelY(4); keyPressed[1] = true;}\n\t\t\t\tif (key == KeyEvent.VK_RIGHT){ tempObj.setVelX(4);keyPressed[2] = true;}\n\t\t\t\tif (key == KeyEvent.VK_LEFT){ tempObj.setVelX(-4);keyPressed[3] = true;}\n\t\t\t}\n\t\t\t\n//\t\t\telse if (tempObj.getId()== ID.Player2){\n//\t\t\t\t// all key events are handled here for player 2\n//\t\t\tif (key == KeyEvent.VK_W) tempObj.setVelY(-4);\n//\t\t\tif (key == KeyEvent.VK_S) tempObj.setVelY(4);\n//\t\t\tif (key == KeyEvent.VK_D) tempObj.setVelX(4);\n//\t\t\tif (key == KeyEvent.VK_A) tempObj.setVelX(-4);\n//\t\t\t}\n\t\t}\n\t\tif (key == KeyEvent.VK_P) {\n\t\t\tif (game.gameState == STATE.Game) {\n\t\t\t\tGame.paused = !Game.paused;\n\t\t\t}\n\t\t}\n\t\tif (key == KeyEvent.VK_ESCAPE) System.exit(0);\n\t}",
"public void keyReleased(KeyEvent e) \n\t{\n\t\tchar key = e.getKeyChar(); //get key character\n\t\t//below is a switch statement that addresses each\n\t\t//key that is relevant to the game. Then it calls\n\t\t//set key in cpu class and set at a particular location\n\t\t//to 0 - false.\n\t\tswitch(key)\n\t\t{\n\t\t\tcase '1':\n\t\t\t\tcpu.setKey(0x1,0);\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\tcpu.setKey(0x2,0);\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\tcpu.setKey(0x3,0);\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\tcpu.setKey(0xC,0);\n\t\t\t\tbreak;\n\t\t\tcase 'q':\n\t\t\t\tcpu.setKey(0x4,0);\n\t\t\t\tbreak;\n\t\t\tcase 'w':\n\t\t\t\tcpu.setKey(0x5,0);\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\t\tcpu.setKey(0x6,0);\n\t\t\t\tbreak;\n\t\t\tcase 'r':\n\t\t\t\tcpu.setKey(0xD,0);\n\t\t\t\tbreak;\n\t\t\tcase 'a':\n\t\t\t\tcpu.setKey(0x7,0);\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\tcpu.setKey(0x8,0);\n\t\t\t\tbreak;\n\t\t\tcase 'd':\n\t\t\t\tcpu.setKey(0x9,0);\n\t\t\t\tbreak;\n\t\t\tcase 'f':\n\t\t\t\tcpu.setKey(0xE,0);\n\t\t\t\tbreak;\n\t\t\tcase 'z':\n\t\t\t\tcpu.setKey(0xA,0);\n\t\t\t\tbreak;\n\t\t\tcase 'x':\n\t\t\t\tcpu.setKey(0x0,0);\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\tcpu.setKey(0xB,0);\n\t\t\t\tbreak;\n\t\t\tcase 'v':\n\t\t\t\tcpu.setKey(0xF,0);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == e.VK_UP){\n\t\t\tkeys[0] = true;\n\t\t} else if(e.getKeyCode() == e.VK_DOWN){\n\t\t\tkeys[1] = true;\n\t\t}else if(e.getKeyCode() == e.VK_RIGHT){\n\t\t\tkeys[2] = true;\n\t\t}else if(e.getKeyCode() == e.VK_LEFT){\n\t\t\tkeys[3] = true;\n\t\t}\n\n\n\t}",
"public void keyPressed(KeyEvent e)\r\n {\r\n if (e.getKeyCode() == KeyEvent.VK_SPACE)\r\n {\r\n onMenu = true;\r\n init();\r\n }\r\n\r\n if (e.getKeyCode() == KeyEvent.VK_UP)\r\n {\r\n if (delay > 0)\r\n delay--;\r\n }\r\n\r\n if (e.getKeyCode() == KeyEvent.VK_DOWN)\r\n {\r\n delay++;\r\n }\r\n\r\n if (e.getKeyCode() == KeyEvent.VK_P)\r\n {\r\n if (paused)\r\n {\r\n paused = false;\r\n }\r\n else\r\n {\r\n paused = true;\r\n repaint();\r\n }\r\n }\r\n if (e.getKeyCode() == KeyEvent.VK_R)\r\n {\r\n repaint();\r\n }\r\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\t// object.x = object.x + 20;\n\t\t\t// snake1.x = snake1.x + snake1.speed;\n\t\t\tsnake1.right = true;\n\t\t\tsnake1.left = false;\n\t\t\tsnake1.up = false;\n\t\t\tsnake1.down = false;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\t// object.x = object.x - 20;\n\t\t\t// snake1.x = snake1.x - snake1.speed;\n\t\t\tsnake1.right = false;\n\t\t\tsnake1.left = true;\n\t\t\tsnake1.up = false;\n\t\t\tsnake1.down = false;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\t// object.y = object.y + 20;\n\t\t\tsnake1.right = false;\n\t\t\tsnake1.left = false;\n\t\t\tsnake1.up = false;\n\t\t\tsnake1.down = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\t// object.y = object.y - 20;\n\t\t\tsnake1.right = false;\n\t\t\tsnake1.left = false;\n\t\t\tsnake1.up = true;\n\t\t\tsnake1.down = false;\n\t\t}\n\n\t}",
"public void keyPressed() {\r\n \t\tkeys[keyCode] = true;\r\n \t}",
"public void interactWithKeyboard() {\n initialize_frame();\n InputSource inputSource = new KeyboardInputSource();\n char c = inputSource.getNextKey();\n while(inputSource.possibleNextInput() && c != 'Q') {\n if (c == 'N') {\n // instructions_page();\n draw_frame_seed();\n start_game(\"New\");\n break;\n } else if (c == 'L') {\n File seed = new File(\"seed.txt\");\n File directions = new File(\"movements.txt\");\n String old_seed = loadEditor(seed);\n String old_directions = loadEditor(directions);\n load_and_move(old_seed, old_directions);\n start_game(\"Load\");\n } else if (c == 'I') {\n instructions_page();\n if (inputSource.getNextKey() == 'B') {\n interactWithKeyboard();\n }\n }\n }\n\n }",
"public void keyReleased(KeyEvent e)\r\n\t{\r\n\t\tif(Game.gameState == State.Playing)\r\n\t\t{\r\n\t\t\tfor(int i =0; i < handler.entity.size();i++)\r\n\t\t\t{\r\n\t\t\t\tEntity ent = handler.entity.get(i);\r\n\t\t\t\tif(ent.getId() == ID.Player)\r\n\t\t\t\t{\r\n\t\t\t\t\tPlayer player = (Player)ent;\r\n\t\t\t\t\tif(e.getKeyCode() == KeyEvent.VK_W)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tkeyDown[0] = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(e.getKeyCode() == KeyEvent.VK_D)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tkeyDown[1] = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(e.getKeyCode() == KeyEvent.VK_S)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tkeyDown[2] = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(e.getKeyCode() == KeyEvent.VK_A)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tkeyDown[3] = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(e.getKeyCode() == KeyEvent.VK_SHIFT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tkeyDown[5] = false;\r\n\t\t\t\t\t\tif(player instanceof Mage)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMage mage = (Mage)player;\r\n\t\t\t\t\t\t\tmage.setFloating(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*setting the movement to 0*/\r\n\t\t\t\t\tif(!keyDown[1] && !keyDown[3]) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//player.setVelX(0);\r\n\t\t\t\t\t\tplayer.setSliding(true);\r\n\t\t\t\t\t\tplayer.setMovingX(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!keyDown[5]) {player.setRunSpeed(0);}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\te.consume();\r\n\t}",
"public void keyPressed() {\n for (Player player : players) {\n // Need two if statements because key = char and keyCode = int\n if (key == CODED) {\n if (player.isKey(keyCode)) {\n player.changeDirection(keyCode);\n }\n } else {\n if (player.isKey(key)) {\n player.changeDirection(key);\n }\n }\n }\n}",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\tcurrentState = currentState + 1;\n\t\t\tif (currentState > END_STATE) {\n\t\t\t\tcurrentState = MENU_STATE;\n\t\t\t}\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\tr.up = true;\n\t\t\t// System.out.println(\"up\");\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tr.down = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tr.left = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tr.right = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_SPACE) {\n\t\t\t/* Projectiles p = new Projectiles(r.x, r.y, 10, 10); */\n\t\t\tS2.play();\n\t\t\tom.addObject(new Projectiles(r.x + 22, r.y + 22, 10, 10));\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_D) {\n\t\t\tS1.play();\n\t\t\tom.addObject(new Projectiles(r.x, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 10, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 20, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 30, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 40, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 50, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 60, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 70, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 80, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 90, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 100, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 110, r.y + 22, 10, 10));\n\t\t\tspecialPower = specialPower + 1;\n\t\t}\n\t}",
"@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tactivarBoton();\r\n\t}",
"@Override\n public void keyPressed(KeyboardEvent keyboardEvent) {\n\n if (state == STATE.GAME) {\n\n if (keyboardEvent.getKey() == KeyboardEvent.KEY_ESC) {\n pauseScreen.draw();\n state = STATE.PAUSE;\n return;\n }\n\n }\n\n if (state == STATE.MENU) {\n\n if (keyboardEvent.getKey() == KeyboardEvent.KEY_Q) {\n System.exit(0);\n }\n\n if (keyboardEvent.getKey() == 38) {\n arrow.moveUp();\n return;\n }\n if (keyboardEvent.getKey() == 40) {\n arrow.moveDown();\n return;\n }\n if (keyboardEvent.getKey() == KeyboardEvent.KEY_ENTER) {\n if (arrow.getY() == arrow.getSinglePlayerPosition()) {\n initiateOnePlayer();\n return;\n }\n if (arrow.getY() == arrow.getMultiPlayerPosition()) {\n initiateTwoPlayers();\n return;\n }\n if (arrow.getY() == arrow.getVersusPlayerPosition()) {\n initiateVersusPlayer();\n return;\n }\n if (arrow.getY() == arrow.getInstructionsPosition()) {\n state = STATE.INSTRUCTIONS;\n return;\n }\n }\n\n }\n\n if (state == STATE.INSTRUCTIONS) {\n if (keyboardEvent.getKey() == KeyboardEvent.KEY_ESC) {\n instructions.delete();\n state = STATE.MENU;\n return;\n }\n }\n\n if (state == STATE.PAUSE) {\n\n if (keyboardEvent.getKey() == KeyboardEvent.KEY_M) {\n reset();\n pauseScreen.delete();\n state = STATE.MENU;\n return;\n\n\n }\n\n if (keyboardEvent.getKey() == KeyboardEvent.KEY_ESC) {\n pauseScreen.delete();\n state = STATE.GAME;\n }\n\n }\n }",
"@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tif (isMovingLeft) {\n\t\t\t\tplayer.getImage().setImage(\"LeftShipStationary.png\");\n\t\t\t} else {\n\t\t\t\tplayer.getImage().setImage(\"FrontShipStationary.png\");\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n public void keyPressed(KeyEvent e) {\r\n switchKey(e.getKeyCode(), true);\r\n }",
"public void addKeys() {\n String[] keyArray = {\"SPACE\", \"W\", \"A\", \"S\", \"D\", \"RIGHT\", \"LEFT\",\n \"UP\", \"DOWN\", \"control E\", \"R\"};\n GameContainer.input.addInputKey(keyArray);\n }",
"public void setKeyPressed(int keyCode){\n this.keys[keyCode] = true;\n\n }",
"public void keyPressed()\n{\n switch (key)\n {\n case ' ': //play and pause\n s =! s;\n if (s == false)\n {\n //pausets = millis()/4;\n controlP5.getController(\"play\").setLabel(\"Play\");\n } else if (s == true )\n {\n //origint = origint + millis()/4 - pausets;\n controlP5.getController(\"play\").setLabel(\"Pause\");\n }\n break; \n\n case TAB: //change of basemap\n if (mapwd == map1)\n {\n mapwd = map3;\n mapwk = map4; \n } else\n {\n mapwd = map1;\n mapwk = map2;\n }\n break; \n\n case ',': //backwards\n runtimes = runtimes - 300;\n break;\n\n case '<': //backwards\n runtimes = runtimes - 300;\n break; \n\n case '.': //forwards\n runtimes = runtimes + 300;\n break;\n\n case '>': //forwards\n runtimes = runtimes + 300;\n break;\n\n case 'z': //zoom to origin layer\n mapwk.zoomAndPanTo(BeijingLocation, 12);\n mapwd.zoomAndPanTo(BeijingLocation, 12);\n break;\n\n// case 'q': //switch mode\n// f.show();\n// break;\n }\n}",
"public Player(PImage sprite, int posX, int posY, PApplet p) {\n\t\tsuper(sprite, posX, posY, 32, true, p);\n\t\tmouseVector = new PVector(0, 0);\n\t\tkeysPressed = new int[4]; // holds pressed or not pressed state of W, A, S, D, respectively\n\t\tparent = p;\n\t}",
"public void controlPressed(Command com)\n {\n //System.out.println(\"pressed: \" + com);\n \n if(com.equals(left))\n {\n setMovingDir(Direction.LEFT);\n userHoldingLeftXOrRight = true;\n }\n else if(com.equals(right))\n {\n setMovingDir(Direction.RIGHT);\n userHoldingLeftXOrRight = true;\n }\n else if(com.equals(jump))\n {\n \tjumpKeyDown = true;\n \tif(canJump)\n \t{\n \t\tstartJump();\n \t}\n }\n else if(com.equals(playNote1))\n {\n \tSystem.out.println(\"playNote1 key pressed\");\n \tplayNote1KeyDown = true;\n \t\n \tif(hasInstrument)\n \t{\n \t\tcurrentInstrument.play(0); \n \t\t// TODO\n \t}\n }\n else if(com.equals(run))\n {\n \tSystem.out.println(\"-- Shift is down\");\n \tfastMoveMode = true;\n }\n }",
"private void botoes(){\n\t\tbindKeyPressed(\"SPACE\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\tif (!move) {\n\t\t\t\t\tmove = true;\n\t\t\t\t\tpause = false;\n\t\t\t\t} else {\n\t\t\t\t\tmove = false;\n\t\t\t\t\tpause = true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbindKeyPressed(\"I\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\tpause = true;\n\t\t\t\tmove = false;\n\t\t\t\ttutorial();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbindKeyPressed(\"R\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\treiniciar();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbindKeyPressed(\"LEFT\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\tPoint posicaoP = paddle.getPosition();\n\n\t\t\t\tif (Resolution.MSX.width - 254 < posicaoP.x && move == true && pause == false) {\n\t\t\t\t\tpaddle.move(-5, 0);\n\t\t\t\t} else if (Resolution.MSX.width - 254 < posicaoP.x && move == false && pause == false) {\n\t\t\t\t\tpaddle.move(-5, 0);\n\t\t\t\t\tbola.move(-5, 0);\n\t\t\t\t} else {\n\t\t\t\t\tpaddle.move(0, 0);\n\t\t\t\t} // fecha else\n\t\t\t}\n\t\t});\n\t\tbindKeyPressed(\"RIGHT\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\tPoint posicaoP = paddle.getPosition();\n\n\t\t\t\tif (Resolution.MSX.width > posicaoP.x + 25 && move == true && pause == false) {\n\t\t\t\t\tpaddle.move(5, 0);\n\t\t\t\t} else if (Resolution.MSX.width > posicaoP.x + 25 && move == false && pause == false) {\n\t\t\t\t\tpaddle.move(5, 0);\n\t\t\t\t\tbola.move(5, 0);\n\t\t\t\t} else {\n\t\t\t\t\tpaddle.move(0, 0);\n\t\t\t\t} // fecha else\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"@Override\n public void keyPressed(KeyEvent e) {\n player.keyPressed(e); // tell player a key has been pressed\n if (e.getKeyCode() == KeyEvent.VK_X && player.invulnerableTime <= 0 && spellCards > 0){ // player cast spell card\n spellCards --;\n audioloader.play(\"spark\");\n player.invulnerableTime = 5.0 * FPS;\n }\n if (e.getKeyCode() == KeyEvent.VK_C){ // toggle hitbox\n if (player.invulnerableTime <= 0)\n player.invulnerableTime = 10000000;\n else\n player.invulnerableTime = 0;\n }\n if (e.getKeyCode() == KeyEvent.VK_ENTER && entityloader.frame >= levelEnd){ // advance to next level\n gameResult = 1;\n }\n if (e.getKeyCode() == KeyEvent.VK_A){ // add life\n lives++;\n }\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(keyDown!=e.getKeyCode()-65&&e.getKeyCode()-65>=0&&e.getKeyCode()-65<=25) {\n\t\t\tif(keyDown>-1) {\n\t\t\t\tk1.pressed(keyDown, false);\n\t\t\t\tk2.pressed(-1, false);\n\t\t\t}\n\t\t\tk1.pressed(e.getKeyCode()-65, true);\n\t\t\t\n\t\t\tint n = machine.run(e.getKeyCode()-65);\n\t\t\tk2.pressed(n, true);\n\t\t\tkeyDown = e.getKeyCode()-65;\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_SPACE) {\n\t\t\tmachine.space();\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {\n\t\t\tmachine.back();\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\tmachine.enter();\n\t\t}\n\t\t\n\t}",
"@Override\n public boolean keyDown(int keycode) {\n Entity playerCharacter = engine.getEntitiesFor(Family.all(MainCharacterComponent.class).get()).first();\n PositionComponent position = playerCharacter.getComponent(PositionComponent.class);\n\n RenderSystem renderSys = engine.getSystem(RenderSystem.class);\n Integer camMaxX = renderSys.mapWidth; // - (int)renderSys.camera.viewportWidth/2;\n Integer camMaxY = renderSys.mapHeight; // - (int)renderSys.camera.viewportHeight/2;\n Integer pcMaxY = renderSys.mapWidth; //+(int)(renderSys.camera.viewportHeight/2);\n Integer pcMaxX = renderSys.mapHeight; //+(int)(renderSys.camera.viewportWidth/2);\n\n\n CameraComponent cameraPosition = renderSys.getCameraComponent();\n\n\n //TODO fix camera positioning code after testing.\n if(keycode == Input.Keys.LEFT) {\n //pcWalkDirection = \"LEFT\";\n //camera.translate(-1,0);\n position.direction = \"LEFT\";\n if (position.x > 0) {\n Moving.LEFT = true;\n }\n else {\n Moving.LEFT = false;\n position.x = 0;\n }\n }\n if(keycode == Input.Keys.RIGHT) {\n //pcWalkDirection = \"RIGHT\";\n //camera.translate(1,0);\n position.direction = \"RIGHT\";\n if (position.x < pcMaxX-1) {\n Moving.RIGHT = true;\n }\n else {\n Moving.RIGHT = false;\n position.x = pcMaxX-1;\n }\n }\n if(keycode == Input.Keys.UP) {\n //pcWalkDirection = \"UP\";\n //camera.translate(0, 1);\n position.direction = \"UP\";\n if (position.y < pcMaxY-1) {\n Moving.UP = true;\n }\n else {\n Moving.UP = false;\n position.y = pcMaxY-1;\n }\n }\n if(keycode == Input.Keys.DOWN) {\n //pcWalkDirection = \"DOWN\";\n //camera.translate(0,-1);\n position.direction = \"DOWN\";\n if (position.y > 0) {\n Moving.DOWN = true;\n }\n else {\n Moving.DOWN = false;\n position.y = 0;\n }\n }\n if(keycode == Input.Keys.NUM_1)\n //tiledMap.getLayers().get(0).setVisible(!tiledMap.getLayers().get(0).isVisible());\n if(keycode == Input.Keys.NUM_2)\n //tiledMap.getLayers().get(1).setVisible(!tiledMap.getLayers().get(1).isVisible());\n if(keycode == Input.Keys.ESCAPE) {\n Gdx.app.exit();\n\n }\n return false;\n }",
"@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }",
"private void control() {\n try {\n gameThread.sleep(17);\n } catch (InterruptedException e) { }\n }",
"@Override\n\tpublic void keyPressed() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void keyPressed(KeyEvent e) {\n\n\n }",
"public void keyPressed(KeyEvent e) {\n int key = e.getKeyCode();\n\n if (key == KeyEvent.VK_M) {\n getStateMachine().change(\"game\");\n }\n\n if (key == KeyEvent.VK_ESCAPE) {\n getStateMachine().change(\"menu\");\n }\n }",
"@Override\r\n public void keyPressed(KeyEvent e) {\r\n switch(e.getKeyCode()) {\r\n case KeyEvent.VK_UP:\r\n System.out.println(\"Go up\");\r\n this.setRotation(this.getRotation() + 3);\r\n break;\r\n case KeyEvent.VK_DOWN:\r\n System.out.println(\"Go down\");\r\n this.setRotation(this.getRotation() - 3);\r\n break;\r\n\r\n case KeyEvent.VK_SPACE:\r\n \tif(up) {\r\n \t\tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()+1.6f);\r\n \t\tup = false;\r\n \t}\r\n \telse {\r\n \t\t\r\n \t//\tthis.die ++;\r\n \t\tif(checkStatus()) {\r\n \t\t\tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()-1.6f);\r\n \t\t\tup = true;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()-3.5f);\r\n \t\t\tthis.die = -1;\r\n \t\t\tSystem.out.println(\"Game over\");\r\n \t\t}\r\n \t}\r\n break;\r\n case KeyEvent.VK_ENTER:\r\n \tif(die == -2) {\r\n \t\tdie = 0;\r\n \t\tbreak;\r\n \t}\r\n }\r\n\r\n }",
"protected EventHandler<KeyEvent> playKeyEvent() {\n EventHandler<KeyEvent> keyEventHandler;\n keyEventHandler = new EventHandler<KeyEvent>() {\n @Override\n public void handle(KeyEvent keyEvent) {\n // Rotates the boat.\n if (keyEvent.getCode() == KeyCode.R) {\n if(rotationIsValide){\n if(activeBoat!=null){\n drawRotation(activeBoat); \n }\n } \n }\n // Relocates the boat to origin.\n if (keyEvent.getCode() == KeyCode.DELETE) {\n if(activeBoat!=null) {\n reinitBoat(activeBoat);\n // enable validate button if all boats are well placed\n valider.setDisable(!allBoatsArePlaced());\n }\n // enable validate button if all boats are well placed\n valider.setDisable(!allBoatsArePlaced());\n }\n keyEvent.consume();\n }\n };\n return keyEventHandler;\n }",
"@Override\n public void keyPressed(KeyEvent e) {\n\n switch (KeyEvent.getKeyText(e.getKeyCode())) {\n case \"W\":\n wKeyPressed = true;\n break;\n case \"A\":\n aKeyPressed = true;\n break;\n case \"S\":\n sKeyPressed = true;\n break;\n case \"D\":\n dKeyPressed = true;\n break;\n case \"Space\":\n break;\n case \"F1\":\n break;\n case \"F2\":\n break;\n }\n }",
"private void typeKey(char keyChar) {\r\n if(keyChar == '1') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(1);\r\n }\r\n if(keyChar == '2') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(2);\r\n }\r\n if(keyChar == '3') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(3);\r\n }\r\n if(keyChar == '4') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(4);\r\n }\r\n if(keyChar == 's' || keyChar == 'S')\r\n restart.typed(true);\r\n if(keyChar == 'n' || keyChar == 'N')\r\n System.exit(0); // TODO: funciona estando en inselection y no deberia\r\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tkeys[e.getKeyCode()]=true;\t}",
"public void keyPressed(KeyEvent e) {\n char key = (char) e.getKeyCode(); //acquire the ascii value for the key pressed\r\n boolean redrawScreen = true; // create a boolean variable named redrawScreen to determine whether or not it is necessary to repaint the screen \r\n \r\n // player 2\r\n if (key == e.VK_LEFT) { //if the left arrow key is pressed\r\n player2.moveLeft(arrWalls); // player 2 moves left \r\n } else if (key == e.VK_RIGHT) { //if the right arrow key is pressed\r\n player2.moveRight(arrWalls, size); // player2 moves right \r\n } else if (key == e.VK_UP) { //if the right arrow key is pressed\r\n player2.moveUp(arrWalls); // player2 moves up \r\n } else if (key == e.VK_DOWN) { //if the right arrow key is pressed\r\n player2.moveDown(arrWalls, size); // player2 moves down\r\n } else if (key == 'M') { // if key \"M\" is pressed, player 2 shoots a bullet \r\n if (p2Bullet == null) { // if p2Bullet does not exist on the screen \r\n int x = player2.positionX; // define two temporary variables to store bullet position\r\n int y = player2.positionY;\r\n switch (player2.direction) { // adjust position values so that no matter which direction\r\n case Player.UP: // the player is facing, the bullet always comes out of \r\n y -= 35; // the tip of the gun \r\n x += 10;\r\n break;\r\n case Player.DOWN:\r\n y += 35;\r\n x += 10;\r\n break;\r\n case Player.LEFT:\r\n y += 10;\r\n x -= 35;\r\n break;\r\n case Player.RIGHT:\r\n y += 10;\r\n x += 35;\r\n break;\r\n }\r\n p2Bullet = new Bullet(x, y, player2.direction); // initialize p2Bullet in Bullet class\r\n }\r\n\r\n } \r\n\r\n // player 1\r\n else if (key == 'A') { // if the key \"A\" is pressed\r\n player1.moveLeft(arrWalls); // player 1 moves left\r\n } else if (key == 'D') {// if the key \"A\" is pressed\r\n player1.moveRight(arrWalls, size); // player 1 moves right \r\n } else if (key == 'W') {// if the key \"A\" is pressed\r\n player1.moveUp(arrWalls);// player 1 moves up\r\n } else if (key == 'S') {// if the key \"A\" is pressed\r\n player1.moveDown(arrWalls, size);// player 1 moves down\r\n } else if (key == e.VK_SPACE) { // if space bar is pressed \r\n if (p1Bullet == null) {\r\n int x = player1.positionX;\r\n int y = player1.positionY;\r\n switch (player1.direction) { // same process for player 1\r\n case Player.UP:\r\n y -= 35;\r\n x += 10;\r\n break;\r\n case Player.DOWN:\r\n y += 35;\r\n x += 10;\r\n break;\r\n case Player.LEFT:\r\n y += 10;\r\n x -= 35;\r\n break;\r\n case Player.RIGHT:\r\n y += 10;\r\n x += 35;\r\n break;\r\n }\r\n p1Bullet = new Bullet(x, y, player1.direction);\r\n }\r\n } else if (key == e.VK_ESCAPE || key == 'q') { // if esc is pressed \r\n System.exit(0); //quit the program\r\n } else { // if no key is pressed, nothing changes, thus no need to repaint hte screen \r\n redrawScreen = false;\r\n }\r\n if (redrawScreen) {\r\n repaint(); //refresh the frame\r\n }\r\n }",
"@Override\n public void keyPressed(KeyEvent e) {\n \n \n }",
"public void keyPressed(KeyEvent e){\n\t\tint key = e.getKeyCode();\n\t\t\n\t\tif(!isStageComplete && health >= 0){\n\t\t\tif(key == KeyEvent.VK_UP){\n\t\t\t\tisUpHeld = true;\n\t\t\t\tif(currentAnimation() == currLeftAnim || currentAnimation() == stillLeft || currentAnimation() == sitLeft) {\n\t\t\t\t\tsetAnimation(stillUpLeft);\n\t\t\t\t}\n\t\t\t\tif(currentAnimation() == currRightAnim || currentAnimation() == stillRight || currentAnimation() == sitRight) {\n\t\t\t\t\tsetAnimation(stillUpRight);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(key == KeyEvent.VK_LEFT){\n\t\t\t\tisLeftHeld = true;\n\t\t\t\tif(!isDownHeld){\n\t\t\t\t\tsetAnimation(currLeftAnim);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(key == KeyEvent.VK_RIGHT){\n\t\t\t\tisRightHeld = true;\n\t\t\t\tif(!isDownHeld){\n\t\t\t\t\tsetAnimation(currRightAnim);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(key == KeyEvent.VK_SHIFT) {\n\t\t\t\tthis.isShiftHeld = true;\n\t\t\t}\n\t\t\t\n\t\t\tif(key == KeyEvent.VK_DOWN) {\n\t\t\t\tisDownHeld = true;\n\t\t\t\tif(currentAnimation() == currLeftAnim || currentAnimation() == stillLeft || currentAnimation() == sitLeft) {\n\t\t\t\t\tsetAnimation(sitLeft);\n\t\t\t\t}\n\t\t\t\tif(currentAnimation() == currRightAnim || currentAnimation() == stillRight || currentAnimation() == sitRight) {\n\t\t\t\t\tsetAnimation(sitRight);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(key == KeyEvent.VK_SPACE){\n\t\t\t\tif(!isJumping){\n\t\t\t\t\tisSpaceHeld = true;\n\t\t\t\t\tisJumping = true;\n\t\t\t\t\tdy = jumpHeight;\n\t\t\t\t\t//A call to a sound function for jump\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tnoKeyListeners();\n\t\t}\n\t}",
"private void setKeyBindings() {\n\t\tKeyboard.getPressedActions().register(\"playerMovement\",\n\t\t\t\tnew InputAction<KeyEvent>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(KeyEvent event) {\n\t\t\t\t\t\tint key = event.getKeyCode();\n\n\t\t\t\t\t\tif (key == KeyEvent.VK_W) {\n\t\t\t\t\t\t\tsetDirection(Direction.NORTH);\n\t\t\t\t\t\t} else if (key == KeyEvent.VK_S) {\n\t\t\t\t\t\t\tsetDirection(Direction.SOUTH);\n\t\t\t\t\t\t} else if (key == KeyEvent.VK_D) {\n\t\t\t\t\t\t\tsetDirection(Direction.EAST);\n\t\t\t\t\t\t} else if (key == KeyEvent.VK_A) {\n\t\t\t\t\t\t\tsetDirection(Direction.WEST);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tKeyboard.getReleasedActions().register(\"playerMovement\",\n\t\t\t\tnew InputAction<KeyEvent>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(KeyEvent event) {\n\t\t\t\t\t\tint key = event.getKeyCode();\n\n\t\t\t\t\t\tif (key == KeyEvent.VK_W || key == KeyEvent.VK_S\n\t\t\t\t\t\t\t\t|| key == KeyEvent.VK_D || key == KeyEvent.VK_A) {\n\t\t\t\t\t\t\tsetDirection(Direction.NONE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"private void setUpKeys() {\n inputManager.addMapping(\"Left\", new KeyTrigger(KeyInput.KEY_A));\n inputManager.addMapping(\"Right\", new KeyTrigger(KeyInput.KEY_D));\n inputManager.addMapping(\"Up\", new KeyTrigger(KeyInput.KEY_W));\n inputManager.addMapping(\"Down\", new KeyTrigger(KeyInput.KEY_S));\n //inputManager.addMapping(\"Shoot\", new KeyTrigger (KeyInput.KEY_LSHIFT));\n inputManager.addMapping(\"Jump\", new KeyTrigger(KeyInput.KEY_SPACE));\n inputManager.addListener(this, \"Left\");\n inputManager.addListener(this, \"Right\");\n inputManager.addListener(this, \"Up\");\n inputManager.addListener(this, \"Down\");\n \n inputManager.addListener(this, \"Jump\");\n }",
"public void keyPressed() { \n\t\twantsFrameBreak = true;\n\t\t//key = e.getKeyChar();\n\t\tkeyPressed = true;\n\t\tif (System.nanoTime() - acted > .033e9f) {\n\t\t\t_keyPressed();\n\t\t}\n\t}",
"public void keyPressed(KeyEvent e) {\n int key = e.getKeyCode();\n if (key == KeyEvent.VK_RIGHT) {\n acceleration = 1;\n }\n if (key == KeyEvent.VK_LEFT) {\n acceleration = -1;\n }\n if (key == KeyEvent.VK_UP) {\n dy = 3;\n img = img_up;\n }\n if (key == KeyEvent.VK_DOWN) {\n dy = -3;\n img = img_down;\n }\n }",
"public void KeyListenerAdded(KeyEvent e) throws InterruptedException {\n char keyPressed = e.getKeyChar();\n // CTRL-1: start a new game at level 1\n if(keyPressed == '1' || (e.isControlDown() && e.getKeyCode() == KeyEvent.VK_1)){\n startGameByLevel(1);\n }\n\n if(gameStarted == false){return; }\n String str = \"\";\n boolean moved= false;\n\n // Press wasd or UP, DOWN, LEFT, RIGHT ARROWS.\n if (keyPressed == 'w' || keyPressed == 'W' || e.getKeyCode() == KeyEvent.VK_UP) {\n str = \"up\";\n moved = board.moveChip(str);\n if(moved == false && muteMusic == false){\n music.playAudio(\"ErrorSound\");\n }\n } else if (keyPressed == 's' || keyPressed == 'S' || e.getKeyCode() == KeyEvent.VK_DOWN) {\n str = \"down\";\n moved = board.moveChip(str);\n if(moved == false && muteMusic == false){\n music.playAudio(\"ErrorSound\");\n }\n } else if (keyPressed == 'a' || keyPressed == 'A' || e.getKeyCode() == KeyEvent.VK_LEFT) {\n str = \"left\";\n moved = board.moveChip(str);\n if(moved == false && muteMusic == false){\n music.playAudio(\"ErrorSound\");\n }\n } else if (keyPressed == 'd' || keyPressed == 'D' || e.getKeyCode() == KeyEvent.VK_RIGHT) {\n str = \"right\";\n moved = board.moveChip(str);\n if(moved == false && muteMusic == false){\n music.playAudio(\"ErrorSound\");\n }\n }\n if(moved){\n checkMovedRedraw();\n }\n // CTRL-X:\n if(keyPressed == 'x' || keyPressed == 'X' || (e.isControlDown() && e.getKeyCode() == KeyEvent.VK_X)){\n if(gameStarted == false) { return; }\n exited = true;\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n timeRuunableThread.setDrawNumber(false);\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LoadingScreenMusic\");\n }\n musicName = \"LoadingScreenMusic\";\n animationThread.start();\n\n // clean the infoCanvas\n CleanInfoCanvas();\n }\n\n // CTRL-S: exit the game, saves the game state, game will resume next time the application will be started\n if((e.isControlDown() && e.getKeyCode() == KeyEvent.VK_S)){\n SaveGame();\n }\n\n // CTRL-R: resume a saved game\n if(keyPressed == 'r' || keyPressed == 'R' || (e.isControlDown() && e.getKeyCode() == KeyEvent.VK_R)){\n if(canLoadGame == false){ return; }\n // loadGame();\n replayGame();\n }\n\n // CTRL-P: start a new game at the last unfinished level\n if(keyPressed == 'p' || keyPressed == 'P' || (e.isControlDown() && e.getKeyCode() == KeyEvent.VK_P)){\n animationThread.stop();\n Thread.sleep(100);\n JOptionPane.showMessageDialog(null, \"Resume from the last unfinished level: \" + level, \"Message\", 1);\n newGameStart(level);\n }\n\n // SPACE: pause and continue\n if(e.getKeyCode()==KeyEvent.VK_SPACE){\n pauseAndContinue();\n }\n\n // ESC: escape from pause\n if(e.getKeyCode() == KeyEvent.VK_ESCAPE){\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n jf_Pause.dispose();\n }\n }",
"private void initKeys() { \n //add left, down, right, up\n playerKeys.add(new keyList(KeyInput.KEY_J, KeyInput.KEY_K, KeyInput.KEY_L, KeyInput.KEY_I));\n }",
"@Override\n public void chooseSprite() {\n switch(direction){\n case 0:\n sprite=Sprite.python_down;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_down,Sprite.python_down_1,Sprite.python_down_2,Sprite.python_down_3,animate,40);\n break;\n case 1:\n sprite=Sprite.python_right;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_right,Sprite.python_right_1,Sprite.python_right_2,animate,40);\n break;\n case 2:\n sprite=Sprite.python_up;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_up,Sprite.python_up_1,Sprite.python_up_2,animate,40);\n break;\n case 3:\n sprite=Sprite.python_left;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_left,Sprite.python_left_1,Sprite.python_left_2,animate,40);\n break;\n\n\n }\n\n }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\r\n\t\t\t}"
] | [
"0.7181216",
"0.71622664",
"0.7138272",
"0.70942473",
"0.7046905",
"0.6987309",
"0.6951331",
"0.69462615",
"0.6924583",
"0.6909033",
"0.68843913",
"0.6856126",
"0.6846084",
"0.68162787",
"0.6797619",
"0.6795276",
"0.67288655",
"0.6698005",
"0.6685812",
"0.66747665",
"0.6659406",
"0.66350263",
"0.66016155",
"0.6566186",
"0.65490156",
"0.6547711",
"0.6533841",
"0.6511912",
"0.64847904",
"0.6475767",
"0.64748484",
"0.64740676",
"0.64720833",
"0.6470865",
"0.64658576",
"0.64538133",
"0.6447472",
"0.644582",
"0.6444763",
"0.6441772",
"0.6421596",
"0.64186084",
"0.641614",
"0.63972104",
"0.63872963",
"0.63773876",
"0.6367621",
"0.6360878",
"0.63367504",
"0.633603",
"0.6326984",
"0.6312268",
"0.6305767",
"0.6300122",
"0.62921715",
"0.6267805",
"0.62396073",
"0.6226066",
"0.6218082",
"0.6217627",
"0.6214052",
"0.62072766",
"0.62046385",
"0.6203298",
"0.6202588",
"0.6197514",
"0.61954635",
"0.6189945",
"0.6188177",
"0.61877394",
"0.61819756",
"0.61814696",
"0.61786455",
"0.6177126",
"0.61726516",
"0.61718255",
"0.616918",
"0.61679953",
"0.61677337",
"0.6161288",
"0.6161192",
"0.6161192",
"0.6161192",
"0.61604905",
"0.61482036",
"0.6141744",
"0.6137898",
"0.61341447",
"0.61263734",
"0.61258495",
"0.61223614",
"0.60968065",
"0.60852927",
"0.6084951",
"0.6082585",
"0.6082518",
"0.6080592",
"0.6076831",
"0.60732555",
"0.60633445",
"0.60630757"
] | 0.0 | -1 |
This method set sprite's level | public void setFrogLevel(int level){
this.frogLevel = level;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void setLevel(int level) {\n if (level > 1) {\n this.level = level;\n scaleUp();\n percentageScaling();\n }\n }",
"public static void setLevel(int level) {\n Game.level = level;\n movingSpeed = level * 5;\n }",
"public void setLevel(int newlevel)\n {\n level = newlevel; \n }",
"protected void setLevel(int level){\r\n this.level = level;\r\n }",
"public static void setLevel(int current)\r\n\t{\r\n\t\tGame.level = current;\r\n\t}",
"private void setLevel(int level) {\n setStat(level, currentLevel);\n }",
"protected void setLevel(int level)\n {\n this.level = level;\n }",
"public void setLevel(Level level) { this.currentLevel = level; }",
"public void setLevel(int value) {\n this.level = value;\n }",
"public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}",
"public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }",
"public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }",
"public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}",
"public void setLevel(int v)\n {\n m_level = v;\n }",
"public void setLevel(int level) {\n \t\tthis.level = level;\n \t}",
"public void setLevel(int level){\n\t\tthis.level = level;\n\t}",
"public void newlevel() {\n\t\tblack = new Background(COURT_WIDTH, COURT_HEIGHT); // reset background\n\t\tcannon = new Cannon(COURT_WIDTH, COURT_HEIGHT); // reset cannon\n\t\tdeadcannon = null;\n\t\tbullet = null;\n\t\tshot1 = null;\n\t\tshot2 = null;\n\t\t// reset top row\n\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\talien1[i] = new Alien(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien1[i].pos_x = alien1[i].pos_x + 30*i;\n\t\t\talien1[i].v_x = level + alien1[i].v_x;\n\t\t}\n\t\t// reset second row\n\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\talien2[i] = new Alien2(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien2[i].pos_x = alien2[i].pos_x + 30*i;\n\t\t\talien2[i].v_x = level + alien2[i].v_x;\n\t\t}\n\t\t// reset third row\n\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\talien3[i] = new Alien3(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien3[i].pos_x = alien3[i].pos_x + 30*i;\n\t\t\talien3[i].v_x = level + alien3[i].v_x;\n\t\t}\n\t}",
"private void setLevel(int level){\r\n\t\tswitch(level){\r\n\t\t\tcase Game.LEVEL_ONE:\r\n\t\t\tcase Game.LEVEL_TWO:\r\n\t\t\tcase Game.LEVEL_THREE:\r\n\t\t\t\tthis.level = level;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.err.println(\"Improper level input, use 'Game.LEVEL_#' to accurately input a level into this method\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public void setLvl(int lvl) {\r\n\t\tfor(int i = this.nivelArma; i < lvl; i++) {\r\n\t\t\tstatsLvlUp();\r\n\t\t\tnivelArma += 1;\r\n\t\t}\r\n\t}",
"public void Setlevels(int lvl)\r\n {\r\n level = lvl;\r\n }",
"public void setLevel(String level);",
"public LevelButton(int y, String number, int stars){\n this.stars = stars;\n this.name = number;\n this.number = new Sprite(new Texture(Gdx.files.internal(\"huds/numbers/\"+number+\".png\")));\n\n slot = new Sprite(new Texture(Gdx.files.internal(\"huds/menu/level slot.png\")));\n star1 = new Sprite(new Texture(Gdx.files.internal(\"huds/menu/star.png\")));\n star2 = new Sprite(star1.getTexture());\n star3 = new Sprite(star1.getTexture());\n slot.setSize(slot.getWidth()*2,slot.getHeight()*2);\n slot.setPosition(Initial.HEIGHT/5, Initial.WIDTH*0.69f - (slot.getHeight()+ 10)*y);\n this.number.setPosition(slot.getX()+slot.getWidth()*0.35f,slot.getY()+slot.getHeight()*0.3f);\n this.number.setSize(this.number.getWidth()*3,this.number.getHeight()*3);\n if(stars == 2){\n star3.setColor(Color.BLACK);\n }\n if(stars == 1){\n star2.setColor(Color.BLACK);\n star3.setColor(Color.BLACK);\n }\n if(stars == 0){\n star1.setColor(Color.BLACK);\n star2.setColor(Color.BLACK);\n star3.setColor(Color.BLACK);\n }\n star1.setPosition(slot.getX() + 5 + slot.getWidth(),slot.getY()+slot.getHeight()/6);\n star2.setPosition(slot.getX() + slot.getWidth()*2 -5,slot.getY()+slot.getHeight()/6);\n star3.setPosition(slot.getX() + slot.getWidth()*3 -10,slot.getY()+slot.getHeight()/6);\n star1.setSize(slot.getWidth()*0.7f,slot.getHeight()*0.7f);\n star2.setSize(slot.getWidth()*0.7f,slot.getHeight()*0.7f);\n star3.setSize(slot.getWidth()*0.7f,slot.getHeight()*0.7f);\n\n rect = new Rectangle(slot.getX(),slot.getY(), Initial.WIDTH/2.7f,slot.getHeight());\n }",
"public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}",
"private void initLevel(){\r\n\t\tBetterSprite doodleSprite = (BetterSprite)(getGroup(\"doodleSprite\").getSprites()[0]);\r\n\t\tinitControls(doodleSprite);\r\n\t\tinitEvents();\r\n\t}",
"public void setLevel(int level) {\n this.level = level;\n }",
"public void setLevel(int level) {\n this.level = level;\n }",
"public void incLevel(int lvl){this.Level=this.XP/(100);}",
"private void setLevel(){\n\t\tif(getD(y) <= T)\n\t\t\tlevel = \"lower\";\n\t\telse\n\t\t\tlevel = \"higher\";\n\t}",
"public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(int level) {\n if (level < 1)\n throw new IllegalArgumentException(\"Cannot be a level less than 0\");\n\n this.level = level;\n }",
"public void setLevel(int level) {\n\t\tthis.level = level;\n\t}",
"public void setLevel(int level) {\n\t\tthis.level = level;\n\t}",
"public final void setLevel(final int level) {\n\t\tthis.level = level;\n\t}",
"public void setLevel(int slot, int level, boolean update) {\r\n if (slot == HITPOINTS) {\r\n lifepoints = level;\r\n } else if (slot == PRAYER) {\r\n prayerPoints = level;\r\n }\r\n dynamicLevels[slot] = level;\r\n if (restoration[slot] != null) {\r\n int ticks = 100;\r\n if (entity instanceof Player) {\r\n if (((Player) entity).getPrayer().get(PrayerType.BERSERKER)) {\r\n ticks = 75;\r\n }\r\n }\r\n restoration[slot].restart(ticks);\r\n }\r\n if (entity instanceof Player && update) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, slot));\r\n }\r\n }",
"public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}",
"public static void setLevel(Level level) {\r\n\t\tGameplay.getInstance().setLevel(level);\r\n\t}",
"public void setLevel(Level level) {\n\t\tthis.level = level;\n\t}",
"private void initLevel () \n {\n score = 0;\n scoreVisual = score;\n level = new Level(Constants.LEVEL_01);\n cameraHelper.setTarget(level.bird);\n initPhysics();\n }",
"public void checkLevel(){\n if(score<50){\n level = 1;\n asteroidsMaxNumber = 5;\n }\n if(score>50 && level == 1){\n level = 2;\n asteroidsMaxNumber = 7;\n }\n if(score>100 && level == 2){\n level = 3;\n asteroidsMaxNumber = 10;\n }\n if(score>200 && level == 3){\n level = 4;\n asteroidsMaxNumber = 13;\n }\n if(score>350 && level == 4){\n level = 5;\n asteroidsMaxNumber = 15;\n }\n }",
"public Level(){\n\t\tlevel_image_pattern = \"default\";\n\t\t\n\t\timages = new HashMap <String, Image>();\n\t\tpickables = new ArrayList<Pickable>();\n\t\tplayer_initial_position = new int[2];\n\t\tplayer_initial_position[0] = 0;\n\t\tplayer_initial_position[1] = 0;\n\t\t\n\t\tconfig = Config.getInstance();\n\t\t\n\t}",
"private void drawSprite(int x, int y, int u, int v)\n {\n GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(STAT_ICONS);\n float f = 0.0078125F;\n float f1 = 0.0078125F;\n int i = 18;\n int j = 18;\n Tessellator tessellator = Tessellator.getInstance();\n BufferBuilder bufferbuilder = tessellator.getBuffer();\n bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);\n bufferbuilder.pos((double)(x + 0), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 0), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n tessellator.draw();\n }",
"public void setNextLevel(Level level){\r\n this.currentLevel.setNextLevel(level);\r\n }",
"public void setLevel(int aLevel, Context context){\n this.level = aLevel;\n writeFile(context);\n }",
"public void loadLevel(int level)\n {\n loadTilemap(new File(\"Levels/level\" + level + \".txt\"));\n loadFrames(level);\n Rover.getRover().reset();\n }",
"public void setStaticLevel(int skill, int level, boolean update) {\r\n experience[skill] = getExperienceForLevel(staticLevels[skill] = dynamicLevels[skill] = level);\r\n if (entity instanceof Player && update) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, skill));\r\n }\r\n }",
"public void setStaticLevel(int skill, int level) {\r\n setStaticLevel(skill, level, true);\r\n }",
"public void setLevel(String level){\n\t\tthis.level = level;\n\t}",
"public void setLevel(String value) {\n this.level = value;\n }",
"public void setScalePosition(int level) throws RemoteException, IllegalParamException {\n io.scaleRMI(number, level);\n }",
"public void setLevel(int level) {\r\n\t\tthis.level = Math.max(0, level);\r\n\t}",
"public Level()\n {\n //Initialise Tile Types\n try \n {\n //Dynamically assign texture paints\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/surface.jpg\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/rover.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/rock.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/mineral.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/target.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/warning.png\")), tile));\n } catch(FileNotFoundException fnfe) {\n System.out.println(\"ERROR: Invalid texture paint, file not found\" + fnfe);\n }\n catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }",
"public abstract void setForceLevel(int level);",
"void createNewLevel(int level);",
"public void setSprite(Sprite sprite_)\n\t{\n\t\tsprite=sprite_;\n\t}",
"public void setLevel(String newLevel) {\n level = newLevel;\n }",
"public Level(String levelToEdit)\r\n\t{\r\n\t\tmakeCommonObjects();\r\n\t\tgrid = new Grid(levelToEdit);//CHANGE GRID COORDINATES WHILE MAKING A NEW LEVEL\r\n\t\tmakeButton = new GameSprite(Player.filename);\r\n\t\tmakeButton.setPosition(0,0);\r\n\t\tplayer = new Player(100, 420);\r\n\t\tbackground = new Background(1, grid);\r\n\t}",
"public void level1() {\n\t\tlevel = new Level(1); //Create Level object, passing 1 to constructor for level 1\n\t\tplayer = new Player(100, 100); //Set player y position); //Create player object, place in middle of screen, position will later be determined by level png\n\t}",
"public Builder setLevel(int value) {\n bitField0_ |= 0x00000002;\n level_ = value;\n \n return this;\n }",
"public void setLevel(int level) {\n filename = evaluate(getLat(), getLon(), level);\n }",
"private void level3() {\n // level 0.3\n levelBlock.moveTo(0, 400);\n levelBlock.setScaleX(200 / levelBlock.getUnscaledWidth());\n levelBlock.setScaleY(200 / levelBlock.getUnscaledHeight());\n// levelBlock.setAlpha((float).001);\n level.addChild(levelBlock);\n\n levelBlock2.moveTo(300, 400);\n levelBlock2.setScaleX(200 / levelBlock.getUnscaledWidth());\n levelBlock2.setScaleY(200 / levelBlock.getUnscaledHeight());\n level.addChild(levelBlock2);\n\n levelBlock3.moveTo(600, 400);\n levelBlock3.setScaleX(400 / levelBlock.getUnscaledWidth());\n levelBlock3.setScaleY(200 / levelBlock.getUnscaledHeight());\n level.addChild(levelBlock3);\n\n crystal1.setPosition(new Point(levelBlock.getHitbox().x + levelBlock.getHitbox().width, 500));\n crystal1.setAlpha((float) .1);\n crystal1.setScaleX(.55);\n crystal1.setScaleY(.6);\n level.addChild(crystal1);\n\n crystal2.setPosition(new Point(levelBlock2.getHitbox().x + levelBlock2.getHitbox().width, 500));\n crystal2.setAlpha((float) .1);\n crystal2.setScaleX(.55);\n crystal2.setScaleY(.6);\n level.addChild(crystal2);\n\n ash.setPosition(new Point(\n crystal1.getPosition().x,\n crystal1.getPosition().y - 70)\n );\n ash.setAlpha((float) .21);\n ash.setScaleX(.55);\n level.addChild(ash);\n\n ash2.setPosition(new Point(\n crystal2.getPosition().x,\n crystal2.getPosition().y - 70)\n );\n ash2.setAlpha((float) .21);\n ash2.setScaleX(.55);\n level.addChild(ash2);\n\n beaconA.moveTo(levelBlock.getHitbox().x + levelBlock.getHitbox().width - 60,\n levelBlock.getHitbox().y - beaconA.getUnscaledHeight());\n level.addChild(beaconA);\n\n beaconB.moveTo(levelBlock2.getHitbox().x + levelBlock2.getHitbox().width - 125,\n levelBlock2.getHitbox().y - beaconA.getUnscaledHeight());\n level.addChild(beaconB);\n\n entrance.moveTo(10, 400 - entrance.getUnscaledHeight() * entrance.getGlobalScaleY());\n entrance.setAlpha((float) 0.4);\n level.addChild(entrance);\n\n exit.setAlpha((float) 0.4);\n exit.moveTo(800 - exit.getUnscaledWidth() * exit.getGlobalScaleX() - 20,\n 400 - entrance.getUnscaledHeight() * entrance.getGlobalScaleY());\n level.addChild(exit);\n\n echoes.addChild(echoA);\n echoes.addChild(echoB);\n }",
"public void setMipLevel(int level) {\r\n if (mipLevel != level) {\r\n synchronized (bitmaps) {\r\n if (getDrawable() != null && ((BitmapDrawable) getDrawable()).getBitmap() != null) {\r\n if (!((BitmapDrawable) getDrawable()).getBitmap().isRecycled())\r\n ((BitmapDrawable) getDrawable()).getBitmap().recycle();\r\n bitmaps.remove(((BitmapDrawable) getDrawable()).getBitmap());\r\n super.setImageBitmap(null);\r\n }\r\n this.mipLevel = Math.max(0, Math.min(level, mipLevels - 1));\r\n }\r\n }\r\n }",
"private void setEliteMobLevel(int newLevel) {\n if (newLevel < 1)\n newLevel = 1;\n this.eliteMobLevel = newLevel;\n }",
"public void setActiveLevel(PlayerLevel toSet){\r\n\t\tthis.activeLevel = toSet;\r\n\t}",
"public void setCurrentLevel(Level level){\r\n currentLevel = level;\r\n currentLevel.setObserver(this);\r\n }",
"public void setItemLevel(int level) { this.level = level; }",
"public void setLevel(String level) {\n this.level = level;\n }",
"public void setLevel(String level) {\n this.level = level;\n }",
"public void setLevel ( int level ) {\n\t\texecute ( handle -> handle.setLevel ( level ) );\n\t}",
"public void startLevel(LevelLoader level) {\r\n\t\tslots = new HashMap<Integer, ItemSlot>();\r\n\t\tfor (int i = 0; i < player.getInventory().getItemSlots().size(); i++) {\r\n\t\t\tItemSlot slot = player.getInventory().getItemSlots().get(i);\r\n\t\t\tslots.put(i, new ItemSlot(slot.getX(), slot.getY(), slot.getMax()));\r\n\t\t\tif (slot.getItem() != null)\r\n\t\t\t\tslots.get(i).add(slot.getItem(), slot.getQuantity());\r\n\t\t}\r\n\t\tplayer.setCanMove(true);\r\n\t\tif (menu != null) {\r\n\t\t\tif (menu.sound != null) {\r\n\t\t\t\tmenu.sound.stopSound();\r\n\t\t\t}\r\n\t\t\tmenu = null;\r\n\t\t}\r\n\r\n\t\tif (level != null) {\r\n\t\t\tif (level.bg_sound != null) {\r\n\t\t\t\tlevel.bg_sound.stopSound();\r\n\t\t\t}\r\n\t\t\tthis.level = null;\r\n\t\t}\r\n\r\n\t\tthis.level = level;\r\n\t}",
"protected void restockItem(int x){\r\n this.level += x;\r\n }",
"public Builder setLevel(int value) {\n bitField0_ |= 0x00000001;\n level_ = value;\n \n return this;\n }",
"public void setLevel(int slot, int level) {\r\n setLevel(slot, level, true);\r\n }",
"public void setLevel(double amt) {\n\t\tlevel += amt;\n\t}",
"public MiniBossLevel() {\r\n super(\"background_final.png\");\r\n setStatDisplay();\r\n generateWorld(world);\r\n }",
"void levelanzeigen(){\n if(level==levelold){\n //TODO HARDWARE this.systeminterface.tab.setcolor(255,0,0);\n //TODO HARDWARE this.systeminterface.ledFeld.zahl(0,2,level);\n }else{\n //TODO HARDWARE this.systeminterface.ledFeld.setcolor(0,0,0);\n //TODO HARDWARE this.systeminterface.ledFeld.zahl(0,2,levelold);\n //TODO HARDWARE this.systeminterface.ledFeld.setcolor(255,0,0);\n //TODO HARDWARE this.systeminterface.ledFeld.zahl(0,2,level);\n levelold=level;\n }\n //TODO HARDWARE this.systeminterface.ledFeld.show();\n //TODO HARDWARE this.systeminterface.ledFeld.setRotation(1);\n }",
"public void changeLevel(Level level) {\n if (Consts.TEST) {\n this.level = level;\n return;\n }\n\n try {\n level.validate();\n } catch (Exception e) {\n e.printStackTrace();\n level = this.level;\n }\n this.level = level;\n entities.clear();\n pacman.respawn(level.getRandomPacmanSpawn());\n // items spawnen\n for (int y = 0; y < level.getHeight(); y++) {\n for (int x = 0; x < level.getWidth(); x++) {\n if (level.getField(x, y) == MapModule.DOT)\n entities.add(new Dot(x, y));\n else if (level.getField(x, y) == MapModule.POWERUP)\n entities.add(new PowerUp(x, y));\n else if (level.getField(x, y) == MapModule.SPEEDUP)\n entities.add(new SpeedUp(x, y));\n else if (level.getField(x, y) == MapModule.TELEPORT)\n entities.add(new Teleporter(x, y));\n }\n }\n\n // 4 Geister im normalen Spiel, 1 Geist fuer Tests\n for (int i = 0; i < (Consts.TEST ? 1 : Consts.NUM_GHOSTS); i++) {\n Ghost g = new Ghost(i);\n g.respawn(level.getNextGhostSpawn());\n entities.add(g);\n }\n }",
"public void setMemberlLevel(MemberLevel.MemberLevels mMemberlLevel) \n\t{\n\t\tthis.mMemberLevel = mMemberlLevel;\n\t\tdrawThumbnail();\n\t}",
"public void generateLevel() {\n\t\tfor (int y = 0; y < this.height; y++) {\n\t\t\tfor (int x = 0; x < this.width; x++) {\n\t\t\t\tif (x * y % 10 < 5)\n\t\t\t\t\ttiles[x + y * width] = Tile.GRASS.getId();\n\t\t\t\telse\n\t\t\t\t\ttiles[x + y * width] = Tile.STONE.getId();\n\t\t\t}\n\t\t}\n\t}",
"private void setSpritesPosition()\r\n\t{\r\n\t\tfloat w = Gdx.graphics.getWidth();\r\n\t\tfloat h = Gdx.graphics.getHeight();\r\n\t\t\r\n\t\tsetX(camera.position.x-camera.viewportWidth/2 + 0.1f * camera.viewportWidth/2);\r\n\t\tsetY(camera.position.y + camera.viewportHeight/2 - 0.15f*w/h* camera.viewportHeight/2);\r\n\t\theroHealth.setX(getX());\r\n\t\theroHealth.setY(getY());\r\n\t\t\r\n\t\tcover.setX(getX() + 10f/270f * heroHealth.getWidth());\r\n\t\tcover.setY(getY());\r\n\t\t\r\n\t}",
"@Override\n public void Run() {\n\n DrawSprite(\"pic\", 10, \"sprite/ch1\", new Rect(0, 100, 200, 300)).Show();\n DrawSprite(\"pic\", 11, \"sprite/ch2\", new Rect(100, 100, 300, 300)).Show();\n\n //자식이 부모보다 위에 있을수도 있고 밑에있을 수도 있어야됨.\n\n\n\n\n //Level로 설정하자\n //Level(0)Root\n //Level(1)그아래오브젝트...\n //같은레벨끼리 경쟁\n /*\n\n Level(0)기준\n -(아래로)\n\n */\n }",
"static public void setLevel( byte level ) {\n Debug.level=level;\n }",
"protected abstract void applyLevel(Resources res);",
"public void changeLevel(Level level) {\n gameState.setCurrentLevel(level);\n\n }",
"@Override\n\t\n\tvoid level_specific_turret_setup(){\n\t}",
"void setSelectedSpriteValue(int value);",
"public void startSpecifiedLevel(int level) {\n if (level >= 1 && level <= 3) {\n setLevel(level);\n startGame();\n }\n }",
"public void setLevel(Level mLevel) {\n this.level = mLevel;\n level.increaseChamberCount();\n }",
"public void setLevel(final String level) {\n setAttribute(ATTRIBUTE_LEVEL, level);\n }",
"public void setLevel(Long value) {\r\n setAttributeInternal(LEVEL, value);\r\n }",
"private void prepareLevel(){\n levelAnimation = true;\n\n // Reset the menace level\n menaceInterval = 1200;\n\n // Here we will initialize all the game objects\n // Make a new player space ship\n defender = new Defender(context, PlayableX, PlayableY, ExcessX);\n\n // Prepare the players bullet\n bullet = new Bullet(context, PlayableX, PlayableY, (float) 1.2);\n\n // Initialize the invadersBullets array\n for(int i = 0; i < invadersBullets.length; i++){\n invadersBullets[i] = new Bullet(context, PlayableX, PlayableY, (float) 0.80);\n }\n\n // Build an army of invaders\n numInvaders = 0;\n for(int column = 0; column < invadersColumn; column ++ ){\n for(int row = 0; row < invadersRow; row ++ ){\n invaders[numInvaders] = new Invader(context, row, column, PlayableX, PlayableY, ExcessX);\n numInvaders ++;\n }\n }\n invadersLeft = numInvaders;\n\n try {\n // Create objects of the 2 required classes\n AssetManager assetManager = context.getAssets();\n explosionEffect = new Bitmap[12];\n for (int i=0; i < 12; i++) {\n explosionEffect[i] = Bitmap.createScaledBitmap(BitmapFactory.decodeStream(assetManager.open(\"explosion/\" + (i + 1) + \".png\")), (int) (invaders[0].getLength()*1.75), (int) (invaders[0].getLength()*1.75), true);\n }\n } catch (IOException e) {\n e.printStackTrace();\n // Print an error message to the console\n Log.e(\"error\", \"failed to load explosion effect image files\");\n }\n\n }",
"@Override\n public void init() {\n GetSprite(\"/images/bullet.png\");\n MusicUtils.StopASounds(\"/music/Laser_Shoot.wav\");\n Level().play(\"/music/Laser_Shoot.wav\");\n }",
"public Builder setLevel(int value) {\n bitField0_ |= 0x00000008;\n level_ = value;\n onChanged();\n return this;\n }",
"@Override\n public void upgrade(int level){\n System.out.println(\"Level adfasdfasdf: \" + level);\n System.out.println(getLevel());\n\n if(level > 5) level = 5;\n\n if(level > 1){\n for (int i = 1; i < level; i++) levelUp();\n }\n\n /*\n //System.out.println(\"\\n-------\");\n //System.out.println(\"Se va a aumentar: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n\n double percentage = growth(level);\n\n setHealth((int) (getHealth() + getHealth() * percentage));\n strokePerTime = (int) (strokePerTime + strokePerTime * percentage);\n\n // Aumenta el rango si el nivel es 3 o 5\n // Luego quedan muy rotos xD\n if (level % 2 != 0) range++;\n\n //System.out.println(\"resultado: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n //System.out.println(\"-------\\n\");*/\n }",
"public void setLevel(Level level) throws SQLException\r\n\t{\r\n\t\tif (level == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString SQL_USER = \"UPDATE user SET level =? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setString(1, level.name());\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setLevel(Level \"+ level.name() + \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"@Override\n\tpublic void setLevelNumber(int i) {\n\t\tnumLevel =i;\n\t}",
"public void\t\t\t\t\t\t\tincreaseLevel()\t\t\t\t\t\t\t\t{ this.currentLevel += 1; }"
] | [
"0.7011013",
"0.69330883",
"0.683288",
"0.6813023",
"0.67816436",
"0.6773782",
"0.667888",
"0.6638715",
"0.66318655",
"0.65560246",
"0.6544203",
"0.65336776",
"0.652142",
"0.65097076",
"0.6483534",
"0.64641076",
"0.645861",
"0.644931",
"0.6442073",
"0.64386845",
"0.64057744",
"0.640488",
"0.6402951",
"0.63858306",
"0.63732415",
"0.63732415",
"0.62922156",
"0.62560105",
"0.6243767",
"0.6225784",
"0.6225784",
"0.6225784",
"0.6225784",
"0.6225784",
"0.6214781",
"0.62104416",
"0.62104416",
"0.6209754",
"0.62045085",
"0.6200162",
"0.6136322",
"0.6082286",
"0.6060354",
"0.60339046",
"0.600832",
"0.60053164",
"0.600034",
"0.59919584",
"0.59903944",
"0.5981322",
"0.5980284",
"0.5962621",
"0.59614414",
"0.59526664",
"0.59507436",
"0.5926208",
"0.59243524",
"0.59215474",
"0.5916688",
"0.589814",
"0.58929217",
"0.5884154",
"0.5882898",
"0.5872829",
"0.5864708",
"0.5863607",
"0.58594424",
"0.585608",
"0.5851147",
"0.58338106",
"0.5832382",
"0.5832382",
"0.5804282",
"0.5798737",
"0.57958907",
"0.57935214",
"0.57912844",
"0.57911855",
"0.5767186",
"0.57655",
"0.57644635",
"0.5748737",
"0.5748292",
"0.57481474",
"0.5737401",
"0.57357997",
"0.57267356",
"0.5726078",
"0.57248133",
"0.5685302",
"0.56838375",
"0.5679282",
"0.5662496",
"0.56602335",
"0.5658673",
"0.56525975",
"0.56505233",
"0.565001",
"0.56451064",
"0.5643935",
"0.56404346"
] | 0.0 | -1 |
This method reposition the sprite to it's spawn location | public void frogReposition() {
setY(FrogPositionY);
setX(FrogPositionX);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void respawn(Vector2 spawnPos){\n position.x = spawnPos.x;\n position.y = spawnPos.y;\n }",
"void ship_respawn() {\n ship.resetPosition();\n ship_image_view.setX(ship.x_position); // Update the ship image position\n }",
"final protected void setSpawnPosition(int newX, int newY)\n {\n spawnPoint = new Point(newX, newY);\n boundingBox.setLocation(spawnPoint);\n }",
"public void sprite() {\n\t\tspr.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = spr;\n\t}",
"void moveToSprite(Sprite s) {\n _x = s._x;\n _y = s._y;\n }",
"private void setSpritesPosition()\r\n\t{\r\n\t\tfloat w = Gdx.graphics.getWidth();\r\n\t\tfloat h = Gdx.graphics.getHeight();\r\n\t\t\r\n\t\tsetX(camera.position.x-camera.viewportWidth/2 + 0.1f * camera.viewportWidth/2);\r\n\t\tsetY(camera.position.y + camera.viewportHeight/2 - 0.15f*w/h* camera.viewportHeight/2);\r\n\t\theroHealth.setX(getX());\r\n\t\theroHealth.setY(getY());\r\n\t\t\r\n\t\tcover.setX(getX() + 10f/270f * heroHealth.getWidth());\r\n\t\tcover.setY(getY());\r\n\t\t\r\n\t}",
"private void updatePosition (Coordinate newPosition) {\n centerX = newPosition.x;\n centerY = newPosition.y;\n\n atomSpriteBoundary.left = centerX - spriteLength/2;\n atomSpriteBoundary.right = centerX + spriteLength/2;\n atomSpriteBoundary.top = centerY - spriteHeight/2;\n atomSpriteBoundary.bottom = centerY + spriteHeight/2;\n }",
"public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }",
"public void updateSprites() {\n this.model.getSprites().values().forEach(x -> x.setPosition(this.x, this.y));\n }",
"public void setSpawnLocation(Location spawnLocation) {\n this.spawnLocation = spawnLocation;\n }",
"protected void warp() {\n\t\tRandom r = new Random();\n\t\t\n\t\t// Get random index from coordinates list\n\t\tint nextPos = r.nextInt(this.coords.length);\n\t\t\n\t\t// Set new position for monster\n\t\tthis.setBounds(this.coords[nextPos].width, this.coords[nextPos].height, mWidth, mHeight);\n\t\t\n\t\tthis.setVisible(true);\n\t}",
"public void resetPlayerPosition() {\n\t\tthis.tilePositionX = this.STARTING_X;\n\t\tthis.tilePositionY = this.STARTING_Y;\n\t}",
"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 }",
"PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }",
"public void setSpawn (int x, int y) {\n xCord = x;\n yCord = y;\n }",
"public void setSpawnY(int y)\n {\n spawnY = y;\n }",
"private void updatePosition (float newCenterX, float newCenterY) {\n centerX = newCenterX;\n centerY = newCenterY;\n\n atomSpriteBoundary.left = centerX - spriteLength/2;\n atomSpriteBoundary.right = centerX + spriteLength/2;\n atomSpriteBoundary.top = centerY - spriteHeight/2;\n atomSpriteBoundary.bottom = centerY + spriteHeight/2;\n }",
"public void setSpawnPoint() {\n if (this.dirVec.y == 0) {\n super.centerRectAt(new Point(-1*OUTER_OFFSET, super.getCenter().y));\n }\n else {\n super.centerRectAt(new Point(super.getCenter().x, OUTER_OFFSET));\n }\n }",
"public void setSpawnY(int spawnY) \n\t{\n\t\tthis.spawnY = spawnY;\n\t}",
"public Transition(Point position, MapScreen screen, Point spawn) {\n\t\tsuper(position);\n\t\tnewScreen = screen;\n\t\tthis.spawn = spawn;\n\t}",
"private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\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 move() {\n\t\t\tx += Math.PI/12;\n\t\t\thead.locY = intensity * Math.cos(x) + centerY;\n\t\t\thead.yaw = spinYaw(head.yaw, 3f);\n\t\t\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, head.getId(), \n\t\t\t\tnew Location(player.getWorld(), head.locX, head.locY, head.locZ, head.yaw, 0));\n\t\t}",
"public void moveBoss() {\n\t\tdouble position = boss.getTranslateY();\n\t\tspeed = Math.random()*30;\n\t\tif(position > 600-70) {\n\t\t\tRandom r = new Random();\n\t\t\tboss.setTranslateY(-6);\n\t\t\tboss.setTranslateX(r.nextInt(900));\n\t\t}else {\n\t\tboss.setTranslateY(position + speed);\n\t\t}\n\t}",
"public void reposition(float x) {\r\n posTopTube.set(x, rand.nextInt(FLUCT) + TUBE_GAP + LOWEST_OPENING);\r\n posBotTube.set(x, posTopTube.y - TUBE_GAP - botTube.getHeight());\r\n\r\n boundsTop.setPosition(posTopTube.x, posTopTube.y);\r\n boundsBot.setPosition(posBotTube.x, posBotTube.y);\r\n }",
"@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 move(){\n super.move();\n load.updateCoordinates(this.x,this.y);\n }",
"@Override\r\n\tpublic void move()\r\n\t{\r\n\t\t//Updates the X and Y position by using dx and dy\r\n float x = location.getX() + dx;\r\n float y = location.getY() + dy;\r\n \r\n //Updates the particle emitter's position to the missiles current position\r\n emitter.setPosition(this.getPositionX(), this.getPositionY(),false);\r\n \r\n //Updates the location of the missile\n setLocation(x, y);\n\t}",
"public void setPosition(float x, float y) {\n internalGroup.setPosition(x, y);\n dataTrait.x = x;\n dataTrait.y = y;\n resetSprite();\n }",
"@Override\r\n\tpublic void spawn(Location location) {\n\t\t\r\n\t}",
"public void bomb() {\n\t\tbomb.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = bomb;\n\t}",
"@Override\n\tpublic void spawn(Location loc) {\n\t\t\n\t}",
"public void setSpawn(Location loc) {\n if (loc != null) {\n spawn = new ImmutableSimpleLocation(loc);\n }\n }",
"@Override\n\tpublic void move() {\n\t\theading = Heading.randHeading();\n\t\tif (heading == Heading.NORTH) {\n\t\t\tthis.location.y -= Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t} else if (heading == Heading.EAST) {\n\t\t\tthis.location.x += Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t} else if (heading == Heading.SOUTH) {\n\t\t\tthis.location.y += Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t} else if (heading == Heading.WEST) {\n\t\t\tthis.location.x -= Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t}\n\t\tadjustPos();\n\t\tinfect();\n\t}",
"private void movePlayer() {\r\n\t\tshipImageView.setX(ship.getCurrentLocation().x * scalingFactor);\r\n\t\tshipImageView.setY(ship.getCurrentLocation().y * scalingFactor);\r\n\t\tship.notifyObservers();\r\n\t}",
"public void move(){\n\t\t\tbx += (int)movex;\n\t\t\tby += (int)movey;\n\t\t\tthis.setBounds((int)bx,(int)by,10,10);\n\n\t\t\t\n\t\t}",
"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 }",
"public void setSpawnX(int x)\n {\n spawnX = x;\n }",
"public void change_hero_pos() {\n\t\tif (labirinto.getLab()[heroi.getX_coord()][heroi.getY_coord()] == 'O')\n\t\t\theroi.setShielded(true);\n\t\tif (heroi.isArmado())\n\t\t\tlabirinto.setLabCell(heroi.getX_coord(), heroi.getY_coord(), 'A');\n\t\telse\n\t\t\tlabirinto.setLabCell(heroi.getX_coord(), heroi.getY_coord(), 'H');\n\t}",
"public void updatePosition()\r\n\t{\r\n\t\tsuper.updatePosition();\r\n\t\t\r\n\t\t// Update the bomb's position\r\n\t\tPoint nextPosition = getPath().getLocation(t++);\r\n\t\tsetX(nextPosition.x + startX);\r\n\t\tint nextY = nextPosition.y + startY;\r\n\t\tsetY(nextY);\r\n\t\t\r\n\t\t// Blow the bomb up after it reaches mid screen\r\n\t\tif (t > 120 || (nextY < (Global.WINDOW_HEIGHT >> 1) && t > 30))\r\n\t\t{\r\n\t\t\tbombSound.stop();\r\n\t\t\tsuper.remove();\r\n\t\t\tGamePanel.makeExplosion(getX(), getY());\r\n\t\t\t\r\n\t\t\t// Injure all the enemies on the screen\r\n\t\t\t\r\n\t\t\tArrayList<Sprite> sprites = GamePanel.getSprites();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < sprites.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif (sprites.get(i) instanceof Enemy)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy enemy = (Enemy) sprites.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint currentYTop = GamePanel.getLevel().getCurrentY() +\r\n\t\t\t\t\t\tBLOCKS_PER_Y - 1;\r\n\t\t\t\t\tboolean visibleX = enemy.getX() + enemy.getWidth() >= 0 &&\r\n\t\t\t\t\t\tenemy.getX() <= Global.WINDOW_WIDTH;\r\n\t\t\t\t\tboolean yOnScreen = enemy.getY() <= Global.WINDOW_HEIGHT +\r\n\t\t\t\t\t\t100;\r\n\t\t\t\t\tboolean visibleY = enemy.getYBlock() >= currentYTop &&\r\n\t\t\t\t\t\tyOnScreen;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visibleX && visibleY && enemy.isAlive())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tenemy.offsetHealth(-300);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (enemy.getHealth() <= 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tenemy.remove();\r\n\t\t\t\t\t\t\tGamePanel.offsetNumLevelPoints(100);\r\n\t\t\t\t\t\t\tGamePanel.makeExplosion(enemy.getX(), enemy.getY());\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}\r\n\t}",
"Spawn(LatLng position) {\n this.position = position;\n return;\n }",
"@Override\n public void relocatedWithinBounds() {\n x = random.nextInt(maxX - width);\n y = random.nextInt(maxY - height);\n }",
"@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}",
"private void placeShip() {\r\n\t\t// Expire the ship ship\r\n\t\tParticipant.expire(ship);\r\n\r\n\t\tclipShip.stop();\r\n\r\n\t\t// Create a new ship\r\n\t\tship = new Ship(SIZE / 2, SIZE / 2, -Math.PI / 2, this);\r\n\t\taddParticipant(ship);\r\n\t\tdisplay.setLegend(\"\");\r\n\t}",
"void setPosition(double xPos, double yPos);",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }",
"public void teleportPlayer(int x, int y){\n hero.setX(x);\n hero.setY(y);\n }",
"public void updatePosition() {\n \t\r\n \tx += dx;\r\n \ty += dy;\r\n \t\r\n\t}",
"public default void setSpawnPosition(SpellData data, LivingEntity casterIn){ }",
"public void respawn(int x, int y)\r\n\t{\r\n\t\tavatar.setX(x);\r\n\t\tavatar.setY(y);;\r\n\t\tavatar.setLives(Avatar.getLives()-1);\r\n\t}",
"public void refreshPosition() {\n\n this.setTransform(getTransform());\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}",
"@Override\n\tpublic void update() {\n\t\tposX -= ninja.getSpeedX();\n\t\t\n\t}",
"void turnToSprite(Sprite s) {\n turnToPoint(s._x, s._y);\n }",
"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 setPosition(float x, float y){\n\t\t\n\t\tsprite.setPosition(x, y);\n\t}",
"public void move() {\n\t\t// Override move so we don't move, then get location set by owner.\n\t}",
"public void setRespawnPoint (float x, float y) {\n\t\trespawnX = x;\n\t\trespawnY = y;\n\t}",
"public void act() \n {\n move(-16);\n \n \n if (isAtEdge())\n {\n setLocation(700,getY());\n }\n \n if (isTouching(Shots.class))\n {\n getWorld().addObject(new SpaceObject(), 500,Greenfoot.getRandomNumber(400));\n }\n \n }",
"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 }",
"private void reposition(){\n int lastBackgroundIndex = firstBackgroundIndex-1;\n if(firstBackgroundIndex == 0){\n lastBackgroundIndex = backgrounds.length-1;\n }\n backgrounds[firstBackgroundIndex].getPosition().x = backgrounds[lastBackgroundIndex].getPosition().x + drawingWidth;\n firstBackgroundIndex = (firstBackgroundIndex+1) % backgrounds.length;\n }",
"@Override\n public void update(){\n getNextPosition();\n checkTileMapCollision();\n setPosition(xtemp, ytemp);\n animation.update();\n }",
"private void setSpawnLocation(Object packet, Vector location, String xName, String yName, String zName) {\n ReflectUtils.setField(packet, xName, location.getX());\n ReflectUtils.setField(packet, yName, location.getY());\n ReflectUtils.setField(packet, zName, location.getZ());\n }",
"public void setOriginalLocation() {\r\n for (int i = 0; i < this.enemies.size(); i++) {\r\n Point originalPoint = this.startLocations.get(i);\r\n this.enemies.get(i).setLocation(originalPoint);\r\n }\r\n }",
"public void moveViewTo(int newX, int newY) {\n int scaledWidth = (int) (TileDataRegister.TILE_WIDTH * scale);\n int scaledHeight = (int) (TileDataRegister.TILE_HEIGHT * scale);\n int baseX = (int) (map.getWidth() * TileDataRegister.TILE_WIDTH * scale) / 2;\n\n int x = baseX + (newY - newX) * scaledWidth / 2;\n x -= viewPortWidth * 0.5;\n\n int y = (newY + newX) * scaledHeight / 2;\n y -= viewPortHeight * 0.5;\n\n targetXOffset = -1 * x;\n targetYOffset = -1 * y;\n\n doPan = true;\n\n gameChanged = true;\n }",
"public void setPosition(float x, float y);",
"public void resetRobotPositionOnUI() {\r\n\t\tthis.x = checkValidX(1);\r\n\t\tthis.y = checkValidY(1);\r\n\t\ttoggleValid();\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t\t\r\n\t}",
"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\tpublic void respawn() {\n\t\tbounds.x = OmniWorld.SpawnX;\n\t\tbounds.y = OmniWorld.SpawnY;\n\t\tHP = MaxHP;\n\t\tisDead = false;\n\t\tstateTime = 0;\n\t}",
"public void pointToSprite(Sprite target) {\n pointToXY((int)target.pos.x,(int)target.pos.y);\n }",
"public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}",
"public void act() \n {\n setLocation(getX() + Hur_Speed, getY());\n }",
"void setPos(float x, float y);",
"public void control(Spawn spawn) {}",
"public void move() {\n super.move(DIRECTION.getRandom());\n }",
"public void moveRobber(HexLocation loc) {\n\n\t}",
"public void redoMove(){\n circleObj.setX(newX);\n circleObj.setY(newY);\n }",
"void setPosition(Tile t);",
"public void Move()\n {\n this.x += this.speed;\n\n //Cutoff the position\n if (this.x <= 2)\n {\n this.x = 2;\n }\n else if (this.x >= GameConstants.SCREEN_WIDTH - 2 * this.imageWidth)\n {\n this.x = GameConstants.SCREEN_WIDTH - 2 * this.imageWidth;\n }\n }",
"void spawnEntityAt(String typeName, int x, int y);",
"public void setSpawnX(int spawnX) \n\t{\n\t\tthis.spawnX = spawnX;\n\t}",
"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 }",
"public void movePawn(Pawn p) {\n pawn = new Pawn(p);\n p.removePawn();\n }",
"public void setSpawn(boolean spawn) {\r\n this.spawn = spawn;\r\n }",
"public void place(Position position) { this.position = position; }",
"public void resetPaddleToStartingPosition(){\n myRectangle.setX(initialXLocation);\n }",
"public void MoveTileSelf(Integer position){\n /**\n * if opponent activated confusion - move to a random tile\n */\n if(confused){\n //random tile for confusion\n Integer tile;\n do{\n Integer tile1 = returnRandom(getNthDigit(position,1)-1,getNthDigit(position,1)+2);\n Integer tile2 = returnRandom(getNthDigit(position,2)-1,getNthDigit(position,2)+2); // between 0 and 2\n tile = Integer.parseInt(tile1.toString() + tile2.toString());\n }while (tile==myTile || tile==opponentTile || getNthDigit(tile,1)<1 || getNthDigit(tile,1)>7 || getNthDigit(tile,2)<1 || getNthDigit(tile,2)>7);\n position = tile;\n showTimedAlertDialog(\"You are confused!\", \"moving at a random direction\", 5);\n confused = false;\n }\n\n /**\n * send message to opponent\n */\n MultiplayerManager.getInstance().SendMessage(position.toString());\n\n if(!is_debug){\n HandleLejos(myTile, position);\n }\n\n ImageView player1 = findImageButton(\"square_\"+position.toString());\n ImageView player1_old = findImageButton(\"square_\"+myTile.toString());\n player1.setImageDrawable(getResources().getDrawable(R.drawable.tank_blue));\n player1_old.setImageDrawable(getResources().getDrawable(android.R.color.transparent));\n myTile = position;\n myTurn = false;\n turnNumber = turnNumber + 1;\n }",
"public void goToSprite(Sprite target) { \n goToXY(target.pos.x,target.pos.y);\n }",
"public void setMazeSprite(Sprite mazeSprite)\n {\n this.mazeSprite = mazeSprite;\n\n //mazeFrameWidth = frameWidth;\n //mazeFrameHeight = frameHeight;\n }",
"public void startExecuting() {\n\t\t\tRandom random = this.parentEntity.getRNG();\n\t\t\tdouble d0 = this.parentEntity.posX + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tdouble d1 = this.parentEntity.posY + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tdouble d2 = this.parentEntity.posZ + (double)((random.nextFloat() * 2.0F - 1.0F) * 16.0F);\n\t\t\tthis.parentEntity.getMoveHelper().setMoveTo(d0, d1, d2, 0.3D);\n\t\t}",
"private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}",
"@Override\n\tpublic void enter() {\n\t\t//Update dimensions\n\t\tattachedTo.setWidth(20);\n\t\tattachedTo.setHeight(20);\n\t\t\n\t\t//set image of player to overworld image\n\t\tattachedTo.setShape(new Ellipse2D.Double(), Color.green);\n\t\tattachedTo.updateShape();\n\t\t\n\t\t\n\t\t//Set the sprite to testspritesheet (until image for overworld state is made)\n\t\t//Now sets the sprite to a test spritesheet\n\t\tattachedTo.setSprite(Directory.spriteLibrary.get(\"HeroOverworld\"));\n\t\t\n\t\t//Queue up an animation of row 0 in spritesheet to repeat\n\t\tattachedTo.getSprite().queueAnimation(0, false);\n\t\t\n\t\t//Start timing movement by getting previous time\n\t\tpreviousTime = System.currentTimeMillis();\n\t}",
"public void setPosition(Point position){\r\n this.position.set(position.x, position.y);\r\n\r\n this.shadow.setPosition(position);\r\n this.surface.setPosition(position);\r\n this.shading.setPosition(position);\r\n\r\n\r\n this.setBounds(new Rect(\r\n this.position.x - this.radius,\r\n this.position.y - this.radius,\r\n this.position.x + this.radius,\r\n this.position.y + this.radius\r\n ));\r\n \r\n }",
"public void act() \n {\n // Add your action code here.\n \n //setRotation();\n setLocation(getX(),getY()+2);\n movement();\n \n }",
"public void moveTo(Actor actor, Location newLocation)\n\t {\n\t\t \t//creating the variables to make the code easier to read\n\t\t \tGrid<Actor> grid = actor.getGrid();\n\t\t \tLocation location = actor.getLocation();\n\t\t \n\t if (grid == null)\n\t throw new IllegalStateException(\"This actor is not in a grid.\");\n\t if (grid.get(location) != actor)\n\t throw new IllegalStateException(\n\t \"The grid contains a different actor at location \"\n\t + location + \".\");\n\t if (!grid.isValid(newLocation))\n\t throw new IllegalArgumentException(\"Location \" + newLocation\n\t + \" is not valid.\");\n\n\t if (newLocation.equals(location))\n\t return;\n\t \n\t //this line below was added\n\t actor.removeSelfFromGrid();\n\t //changed the code slightly to make sure now that not being called from within the actor that we refer to the\n\t //actor itself when removing and placing actor on grid\n\t //grid.remove(location);\n\t Actor other = grid.get(newLocation);\n\t if (other != null)\n\t other.removeSelfFromGrid();\n\t location = newLocation;\n\t actor.putSelfInGrid(grid, location);\n\t //grid.put(location, actor);\n\t }",
"public void moveActor();",
"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 }",
"Tile getPosition();",
"public void SetPosition(Vector2 position)\n\t{\n\t\tTransform transform = parent.transform;\n\t\ttransform.position = position;\n\t\t// Dont loose your dP!\n\t\tpreviousPosition = Vector2.Add(position,velocity.negate());\n\t}",
"public void moveLeft() {\r\n speedX = -6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/leftWalk1.png\");\r\n img = new Sprite (r1);\r\n }"
] | [
"0.7526972",
"0.6915623",
"0.6900574",
"0.6867881",
"0.6746487",
"0.6560797",
"0.64923656",
"0.6489056",
"0.64331454",
"0.64232135",
"0.64059675",
"0.6397656",
"0.63733613",
"0.63157976",
"0.6288064",
"0.62787676",
"0.6248798",
"0.6204451",
"0.6190968",
"0.6167969",
"0.6146561",
"0.61372787",
"0.60933375",
"0.60907143",
"0.60889244",
"0.60806465",
"0.60750073",
"0.602683",
"0.60220706",
"0.6016835",
"0.5990931",
"0.598316",
"0.59700763",
"0.5955242",
"0.59425795",
"0.59358937",
"0.5931825",
"0.5929658",
"0.592919",
"0.5922481",
"0.59213054",
"0.5887563",
"0.5881957",
"0.5873737",
"0.5860499",
"0.5842003",
"0.58405524",
"0.58390164",
"0.58263844",
"0.5825563",
"0.5823223",
"0.5822196",
"0.5821364",
"0.5817106",
"0.58127856",
"0.5797158",
"0.57944113",
"0.5783189",
"0.57765335",
"0.5775607",
"0.5772153",
"0.57707065",
"0.57695943",
"0.5768901",
"0.57662326",
"0.57626665",
"0.5754617",
"0.57519084",
"0.5744791",
"0.57355404",
"0.57317543",
"0.57123584",
"0.5710359",
"0.57061416",
"0.57013834",
"0.5699526",
"0.5698019",
"0.5685203",
"0.5674869",
"0.566374",
"0.56569064",
"0.565535",
"0.5651432",
"0.5626139",
"0.56165427",
"0.56110406",
"0.5608315",
"0.56054866",
"0.5596316",
"0.5595931",
"0.5585114",
"0.5584435",
"0.5580929",
"0.5574643",
"0.55723387",
"0.556968",
"0.556724",
"0.5564067",
"0.5554967",
"0.5554465"
] | 0.589299 | 41 |
This method display the animation of the sprite when the sprite intersect with different object Different animation will show, if intersect with different object ( water or car) | public void frogDeath(long now, String type) {
String car = "car";
String water = "water";
death = true;
final Image[] cardeath = new Image[4];
cardeath[0] = new Image("file:src/main/resources/Img/cardeath1.png", FrogImgSize, FrogImgSize, true, true);
cardeath[1] = new Image("file:src/main/resources/Img/cardeath2.png", FrogImgSize, FrogImgSize, true, true);
cardeath[2] = new Image("file:src/main/resources/Img/cardeath3.png", FrogImgSize, FrogImgSize, true, true);
cardeath[3] = new Image("file:src/main/resources/Img/cardeath3.png", FrogImgSize, FrogImgSize, true, true);
final Image[] waterdeath = new Image[4];
waterdeath[0] = new Image("file:src/main/resources/Img/waterdeath1.png", FrogImgSize, FrogImgSize, true, true);
waterdeath[1] = new Image("file:src/main/resources/Img/waterdeath2.png", FrogImgSize, FrogImgSize, true, true);
waterdeath[2] = new Image("file:src/main/resources/Img/waterdeath3.png", FrogImgSize, FrogImgSize, true, true);
waterdeath[3] = new Image("file:src/main/resources/Img/wwaterdeath4.png", FrogImgSize, FrogImgSize, true, true);
Image[] array = new Image[4];
if (type == car)
array = cardeath;
if (type == water)
array = waterdeath;
if ((now) % 15 == 0) {
this.DeathAnimationTime++;
}
if (DeathAnimationTime == 1) {
setImage(array[0]);
}
if (DeathAnimationTime == 3) {
setImage(array[1]);
}
if (DeathAnimationTime == 5) {
setImage(array[2]);
}
if (DeathAnimationTime == 7) {
setImage(array[3]);
}
if (DeathAnimationTime == 9) {
this.lives -= 1;
frogReposition();
intersectCar = false;
intersectWater = false;
this.DeathAnimationTime = 0;
setImage(frog[0]);
death = false;
addPoints(-100);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void collision(GameObjectContainer<GameObject> object) {\n \tGameObject renderObject = null;\r\n\t\tfor (int i = 0; i < object.getSize(); i++) {\r\n\t\t\trenderObject = object.iterator().next();\r\n\r\n\t\t\tif (renderObject.getType() == \"BLOCK\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"intersected\");\r\n\t\t\t\t\tthis.setTranslateY(renderObject.getTranslateY() - renderObject.getHeight());\r\n\t\t\t\t\tfalling = false;\r\n\t\t\t\t\tjump = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfalling = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (renderObject.getType() == \"NURSE\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"nurse\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}else {\r\n\t\t\t\tfalling = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n }",
"public void animate(){\n\n if (ra1.hasStarted() && ra2.hasStarted()) {\n\n// animation1.cancel();\n// animation1.reset();\n// animation2.cancel();\n// animation2.reset();\n gear1Img.clearAnimation();\n gear2Img.clearAnimation();\n initializeAnimations(); // Necessary to restart an animation\n button.setText(R.string.start_gears);\n }\n else{\n gear1Img.startAnimation(ra1);\n gear2Img.startAnimation(ra2);\n button.setText(R.string.stop_gears);\n }\n }",
"public void handle(long currentNanoTime)\n {\n double elapsedTime = (currentNanoTime - lastNanoTime.value) / 1000000000.0;\n lastNanoTime.value = currentNanoTime;\n\n\n // Lógica do Jogo\n\n darion.setVelocity(0,0);\n if (input.contains(\"LEFT\")){\n \n darion.setImage(\"darionesq.png\");\n \n darion.addVelocity(-50,0);\n \n \n } \n \n if (input.contains(\"RIGHT\")){\n darion.setImage(\"dariondir.png\");\n darion.addVelocity(50,0);\n } \n if (input.contains(\"UP\")){\n darion.setImage(\"dariontras.png\");\n darion.addVelocity(0,-50);\n } \n if (input.contains(\"DOWN\")){\n darion.setImage(\"darionfrente.png\");\n darion.addVelocity(0,50);\n } \n\n\n darion.update(elapsedTime);\n \n\n \n\n // Detecta as colisões com a lixeira\n\n Iterator<Sprite> lixoIter = lixoList.iterator();\n Iterator<Sprite> mudaIter = mudaList.iterator();\n \n while ( lixoIter.hasNext())\n {\n Sprite lixo = lixoIter.next();\n //Sprite muda = mudaIter.next();\n if ( darion.intersects(lixo))\n {\n lixoIter.remove();\n score.value++;\n s.clip_lixo.play(99);\n \n if(lixoList.isEmpty() == true){\n // define a tela de fundo e seus respectivos sons\n //darion.setImage(\"fundo2.jpg\");\n darion.setPosition(0, 0);\n s.clip.stop();\n s.clip3.stop();\n //s.clip_Parabens.play();\n s.clip_Corr.play();\n s.clip_Finale.play();\n \n Alert dialogoInfo = new Alert(Alert.AlertType.INFORMATION);\n \n dialogoInfo.setTitle(\"As Aventuras de Darion\");\n dialogoInfo.setHeaderText(\"Parabéns... Sua Pontuação foi >>>>>>>>> \"+ (100 * score.value)+\" <<<<<<<<<\");\n String version = System.getProperty(\"java.version\");\n String content = String.format(\"Parabéns !!! Você conseguiu a preservar a natureza !!!! Lembre-se devemos sempre preservar o meio ambiente, para que futuras gerações também se beneficie dos benefícios do meio ambiente !!! Para Finalizar o Jogo pressione 'ESC' !!! Para começar um novo Jogo pressione 'N' !!!\",version);\n dialogoInfo.setContentText(content);\n dialogoInfo.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n dialogoInfo.setResizable(true);\n dialogoInfo.show();\n \n \n \n ////////////////////////////////////// \n }\n\n\n }\n\n }\n while ( mudaIter.hasNext())\n {\n //Sprite lixo = lixoIter.next();\n Sprite muda = mudaIter.next();\n if ( darion.intersects(muda))\n {\n mudaIter.remove();\n score.value--;\n s.clip_Erro.play(99);\n \n\n }\n\n }\n \n \n\n\n // renderiza as atualizações\n gc.clearRect(0, 0, 700,500);\n gc.drawImage( space, 0, 0 );\n darion.render( gc );\n\n\n for (Sprite lixo : lixoList ){\n lixo.render( gc );}\n for (Sprite muda : mudaList ){\n muda.render( gc );}\n \n \n \n // cria e mostra na tela o nome e a pontuação\n String pointsText = \"Score: \" + (100 * score.value);\n gc.fillText( pointsText, 10, 81 );\n gc.strokeText( pointsText, 10, 81 );\n \n String nText = \"Novo Jogo\";\n gc.fillText( nText, 473, 39 );\n gc.strokeText( nText, 473, 39 );\n\n String Text = \"Sair\";\n gc.fillText( Text, 745, 39 );\n gc.strokeText( Text, 745, 39 );\n \n String help = \"Ajuda\";\n gc.fillText( help, 745, 91 );\n gc.strokeText( help, 745, 91 );\n\n String TituloText = \"As Aventuras de Darion\";\n gc.fillText( TituloText, 10, 39 );\n gc.strokeText( TituloText, 10, 39 );\n\n if(lixoList.isEmpty() == true){\n // define a tela de fundo e seus respectivos sons\n \n darion.setPosition(650, 230);\n \n \n String pText = \" !!!!!!! Jogo Finalizado !!!!!!\";\n gc.fillText( pText, 250, 250 );\n gc.strokeText( pText, 250, 250 );\n \n score.value=0;\n \n }\n\n }",
"public void atacar() {\n texture = new Texture(Gdx.files.internal(\"recursos/ataques.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n }\n }",
"private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }",
"void show() {\n if (!isDead) {\n for (int i = 0; i < bullets.size(); i++) {//show bullets\n bullets.get(i).show();\n }\n if (immortalityTimer >0) {//no need to decrease immortalityCounter if its already 0\n immortalityTimer--;\n }\n\n if (immortalityTimer >0 && floor(((float)immortalityTimer)/5)%2 ==0) {//needs to appear to be flashing so only show half of the time\n } else {\n\n Constants.processing.pushMatrix();\n Constants.processing.translate(this.position.x, this.position.y);\n Constants.processing.rotate(rotation);\n\n //actually draw the player\n Constants.processing.fill(0);\n Constants.processing.noStroke();\n Constants.processing.beginShape();\n int size = 12;\n\n //black triangle\n Constants.processing.vertex(-size - 2, -size);\n Constants.processing.vertex(-size - 2, size);\n Constants.processing.vertex(2 * size - 2, 0);\n Constants.processing.endShape(CLOSE);\n Constants.processing.stroke(255);\n\n //white out lines\n Constants.processing.line(-size - 2, -size, -size - 2, size);\n Constants.processing.line(2 * size - 2, 0, -22, 15);\n Constants.processing.line(2 * size - 2, 0, -22, -15);\n if (boosting) {//when boosting draw \"flames\" its just a little triangle\n boostCount--;\n if (floor(((float)boostCount)/3)%2 ==0) {//only show it half of the time to appear like its flashing\n Constants.processing.line(-size - 2, 6, -size - 2 - 12, 0);\n Constants.processing.line(-size - 2, -6, -size - 2 - 12, 0);\n }\n }\n Constants.processing.popMatrix();\n }\n }\n for (int i = 0; i < asteroids.size(); i++) {//show asteroids\n asteroids.get(i).show();\n }\n }",
"public void startAnimation(){\n if (MadBalls.isHost()) {\n for (GameObject obj: gameObjects.values()){\n if (obj instanceof Obstacle){\n for (Player player: MadBalls.getMultiplayerHandler().getPlayers()){\n if (player instanceof BotPlayer){\n player.getRelevantObjIDs().add(obj.getID());\n }\n }\n }\n }\n }\n MadBalls.getGameMode().organize();\n animation.start();\n// Navigation.getInstance().showInterupt(\"\", \"Game started\", \"Let's rock and roll!\", false);\n }",
"public abstract void collide(InteractiveObject obj);",
"private boolean detectCollisions(GameState mGaemState,ArrayList<GameObject> objects,SoundEngine se,ParticleSystem ps){\n boolean playerHit = false;\n for (GameObject go1:objects){\n if (go1.checkActive()){\n //the 1st object is active\n //so worth checking\n\n for (GameObject go2:objects){\n if (go2.checkActive()){\n //the 2nd object is active\n //so worth checking\n if (RectF.intersects(go1.getTransform().getCollider(),go2.getTransform().getCollider())){\n\n //switch goes here\n //there has been a collision\n //but does it matter?\n switch (go1.getTag() + \" with \" + go2.getTag()){\n case \"Player with Alien Laser\":\n playerHit = true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player with Alien\":\n playerHit =true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player Laser with Alien\":\n mGaemState.increaseScore();\n //respawn the alien\n ps.emitParticles(new PointF(go2.getTransform().getLocation().x,go2.getTransform().getLocation().y));\n go2.setInactive();\n go2.spawn(objects.get(Level.PLAYER_INDEX).getTransform());\n go1.setInactive();\n se.playAlienExplode();\n\n break;\n\n default:\n break;\n }\n\n }\n }\n }\n }\n }\n return playerHit;\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 }",
"@Override\n public void checkCollision( Sprite obj )\n {\n \n }",
"@Override\n\tpublic void render(float delta) {\n\t\tbackground.render(camera);\n\t\tui.act();\n\t\tui.draw();\n\t\tif(showG) {\n\t\t\tspriteBatch.begin();\n\t\t\tspriteBatch.draw(texture, 0, 0);\n\t\t\tspriteBatch.end();\n\t\t}\n\t\tif(showA) {\n\t\t\tspriteBatch.begin();\n\t\t\tspriteBatch.draw(texture2, 0, 0);\n\t\t\tspriteBatch.end();\n\t\t}\n\t}",
"public void showInteractIndicator() {\n if (interactIndicator == null) {\n interactIndicator = new EntityAnimated();\n interactIndicator.addAnimation(\"flash\", new SpriteAnimation(\"Menu/Tutorial/E to interact.png\", 0, 0, 50, 50, 1, 2, 1, 1, 1));\n interactIndicator.setCurrentAnimation(\"flash\");\n interactIndicator.setLayer(9);\n interactIndicator.setPosition(x + width / 2 - 25, y - 60);\n room.addEntity(interactIndicator);\n }\n }",
"static public void display(){\n\n elapsedTime = TimerManager.getTime() - startTime;\n\n if (!isDone){\n\n //Animate\n if (TimerManager.getTime()-animTimer > animSpeed){\n animTimer = TimerManager.getTime();\n frame++;\n }\n if (frame > 27){\n frame = 27;\n }\n \n switch (state){\n case 1:\n //Fade in\n alpha = 300 - (int)(elapsedTime/3);\n if (alpha <= 0){\n alpha = 0;\n state = 2;\n startTime = TimerManager.getTime();\n }\n break;\n case 2:\n //Wait a bit\n if (elapsedTime > 2000){\n state = 3;\n startTime = TimerManager.getTime();\n }\n break;\n case 3:\n //Fade out\n alpha = (int)(elapsedTime/4);\n if (alpha >= 255){\n alpha = 255;\n state = 4;\n startTime = TimerManager.getTime();\n isDone = true;\n }\n break;\n }\n \n //Display our sprites\n\n Shapes.begin(Renderer.cameraUI);\n Shapes.setColor(255,255,255,255);\n Shapes.drawBox(0,0,(float)Display.getWidth(),(float)Display.getHeight());\n Shapes.end();\n\n Renderer.startUI();\n\n Renderer.setColor(Color.BLACK);\n Text.draw(0,0,\"State: \"+state);\n Renderer.setColor(Color.WHITE);\n\n Renderer.draw(splashTextures[frame % 28].getRegion(),(float) Display.getWidth()/2 - 128, (float)Display.getHeight()/2-128,256,256);\n\n Renderer.endUI();\n\n Shapes.begin(Renderer.cameraUI);\n Shapes.setColor(0,0,0,Math.min(255,alpha));\n Shapes.drawBox(0,0,(float)Display.getWidth(),(float)Display.getHeight());\n Shapes.end();\n\n }\n }",
"public void render(Graphics2D g,GameState state) {\n /**\n * information EnemyTank\n */\n AffineTransform tx = new AffineTransform();\n tx.setToTranslation(locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2 , locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2);\n tx.rotate(Math.toRadians(tankAngle), 50, 50);\n /**\n * information Enemy Gun\n */\n AffineTransform tx2 = new AffineTransform();\n tx2.setToTranslation(locX + state.xTransfer - smallEnemyGunImage.getWidth() / 5, locY + state.yTransfer - smallEnemyGunImage.getHeight() / 4.2);\n tx2.rotate(Math.toRadians(gunAngle), 20, 20);\n\n\n// Random random = new Random();\n// int angle = random.nextInt(360);\n// System.out.println(angle);\n /**\n * initialize is false\n */\n// if(j == 0)\n// limitMoving = false;\n//\n// if(limitMoving == false)\n// {\n// locX ++ ;\n// j++;\n// }\n// if(j == 100)\n// limitMoving = true;\n// if(limitMoving == true)\n// {\n// locX -- ;\n// j--;\n// }\n\n\n up = false;\n down = false;\n right = false;\n left = false;\n if(Math.abs(state.locX - (locX + state.xTransfer)) < 400 && Math.abs(state.locY - (locY + state.yTransfer)) < 400) {\n if (state.locX >= locX + state.xTransfer ) {\n locX++;\n right = true;\n left = false;\n }\n else {\n locX--;\n left = true;\n right = false;\n }\n\n if (state.locY >= locY + state.yTransfer) {\n locY++;\n up = false;\n down = true;\n }\n else {\n locY--;\n down = false;\n up = true;\n }\n ShapesIntersects shapesIntersects = new ShapesIntersects();\n for (Enemy01 e1 : GameFrame.getEnemyController().getE1()) {\n if (e1.locX != locX || e1.locY != locY) {\n // System.out.println(\"hi\");\n if (shapesIntersects.checkIntersect(locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2, locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2, smallEnemyBodyImage.getWidth(), smallEnemyBodyImage.getHeight()\n , e1.locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2, e1.locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2, smallEnemyBodyImage.getWidth(), smallEnemyBodyImage.getHeight())) {\n // System.out.println(\"intersects between enemy 01 is True\");\n if (right) {\n locX--;\n right = false;\n }\n if (left) {\n locX++;\n left = false;\n }\n if (up) {\n locY++;\n up = false;\n }\n if (down) {\n locY--;\n down = false;\n }\n }\n }\n }\n if (shapesIntersects.checkIntersect(locX + state.xTransfer - smallEnemyBodyImage.getWidth() / 2, locY + state.yTransfer - smallEnemyBodyImage.getHeight() / 2, smallEnemyBodyImage.getWidth(), smallEnemyBodyImage.getHeight()\n , state.locX - GameFrame.getMyTankImage().getWidth() / 2, state.locY - GameFrame.getMyTankImage().getHeight() / 2, GameFrame.getMyTankImage().getWidth(), GameFrame.getMyTankImage().getHeight()))\n {\n if (right) {\n locX--;\n right = false;\n }\n if (left) {\n locX++;\n left = false;\n }\n if (up) {\n locY++;\n up = false;\n }\n if (down) {\n locY--;\n down = false;\n }\n }\n for (HardWall hW : GameFrame.getWallController().getHardWalls())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2, GameFrame.getMyTankImage().getWidth(), GameFrame.getMyTankImage().getHeight()\n , hW.getLocX() + state.xTransfer, hW.getLocY() + state.yTransfer,hW.getHardWallImage().getWidth() ,hW.getHardWallImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (SoftWall sW : GameFrame.getWallController().getSoftWalls())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2 + 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2 + 2, GameFrame.getMyTankImage().getWidth() - 5, GameFrame.getMyTankImage().getHeight() - 5\n , sW.getLocX() + state.xTransfer, sW.getLocY() + state.yTransfer,sW.getSoftWall01Image().getWidth() ,sW.getSoftWall01Image().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (Teazel teazel : GameFrame.getWallController().getTeazels())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2, GameFrame.getMyTankImage().getWidth(), GameFrame.getMyTankImage().getHeight()\n , teazel.getLocX() + state.xTransfer, teazel.getLocY() + state.yTransfer,teazel.getTeazelImage().getWidth() ,teazel.getTeazelImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (Enemy02 e2 : GameFrame.getEnemyController().getE2())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2 + 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2 + 2, GameFrame.getMyTankImage().getWidth() - 5, GameFrame.getMyTankImage().getHeight() - 5\n , e2.getLocX() + state.xTransfer, e2.getLocY() + state.yTransfer,e2.getMovingEnemyImage().getWidth() ,e2.getMovingEnemyImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n for (Enemy03 e3 : GameFrame.getEnemyController().getE3())\n if(shapesIntersects.checkIntersect(locX + state.xTransfer - GameFrame.getMyTankImage().getWidth() / 2 + 2, locY + state.yTransfer - GameFrame.getMyTankImage().getHeight() / 2 + 2, GameFrame.getMyTankImage().getWidth() - 5, GameFrame.getMyTankImage().getHeight() - 5\n , e3.getLocX() + state.xTransfer, e3.getLocY() + state.yTransfer,e3.getBigEnemyBodyImage().getWidth() ,e3.getBigEnemyBodyImage().getHeight()))\n {\n if(right)\n locX--;\n if(left)\n locX++;\n if(up)\n locY++;\n if (down)\n locY--;\n }\n\n tankAngle = enemyTankRotation.getAngle(up, down, left, right);\n enemyTankRotation.setTankAngle(tankAngle);\n gunAngle = Math.toDegrees(Math.atan2(state.locY - (locY + state.yTransfer), state.locX - (locX + state.xTransfer)));\n// Random random = new Random();\n// int n = random.nextInt(10);\n// if (n == 3)\n if(i % 50 == 0)\n GameFrame.getBulletController().addBullet(new Enemy01Bullet(locX,locY ,gunAngle,smallEnemyGunImage));\n\n i++;\n // angle = Math.toDegrees(Math.atan2(state.mouseY - state.locY - myTankImage.getHeight() / 2, state.mouseX - state.locX - myTankImage.getWidth() / 2));\n }\n// System.out.println(\"loc x = \" + locX);\n// System.out.println(\"loc y = \" + locY);\n g.drawImage(smallEnemyBodyImage,tx,null);\n g.drawImage(smallEnemyGunImage, tx2, null);\n// System.out.println(\"enemy 01 loc x = \" + locX);\n// System.out.println(\"enemy 01 loc y = \" + locY);\n }",
"@Override\n public boolean isCollided(gameObject obj){\n return Rect.intersects(obj.getastRect(), getRectplayer1())||\n Rect.intersects(obj.getastRect(), getRectplayer2()) ||\n Rect.intersects(obj.getastRect(), getRectplayer3()) ||\n Rect.intersects(obj.getastRect(), getRectplayer4());\n }",
"@Override\r\n public void Update()\r\n {\r\n double nextY;\r\n if(isJumping) {\r\n if(jumpSpeed > 1 && jumpDirection == -1) {\r\n jumpDirection = 1;\r\n jumpSpeed = 0;\r\n }\r\n else if(jumpDirection == 1) {\r\n if(jumpSpeed < 1) {\r\n jumpSpeed += 0.04;\r\n }\r\n } else {\r\n jumpSpeed += 0.04;\r\n }\r\n nextY = y + jumpDirection * GetSpeed(jumpSpeed) * 4;\r\n\r\n lista_static_element = refLink.GetMap().getList_static_element();\r\n\r\n for(int i = 0; i< lista_static_element.size(); i++){\r\n if(lista_static_element.get(i).GetRectangle().intersects(x , nextY , width , height)){\r\n isJumping = false;\r\n return;\r\n /*lista_static_element.remove(lista_static_element.get(i));\r\n refLink.GetMap().setList_dinamic_element(lista_static_element);*/\r\n }\r\n\r\n }\r\n\r\n\r\n lista_dinamic_element = refLink.GetMap().getList_star_blue();\r\n\r\n for(int i = 0; i< lista_dinamic_element.size(); i++){\r\n if(lista_dinamic_element.get(i).GetRectangle().intersects(x , nextY , width , height)){\r\n lista_dinamic_element.remove(lista_dinamic_element.get(i));\r\n refLink.GetMap().setList_star_blue(lista_dinamic_element);\r\n\r\n Scor.GetInstance().Update_Scor();\r\n\r\n //State.SetState(new GameOverState(refLink));\r\n }\r\n }\r\n\r\n list_fire = refLink.GetMap().getList_fire();\r\n for(int i = 0; i< list_fire.size(); i++){\r\n if(list_fire.get(i).GetRectangle().intersects(x , nextY , width , height)){\r\n list_fire.remove(list_fire.get(i));\r\n refLink.GetMap().setList_star_blue(list_fire);\r\n\r\n Scor.GetInstance().Update_Scor();\r\n\r\n State.SetState(new GameOverState(refLink));\r\n }\r\n }\r\n\r\n\r\n\r\n /*if(refLink.GetMap().CheckCollision((int)x+50,(int)y)){\r\n isJumping = false;\r\n return;\r\n }*/\r\n\r\n y = (float)nextY;\r\n\r\n if(y > 415) {\r\n isJumping = false;\r\n y = 415;\r\n }\r\n }\r\n ///Verifica daca a fost apasata o tasta\r\n GetInput();\r\n ///Actualizeaza pozitia\r\n Move();\r\n ///Actualizeaza imaginea\r\n if(refLink.GetKeyManager().left_arrow)\r\n {\r\n image = Assets.water_hero_left;\r\n }\r\n else if(refLink.GetKeyManager().right_arrow) {\r\n image = Assets.water_hero_right;\r\n }\r\n else {\r\n image = Assets.water_hero;\r\n }\r\n if(lista_dinamic_element.isEmpty() )\r\n Map.level = 2;\r\n }",
"@Override\n public void checkCollision( Sprite obj )\n {\n\n }",
"private void renderGuiExtraLive (SpriteBatch batch)\n\t{\n\t\t//float x = cameraGUI.viewportWidth - 50 -\n\t\t//\t\tConstants.LIVES_START * 50;\n\t\t//float y = -15;\n\t\t//for (int i = 0; i < Constants.LIVES_START; i++)\n\t\t//{\n\t\t//\tif (worldController.lives <= i)\n\t\t//\t\tbatch.setColor(0.5f, 0.5f, 0.5f, 0.5f);\n\t\t//\tbatch.draw(Assets.instance.bird.character, \n\t\t//\t\t\tx + i * 50, y, 50, 50, 120, 100, 0.35f, -0.35f, 0);\n\t\t//\tbatch.setColor(1, 1, 1, 1);\n\t\t//}\n\t\t\n\t\tfloat x = cameraGUI.viewportWidth - 50 -\n\t\t\t\t1 * 50;\n\t\tfloat y = -15;\n\t\tfor (int i = 0; i < 1; i++)//Constants.LIVES_START; i++)\n\t\t{\n\t\t\tif (worldController.lives <= i)\n\t\t\t\tbatch.setColor(0.5f, 0.5f, 0.5f, 0.5f);\n\t\t\tbatch.draw(Assets.instance.bird.character, \n\t\t\t\t\tx + i * 50, y, 50, 50, 120, 100, 0.35f, -0.35f, 0);\n\t\t\tbatch.setColor(1, 1, 1, 1);\n\t\t}\n\t\tif (worldController.lives>= 0 &&worldController.livesVisual>worldController.lives) \n\t\t{ \n\t\t\t\n\t\t\tint i = worldController.lives;\n\t\t float alphaColor = Math.max(0, worldController.livesVisual- worldController.lives - 0.5f);\n\t\t float alphaScale = 0.35f * (2 + worldController.lives - worldController.livesVisual) * 2;\n\t\t float alphaRotate = -45 * alphaColor;\n\t\t batch.setColor(1.0f, 0.7f, 0.7f, alphaColor);\n\t\t batch.draw(Assets.instance.bird.character, x + i * 50, y, 50, 50, 120, 100, alphaScale, -alphaScale,alphaRotate);\n\t\t batch.setColor(1, 1, 1, 1);\n\t\t }\n\t}",
"public void pararJugador() {\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n }\n }",
"public void checkanimation(){ \n if(super.movecheck(flag) == 1)\n animationup();\n if( super.movecheck(flag)== 2)\n animationdown();\n if(super.movecheck(flag) == 3)\n animationleft();\n if(super.movecheck(flag)== 4)\n animationright(); \n }",
"@Override\n\tpublic void draw() {\n\t\tbg.draw();\n\t\tfor(Test2 t : test)\n\t\t\tt.draw();\n\t\tfor(Test2 t : test2)\n\t\t\tt.draw();\n\t\t\n\t\tfor(Test2 t : test3)\n\t\t\tt.draw();\n\t\tobj.draw();\n\t\tEffect().drawEffect(1);\n\t}",
"private void crossFade() {\n robotIv.setAlpha(0f);\n robotIv.setVisibility(View.VISIBLE);\n\n // Animate the content view to 100% opacity, and clear any animation\n // listener set on the view.\n robotIv.animate()\n .alpha(1f)\n .setDuration(1800)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n welcomeTv.setVisibility(View.VISIBLE);\n }\n });\n\n }",
"public void animationPlayer2ATK(TextView texto, int flag_ataque, String damage_done){\n animation = AnimationUtils.loadAnimation(context,R.anim.anim_atacar_player2);\n imagePlayer2.startAnimation(animation);\n animationTakeHit(imagePlayer1);\n animationText(texto, flag_ataque, damage_done);\n }",
"@Override\n\tpublic void show() {\n\t backgroundImage = new Texture(Gdx.files.internal(\"resources/images/menu.png\"));\n\t soccerImage = new Texture(Gdx.files.internal(\"resources/images/ball.gif\"));\n\t boomerangImage = new Texture(Gdx.files.internal(\"resources/images/boomerang.gif\"));\n\t wolfImage = new Texture(Gdx.files.internal(\"resources/images/wolf.gif\"));\n\t boyImage = new Texture(Gdx.files.internal(\"resources/images/bueno2.png\"));\n\t boyImageInv = new Texture(Gdx.files.internal(\"resources/images/bueno2Inv.png\"));\n\t grassImage = new Texture(Gdx.files.internal(\"resources/images/piso.png\"));\n\t \n\n\t // load the drop sound effect and the rain background \"music\"\n\t dropSound = Gdx.audio.newSound(Gdx.files.internal(\"resources/drop.wav\"));\n\t rainMusic = Gdx.audio.newMusic(Gdx.files.internal(\"resources/rain.mp3\"));\n\n\t // start the playback of the background music immediately\n\t rainMusic.setLooping(true);\n\t //rainMusic.play();\n\n\t // create the camera and the SpriteBatch\n\t camera = new OrthographicCamera();\n\t camera.setToOrtho(false, 800, 480);\n\t batch = new SpriteBatch();\n\n\t // create a Rectangle to logically represent the boy\n\t boy = new Rectangle();\n\t boy.x = 130; //800 / 2 - 50 / 2; // center the boy horizontally\n\t boy.y = 235; // just above the ground\n\t boy.width = 50;\n\t boy.height = 74;\n\t \n\t //boy2\n\t boy2 = new Rectangle();\n\t boy2.x = 130;\n\t boy2.y = 160; \n\t boy2.width = 50;\n\t boy2.height = 74;\n\t \n\t //create a grass Rectangle to represent the grass\n\t grass = new Rectangle();\n\t grass.x = 0;\n\t grass.y = camera.viewportHeight/2-30;\n\t \n\t grass2 = new Rectangle();\n\t grass2.x = camera.viewportWidth;\n\t grass2.y = camera.viewportHeight/2-30;\n\t \n\t velocidad = 8;\n\t counterGravity = 0.0;\n\t \n\t countObjs = 1;\n\t //stateTime = 0;\n\n\t // create the soccerballs array and spawn the first soccer ball\n\t soccerballs = new Array<Rectangle>();\n\n\t //create the boomerans array and spawn the first boomerang\n\t boomerangs = new Array<Rectangle>();\n\t \n\n\t spawnBoomerangs();\n\t spawnSoccerBall();\n\t\t\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 animationPlayer1ATK(TextView texto, int flag_ataque, String damage_done){\n animation = AnimationUtils.loadAnimation(context,R.anim.anim_atacar_player1);\n imagePlayer1.startAnimation(animation);\n animationTakeHit(imagePlayer2);\n animationText(texto, flag_ataque, damage_done);\n }",
"@Override\n public void update(float dt) {\n\n\n for (GameObject g : getGameObjectList()) {\n Collider gameObjectCollider = g.getComponent(Collider.class);\n if (g.getSID() instanceof Map.Block ) {\n continue;\n }\n gameObjectCollider.reduceAvoidTime(dt);\n\n for (GameObject h : getGameObjectList()) {\n Collider gameObjectCollider2 = h.getComponent(Collider.class);\n if (g.equals(h)) {\n continue;\n }\n\n if ((gameObjectCollider.bitmask & gameObjectCollider2.layer) != 0) {\n if (gameObjectCollider2.layer == gameObjectCollider.layer){\n continue;\n }\n\n TransformComponent t = g.getComponent(TransformComponent.class);\n Vector2f pos1 = g.getComponent(Position.class).getPosition();\n FloatRect rect1 = new FloatRect(pos1.x, pos1.y, t.getSize().x, t.getSize().y);\n TransformComponent t2 = g.getComponent(TransformComponent.class);\n Vector2f pos2 = h.getComponent(Position.class).getPosition();\n FloatRect rect2 = new FloatRect(pos2.x, pos2.y, t2.getSize().x, t2.getSize().y);\n FloatRect collision = rect2.intersection(rect1);\n if (collision != null) {\n Collider mainCollider = g.getComponent(Collider.class);\n Collider collidingWith = h.getComponent(Collider.class);\n\n\n if (!(mainCollider.checkGameObject(h)||collidingWith.checkGameObject(g)))\n {\n if (mainCollider.events == true && collidingWith.events == true)\n {\n\n\n if ((g.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0)\n {\n g.addComponent(new CollisionEvent());\n\n\n }\n g.getComponent(CollisionEvent.class).getG().add(h);\n if ((h.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0) {\n h.addComponent(new CollisionEvent());\n\n }\n h.getComponent(CollisionEvent.class).getG().add(g);\n\n }\n\n\n if (mainCollider.dieOnPhysics == true) {\n EntityManager.getEntityManagerInstance().removeGameObject(g);\n }\n if (mainCollider.physics == true && collidingWith.physics == true) {\n float resolve = 0;\n float xIntersect = (rect1.left + (rect1.width * 0.5f)) - (rect2.left + (rect2.width * 0.5f));\n float yIntersect = (rect1.top + (rect1.height * 0.5f)) - (rect2.top + (rect2.height * 0.5f));\n if (Math.abs(xIntersect) > Math.abs(yIntersect)) {\n if (xIntersect > 0) {\n resolve = (rect2.left + rect2.width) - rect1.left;\n } else {\n resolve = -((rect1.left + rect1.width) - rect2.left);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(resolve, 0));\n } else {\n if (yIntersect > 0) {\n resolve = (rect2.top + rect2.height) - rect1.top;\n\n } else\n {\n resolve = -((rect1.top + rect1.height) - rect2.top);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(0, resolve));\n }\n }\n }\n\n\n }\n }\n }\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}",
"@Override\n public void paintComponent(Graphics g){\n super.paintComponent(g);\n if(ingame){\n\n int screenWidth = this.getWidth();\n int screenHeight = this.getHeight();\n\n\n for(int i = 0; i < end_positions.size(); i++){\n End_position item = end_positions.get(i);\n g.setColor(Color.green);\n g.fillRect(item.getDestinationX()*screenWidth/LEVEL_WIDTH,item.getDestinationY()*screenHeight/LEVEL_HEIGHT,item.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,item.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n }\n\n g.setColor(Color.white);\n g.fillRect(player.getCurrentX()*screenWidth/LEVEL_WIDTH,player.getCurrentY()*screenHeight/LEVEL_HEIGHT,player.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,player.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n g.setColor(Color.yellow);\n g.fillRect(item.getCurrentX()*screenWidth/LEVEL_WIDTH,item.getCurrentY()*screenHeight/LEVEL_HEIGHT,item.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,item.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n }\n for(int i = 0; i < walls.size(); i++){\n Wall item = walls.get(i);\n\n g.setColor(Color.red);\n g.fillRect(item.getDestinationX()*screenWidth/LEVEL_WIDTH,item.getDestinationY()*screenHeight/LEVEL_HEIGHT,item.getImage().getWidth(null)*screenWidth/LEVEL_WIDTH,item.getImage().getWidth(null)*screenHeight/LEVEL_HEIGHT);\n\n }\n\n }\n\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 void render(float f) {\n update();\n\n long currentTime = System.currentTimeMillis();\n //Divide by a thousand to convert from milliseconds to seconds\n elapsedTime = (currentTime - lastTime) % 1000.0f;\n lastTime = currentTime;\n\n batch.begin();\n bg1.draw(batch, 1);\n bg2.draw(batch, 1);\n playerSprite.draw(batch);\n\n //Draws bullets if bullet array is holding bullet objects\n if (bullets.size() > 0) {\n for (Bullet bullet : bullets) {\n bullet.getSprite().draw(batch);\n }\n }\n\n //Draws worms if worm array is holding worm objects\n if (worms.size() > 0) {\n for (Worm worm : worms) {\n worm.getSprite().draw(batch);\n }\n }\n\n //Draws trojans if trojan array is holding trojan objects\n if (trojans.size() > 0) {\n if (bigTrojan == null) {\n for (Trojan trojan : trojans) {\n trojan.getSprite().draw(batch);\n }\n } else if (bigTrojan != null) {\n bigTrojan.getSprite().draw(batch);\n }\n }\n //Draws memLeaks if memLeak array is holding memLeak objects\n if (memLeaks.size() > 0) {\n for (MemoryLeak memLeak : memLeaks) {\n memLeak.getSprite().draw(batch);\n }\n }\n\n if (elissaArray.size() > 0) {\n for (Elissa elissa : elissaArray) {\n elissa.getSprite().draw(batch);\n }\n }\n\n //Draws ElissaFiles if elissaFiles array is holding files objects\n if (elissaFiles.size() > 0) {\n for (ElissaFiles file : elissaFiles) {\n file.getSprite().draw(batch);\n }\n }\n\n //Draws files if files array is holding files objects\n if (files.size() > 0) {\n for (Files file : files) {\n file.getSprite().draw(batch);\n }\n }\n\n //particle system\n particles.render(batch);\n\n switch (gameState) {\n case PLAYING:\n //Score\n scoreTxt = \"Score: \" + String.format(Locale.US, \"%06d\", score);\n uiFont.draw(batch, scoreTxt, 0, HEIGHT - (scoreLayout.height));\n //Health\n healthTxt = \"Health: \" + player.getHp();\n uiFont.draw(batch, healthTxt, WIDTH / 2, HEIGHT - (healthLayout.height));\n //MOVEMENT\n isTouched = Gdx.input.isTouched();\n //Gdx.app.log(\"Playing: \", \"Is touched: \" + isTouched);\n playerMovement();\n pauseButton.draw(batch, 1);\n stage.draw();\n break;\n case PAUSED:\n //Fill in pause code\n if (settingsOn == false) {\n pauseScreenRender();\n } else if (settingsOn == true) {\n settingsScreenRender();\n }\n break;\n case GAMEOVER:\n countdown = ((System.currentTimeMillis() - startTime) / 1000);\n Gdx.app.log(\"Seconds Elapsed: \", \"\" + ((System.currentTimeMillis() - startTime) / 1000));\n overlay.draw(batch, 0.5f);\n font.draw(batch, txt, WIDTH / 2 - layout.width / 2, HEIGHT / 2 + layout.height / 2);\n if (countdown == 5) {\n gameState = GameState.PLAYING;\n Lvl1.musicBackground.dispose();\n game.setScreen(AntiVirus.levelSelectScreen);\n }\n break;\n case COMPLETE:\n completeScreenRender();\n break;\n }\n batch.end();\n }",
"@Override\r\n public void collideEffect(Spatial s) {\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}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tmotion.displace();\r\n\t\tmotion.circleIntersects();\r\n\t\t//check collision\r\n\t\tmotion.intersectBound();\r\n\t\trepaint(); // repaints this component\r\n\t}",
"public void collideWith(Rigidbody obj) {\n\t\t\r\n\t}",
"public void render() throws IOException {\r\n\t\tBufferedImage bi = null;\r\n\t\t// Wipes the screen, always above the objects you're animating\r\n\t\tColor bgC = new Color(135, 206, 235);\r\n\t\tg.setColor(bgC);\r\n\t\tg.fillRect(0, 0, BOX_WIDTH, BOX_HEIGHT);\r\n\r\n\t\tif (players.size() > 0) {\r\n\t\t\t// Allows hovering in the pick country part of the game\r\n\t\t\tfor (Country x : Countries) {\r\n\t\t\t\tif (hoveredColor.equals(x.getDetectionColor())) {\r\n\t\t\t\t\tnew threadz(x, players.get(turnCounter).getColor(), false);\r\n\t\t\t\t\tbi = x.getImg();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Draws the waterMap and hovered country\r\n\t\tg.drawImage(waterMap, 0, 0, null);\r\n\t\tg.drawImage(bi, 0, 0, null);\r\n\r\n\t\t//Draws the countries\r\n\t\tfor (Player x : players) {\r\n\t\t\tfor (Country k : x.getCountries()) {\r\n\t\t\t\tif (x.getCountries().size() > 0)\r\n\t\t\t\t\tg.drawImage(k.getImg(), 0, 0, null);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Draws the labels\r\n\t\tg.drawImage(labels, 0, 0, null);\r\n\t\r\n\t\t//Draws how many troops are on each country\r\n\t\tdrawTroopNumbers();\r\n\t\tif (gameOver == true) {\r\n\t\t\tg.setFont(new Font(\"Vani\",Font.BOLD, 150));\r\n\t\t\tg.setColor(Color.BLACK);\r\n\t\t\tg.drawString(\"Player \" + (turnCounter+1) + \" Wins!\", 160, 430);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tg.setColor(players.get(turnCounter).getColor());\r\n\t\t\tg.drawString(\"Player \" + (turnCounter+1) + \" Wins!\", 150, 420);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t\tattacker.setText(\"ATT: \"+attackSlide.getValue());\r\n\t\t\r\n\t\tbs.show();\r\n\r\n\t}",
"public Jugador(float x, float y, Colisiones colision, Main main,float wReescalado,float hReescalado) {\n this.x = x;\n this.y = y;\n this.colisiones=colision;\n this.main=main;\n this.wReescalado=wReescalado;\n this.hReescalado=hReescalado;\n rectangles=colisiones.getRect();//Obtengo el array de rectangulo en colisiones\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));//Asigno a texture el archivo png de mi personaje\n jugadorVista = \"\";//Agigno comillas a jugador vista\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());//Creo el rectangulo de mi jugador con las propiedades de texture\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);//Divido mi texture region en las partes indicadas para asignarlas a la matria\n //Los valores de la division de tpm equivalen al numero de filas y numero de columnas de mi png(En mi caso tengo 4 filas que son los diferentes movimientos y 4 columnas una para cada movimiento)\n //Ejemplo:Fila 1-->Movimiento a la derecha: Columna 1-->Quieto Columna -->Mueve un pie: Columna 3 --->Muevo el otro pie: Columna 4-->Vuelvo a estar quieto\n regions = new TextureRegion[4];//Asigno al array regions la longuitud por la que haya dividido en ancho my imagen\n for (int b = 0; b < regions.length; b++) {//Con este bucle voy cargando las imagenes y da la ilusion de que anda\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);//Inicializamos el constructor pasandole por parametros el tiempo que dura y el array\n tiempo = 0f;\n }\n }",
"public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }",
"private void revealAround() {\n if (xTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile - 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile - 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile - 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile - 1][yTile].setRevealed(true);\n }\n }\n if (yTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile][yTile - 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile - 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile - 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile - 1].setRevealed(true);\n }\n }\n if (xTile + 1 < Parameters.NUM_X_TILES && !References.GetMainTileActorMap()[xTile + 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile + 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile + 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile + 1][yTile].setRevealed(true);\n }\n }\n if (yTile + 1 < Parameters.NUM_Y_TILES && !References.GetMainTileActorMap()[xTile][yTile + 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile + 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile + 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile + 1].setRevealed(true);\n }\n }\n }",
"public void checkCollision(){\n\r\n for(int i = 0; i < enemies.size(); i++){\r\n \r\n // Player and Enemy collision\r\n \r\n if(collide(this.player, enemies.get(i)) && this.player.isVisible() && enemies.get(i).isVisible()){\r\n System.out.println(\"Collide\");\r\n this.player.setHealth(this.player.getHealth() - 100);\r\n }\r\n\r\n // Player and Enemy bullet collision\r\n \r\n for(int j =0; j < enemies.get(i).getBullets().size(); j++){\r\n\r\n if(collide(this.player, enemies.get(i).getBullets().get(j)) && this.player.isVisible() && enemies.get(i).getBullets().get(j).isVisible()){\r\n\r\n enemies.get(i).getBullets().get(j).setVisible(false);\r\n this.player.setHealth(this.player.getHealth() - enemies.get(i).getBullets().get(j).getDamage());\r\n\r\n }\r\n }\r\n\r\n }\r\n //time = DEFAULT_TIME_DELAY;\r\n// }\r\n\r\n\r\n\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n\r\n\r\n // Player bullet and enemy collision\r\n\r\n for(int j = 0; j < enemies.size(); j++) {\r\n if (collide(enemies.get(j), player.getBullets().get(i)) && enemies.get(j).isVisible() && player.getBullets().get(i).isVisible()) {\r\n\r\n if (enemies.get(j).getHealth() < 0) {\r\n enemies.get(j).setVisible(false);\r\n score.addScore(100);\r\n }\r\n\r\n enemies.get(j).setHealth(enemies.get(j).getHealth() - player.getBullets().get(i).getDamage());\r\n // enemies.get(j).setColor(Color.RED);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n\r\n }\r\n }\r\n\r\n\r\n // Boss collision & player bullet collision\r\n\r\n if(collide(player.getBullets().get(i), this.boss1) && player.getBullets().get(i).isVisible() && boss1.isVisible()){\r\n\r\n if(boss1.getHealth() < 0){\r\n boss1.setVisible(false);\r\n score.addScore(1000);\r\n state = STATE.WIN;\r\n }\r\n this.boss1.setHealth(this.boss1.getHealth() - player.getBullets().get(i).getDamage());\r\n // this.boss1.setHealth(0);\r\n player.getBullets().get(i).setVisible(false);\r\n\r\n }\r\n\r\n }\r\n\r\n // Bullet vs Bullet Collision\r\n\r\n for(int k = 0 ; k < player.getBullets().size(); k++){\r\n\r\n if(player.getBullets().get(k).isVisible()) {\r\n for (int i = 0; i < enemies.size(); i++) {\r\n\r\n if(enemies.get(i).isVisible()) {\r\n for (int j = 0; j < enemies.get(i).getBullets().size(); j++) {\r\n\r\n if (collide(player.getBullets().get(k), enemies.get(i).getBullets().get(j)) && enemies.get(i).getBullets().get(j ).isVisible()) {\r\n\r\n\r\n System.out.println(\"bullets colliding\");\r\n\r\n player.getBullets().get(k).setVisible(false);\r\n enemies.get(i).getBullets().get(j).setColor(Color.yellow);\r\n enemies.get(i).getBullets().get(j).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n\r\n player.getBullets().add(enemies.get(i).getBullets().get(j));\r\n\r\n enemies.get(i).getBullets().remove(enemies.get(i).getBullets().get(j)); //removes bullet\r\n\r\n\r\n k++;\r\n j--;\r\n //enemies.get(i).getBullets().get(j).setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n for(int i = 0; i < boss1.getBullets().size(); i++) {\r\n\r\n\r\n if (collide(player.getBullets().get(k), boss1.getBullets().get(i)) && boss1.getBullets().get(i).isVisible()) {\r\n\r\n System.out.println(\"boss bullets colliding\");\r\n player.getBullets().get(k).setVisible(false);\r\n boss1.getBullets().get(i).setColor(Color.yellow);\r\n boss1.getBullets().get(i).deflect(this.player.getX() + this.player.getW()/2, this.player.getY() + this.player.getH()/2);\r\n player.getBullets().add(boss1.getBullets().get(i));\r\n boss1.getBullets().remove(boss1.getBullets().get(i));\r\n k++;\r\n i--;\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Boss bullet and player collision\r\n\r\n for(Bullet b : boss1.getBullets() ){\r\n\r\n\r\n if(collide(player, b) && player.isVisible() && b.isVisible()){\r\n b.setVisible(false);\r\n player.setHealth(player.getHealth() - b.getDamage());\r\n }\r\n }\r\n\r\n\r\n // Power up collision\r\n\r\n for(PowerUp p : powerUps){\r\n\r\n if(collide(player, p) && p.isVisible()){\r\n\r\n p.executeEffect(this.player);\r\n p.setVisible(false);\r\n }\r\n }\r\n\r\n\r\n\r\n // Deleting out of bound bullets\r\n for(int i = 0; i < player.getBullets().size(); i++){\r\n if(player.getBullets().get(i).getY() < 0 || player.getBullets().get(i).getY() > GameWorld.SCREEN_H ||\r\n player.getBullets().get(i).getX()< 0 || player.getBullets().get(i).getX() > GameWorld.SCREEN_W) {\r\n\r\n player.getBullets().remove(player.getBullets().get(i));\r\n }\r\n }\r\n\r\n }",
"@Override\n synchronized public void run() {\n if (gameBoard.wasCollisionDetected()) {\n Point collisionPoint = gameBoard.getLastCollision();\n if (collisionPoint.x >= 0) {\n dummyText.setText(\"Last Collision XY (\" + Integer.toString(collisionPoint.x) + \",\" + Integer.toString(collisionPoint.y) + \")\");\n score++;\n }\n //turn off the animation until reset gets pressed\n //return;\n }\n frame.removeCallbacks(frameUpdate);\n\n Point playerNewPosition = new Point(gameBoard.getPlayerX(), gameBoard.getPlayerY());\n Point targetNewPosition = new Point(gameBoard.getTargetX(), gameBoard.getTargetY());\n Point obstacle1NewPosition = new Point(gameBoard.getObstacle1X(), gameBoard.getObstacle1Y());\n Point obstacle2NewPosition = new Point(gameBoard.getObstacle2X(), gameBoard.getObstacle2Y());\n\n updatePlayerVelocity();\n playerNewPosition.y = playerNewPosition.y + playerVelocity.y;\n if (playerNewPosition.y > playerMaxY) {\n // return doge to original position if it overshoots\n playerNewPosition.y = playerMaxY;\n performJump = false;\n button.setEnabled(true);\n }\n\n targetNewPosition.x = targetNewPosition.x + targetVelocity.x;\n if (targetNewPosition.x > memeMaxX || targetNewPosition.x < 5) {\n targetVelocity.x *= -1;\n }\n targetNewPosition.y = targetNewPosition.y + targetVelocity.y;\n if (targetNewPosition.y > memeMaxY || targetNewPosition.y < 5) {\n targetVelocity.y *= -1;\n }\n\n obstacle1NewPosition.x = obstacle1NewPosition.x + obstacle1Velocity.x;\n if (obstacle1NewPosition.x > memeMaxX || obstacle1NewPosition.x < 5) {\n obstacle1Velocity.x *= -1;\n }\n obstacle1NewPosition.y = obstacle1NewPosition.y + obstacle1Velocity.y;\n if (obstacle1NewPosition.y > memeMaxY || obstacle1NewPosition.y < 5) {\n obstacle1Velocity.y *= -1;\n }\n\n obstacle2NewPosition.x = obstacle2NewPosition.x + obstacle2Velocity.x;\n if (obstacle2NewPosition.x > memeMaxX || obstacle2NewPosition.x < 5) {\n obstacle2Velocity.x *= -1;\n }\n obstacle2NewPosition.y = obstacle2NewPosition.y + obstacle2Velocity.y;\n if (obstacle2NewPosition.y > memeMaxY || obstacle2NewPosition.y < 5) {\n obstacle2Velocity.y *= -1;\n }\n\n gameBoard.setPlayerPosition(playerNewPosition.x, playerNewPosition.y);\n gameBoard.setTargetPosition(targetNewPosition.x, targetNewPosition.y);\n gameBoard.setObstacle1Position(obstacle1NewPosition.x, obstacle1NewPosition.y);\n gameBoard.setObstacle2Position(obstacle2NewPosition.x, obstacle2NewPosition.y);\n gameBoard.invalidate();\n frame.postDelayed(frameUpdate, getFrameRate());\n }",
"void collision(float x_a,float y_a,float x_b,float y_b){\n float dy = y_a - y_b;\r\n float dx = x_a - x_b;\r\n float distance12 = dy * dy + dx * dx;\r\n\r\n if (distance12 < ((2 * ballRadius) * (2 * ballRadius))) {\r\n\r\n ((GameActivity)mActivity).mTimer.cancel();\r\n ((GameActivity)mActivity).layout.removeAllViews();\r\n new AlartMessage(mActivity);\r\n }\r\n\r\n }",
"@Override\n\tpublic void show() {\n\t\tcontainer = new Table();\n//\t\tcontainer.background(skin.getDrawable(\"darkenWorld\"));\n\t\tcontainer.setSize(width, height);\n\t\t\n\t\tdarken = new Image(skin.getDrawable(\"darkenWorld\"));\n\t\tdarken.setSize(width, height);\n\t\t\n\t\ttimer.start();\n\t\t\n\t\ttrainingBag = new TrainingBag(width, height);\n\t\t\n\t\tBitmapFont font = new BitmapFont(Gdx.files.internal(\"fontSmall-export.fnt\"),\n\t\t Gdx.files.internal(\"fontSmall-export.png\"), false);\n\t\t\n\t\t\n\t\tLabelStyle labelStyle = new LabelStyle();\n\t\tlabelStyle.font = font;\n\t\t\n\t\ttimeLeft = new Label(timeString + \" 20\", labelStyle);\n\t\ttimeLeft.setPosition(width - timeLeft.getWidth(), height - timeLeft.getHeight());\n\t\t\n\t\thits = new Label(hitsString + \"0\" + amountString, labelStyle);\n\t\thits.setPosition(0, height - timeLeft.getHeight());\n\t\t\n\t\t\n\t\tcontainer.row();\n\t\tcontainer.add(trainingBag);\n\t\t\n\t\tgroup.addActor(darken);\n\t\tgroup.addActor(container);\n\t\tgroup.addActor(timeLeft);\n\t\tgroup.addActor(hits);\n\t}",
"private void checkCollisionwithMonster() {\n\t\tr1.set(this.getX(),this.getY(),this.getWidth(),this.getHeight());\r\n\t\t\r\n\t\t//check collision with monsters\t\t\r\n\t\tif(Math.ceil(this.getColor().a) == 1 && System.nanoTime() - oldTime >= cdTime){\r\n\t\t\tfor(TreeMonster treeMon : treeMonArray){\r\n\t\t\t\tif(treeMon.isVisible()){\r\n\t\t\t\t\tr2.set(treeMon.getCollisionBox());\r\n\t\t\t\t\tif (!r1.overlaps(r2)) continue;\r\n\t\t\t\t\toldTime = System.nanoTime();\r\n\t\t\t\t\tsetHealth(health-1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(Math.ceil(this.getColor().a) == 1 && System.nanoTime() - oldTime >= cdTime){\r\n\t\t\tfor(SlimeMonster slimeMon : slimeMonArray){\r\n\t\t\t\tif(slimeMon.isVisible()){\r\n\t\t\t\t\tr2.set(slimeMon.getCollisionBox());\r\n\t\t\t\t\tif (!r1.overlaps(r2)) continue;\r\n\t\t\t\t\toldTime = System.nanoTime();\r\n\t\t\t\t\tsetHealth(health-1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(Math.ceil(this.getColor().a) == 1 && System.nanoTime() - oldTime >= cdTime){\r\n\t\t\tfor(FireMonster fireMon : fireMonArray){\r\n\t\t\t\tif(fireMon.isVisible()){\r\n\t\t\t\t\tr2.set(fireMon.getCollisionBox());\r\n\t\t\t\t\tif (!r1.overlaps(r2)) continue;\r\n\t\t\t\t\toldTime = System.nanoTime();\r\n\t\t\t\t\tsetHealth(health-1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void paint(Entity entity, Graphics graphics, Camera camera)\r\n\t{\r\n\t\tint tileSize = GameConfiguration.TILE_SIZE;\r\n\t\tint unitSize = EntityConfiguration.UNIT_SIZE;\r\n\t\tint cavalrySize = EntityConfiguration.CAVALRY_SIZE;\r\n\t\t\r\n\t\t\r\n\t\tint width = GameConfiguration.WINDOW_WIDTH;\r\n\t\tint height = GameConfiguration.WINDOW_HEIGHT;\r\n\t\tif(GameConfiguration.launchInFullScreen) {\r\n\t\t\twidth = Toolkit.getDefaultToolkit().getScreenSize().width;\r\n\t\t\theight = Toolkit.getDefaultToolkit().getScreenSize().height;\r\n\t\t}\r\n\t\tPosition p = entity.getPosition();\r\n\t\tAnimation animation = entity.getAnimation();\r\n\r\n\t\tif(entity.getId() == EntityConfiguration.CAVALRY) {\r\n\t\t\tif(p.getX() + cavalrySize - camera.getX() >= 0 && p.getY() - camera.getY() + cavalrySize >= 0 && p.getX() - camera.getX() <= width && p.getY() - camera.getY() <= height) {\r\n\t\t\t\tgraphics.drawImage(animation.getFrame(), p.getX() - camera.getX(), p.getY() - camera.getY(), cavalrySize, cavalrySize, null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(entity.getId() >= EntityConfiguration.INFANTRY && entity.getId() <= EntityConfiguration.WORKER) {\r\n\t\t\tif(p.getX() + unitSize - camera.getX() >= 0 && p.getY() - camera.getY() + unitSize >= 0 && p.getX() - camera.getX() <= width && p.getY() - camera.getY() <= height) {\t\r\n\t\t\t\tgraphics.drawImage(animation.getFrame(), p.getX() - camera.getX(), p.getY() - camera.getY(), unitSize, unitSize, null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(p.getX() + tileSize - camera.getX() >= 0 && p.getY() - camera.getY() + tileSize >= 0 && p.getX() - camera.getX() <= width && p.getY() - camera.getY() <= height) {\r\n\t\t\t\tgraphics.drawImage(animation.getFrame(), p.getX() - camera.getX(), p.getY() - camera.getY(), tileSize, tileSize, null);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpaintLifeBarre(entity, graphics, camera);\r\n\t}",
"@Override\n public <T extends VectorSprite> boolean collide(T object1, GraphicsObject object2) {\n double xDistance, yDistance;\n\n xDistance = this.getHitCenterX() + object1.getRadius() / 2 - Math.max(object2.getxPos(), Math.min(this.getHitCenterX() + object1.getRadius() / 2, object2.getxPos() + object2.getWidth()));\n yDistance = this.getHitCenterY() + object1.getRadius() / 2 - Math.max(object2.getyPos(), Math.min(this.getHitCenterY() + object1.getRadius() / 2, object2.getyPos() + object2.getHeight()));\n\n return (xDistance * xDistance + yDistance * yDistance) < (object1.getRadius() / 2 * object1.getRadius() / 2);\n }",
"public MyAnimation getFrontSprite();",
"Animation getShowAnimation();",
"@Override\n\tpublic void intersect(Ray ray, IntersectResult result) {\n\t\t\t\tdouble tmin,tmax;\n\t\t\t\tdouble xmin, xmax, ymin, ymax, zmin, zmax;\n\t\t\t\t//find which face to cross\n\n\t\t\t\tif(ray.viewDirection.x>0){\n\t\t\t\t\txmin=(min.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t\txmax=(max.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t}else{\n\t\t\t\t\txmin=(max.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t\txmax=(min.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t}\n\t\t\t\tif(ray.viewDirection.y>0){\n\t\t\t\t\tymin=(min.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t\tymax=(max.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t}else{\n\t\t\t\t\tymin=(max.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t\tymax=(min.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t}\n\t\t\t\tif(ray.viewDirection.z>0){\n\t\t\t\t\tzmin=(min.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t\tzmax=(max.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t}else{\n\t\t\t\t\tzmin=(max.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t\tzmax=(min.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmin=Double.max(xmin, ymin);\n\t\t\t\ttmin=Double.max(tmin, zmin);\n\t\t\t\ttmax=Double.min(xmax, ymax);\n\t\t\t\ttmax=Double.min(tmax, zmax);\n\t\t\t\t\n\t\t\t\t \n\t\t\t\tif(tmin<tmax && tmin>0){\n\t\t\t\t\t\n\t\t\t\t\tresult.material=material;\n\t\t\t\t\tresult.t=tmin;\n\t\t\t\t\tPoint3d p=new Point3d(ray.viewDirection);\n\t\t\t\t\tp.scale(tmin);\n\t\t\t\t\tp.add(ray.eyePoint);\n\t\t\t\t\tresult.p=p;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfinal double epsilon=1e-9;\n\t\t\t\t\t// find face and set the normal\n\t\t\t\t\tif(Math.abs(p.x-min.x)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(-1,0,0);\n\t\t\t\t\t}else if(Math.abs(p.x-max.x)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(1,0,0);\n\t\t\t\t\t}else if(Math.abs(p.y-min.y)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,-1,0);\n\t\t\t\t\t}else if(Math.abs(p.y-max.y)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,1,0);\n\t\t\t\t\t}else if(Math.abs(p.z-min.z)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,0,-1);\n\t\t\t\t\t}else if(Math.abs(p.z-max.z)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,0,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t}",
"@Override\n public void draw(SpriteBatch batch) {\n stateTime += Gdx.graphics.getDeltaTime();\n\n if (SinglePGameModel.getInstance().getPlayer().isWalking())\n sprite.setRegion(walkingAnimation.getKeyFrame(stateTime, true));\n else\n sprite.setRegion(jumpingAnimation);\n\n sprite.draw(batch);\n }",
"private void bladeAndActorOverlap() {\n for (BirdActor bird : birdList) {\n if (bird.isCircleOverlap(bladeActor.boundaryCircle)) {\n ExplosionActor explosionActor = new ExplosionActor(bird.getX(), bird.getY(), 0.03333f, explosionAtlas, Animation.PlayMode.NORMAL);\n gameStage.addActor(explosionActor);\n bird.setRandomPosition(birdActorLowestYPos);\n bird.flyAction.restart();\n lblHighScore.setText(scoreDefaultTxt + String.format(\"%04d\", ++score));\n ++destroyInOneShoot;\n }\n }\n }",
"public static boolean checkCollisionGUI(List<Node> pl, Node a, Node fE, Node sE, Node tE, Node foE, List<Node> sP)\r\n\t{\r\n\t\tfor (Node platform : pl)\r\n\t\t{\r\n\t\t\tif (platform.getBoundsInParent().intersects(a.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tplatform.setOpacity(0.5);\r\n\t\t\t\ta.setTranslateX(platform.getTranslateX()+30);\r\n\t\t\t\ta.setTranslateY(platform.getTranslateY()+29);\r\n\t\t\t}\r\n\t\t\t//If Platform and Avatar don't collide, the opacity is full\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tplatform.setOpacity(1.0);\r\n\t\t\t}\r\n\t\t\tif (platform.getBoundsInParent().intersects(fE.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tplatform.setOpacity(0.5);\r\n\t\t\t\tfE.setTranslateX(platform.getTranslateX()+30);\r\n\t\t\t\tfE.setTranslateY(platform.getTranslateY()+29);\r\n\t\t\t}\r\n\t\t\tif (platform.getBoundsInParent().intersects(sE.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tplatform.setOpacity(0.5);\r\n\t\t\t\tsE.setTranslateX(platform.getTranslateX()+30);\r\n\t\t\t\tsE.setTranslateY(platform.getTranslateY()+29);\r\n\t\t\t}\r\n\t\t\tif (platform.getBoundsInParent().intersects(tE.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tplatform.setOpacity(0.5);\r\n\t\t\t\ttE.setTranslateX(platform.getTranslateX()+30);\r\n\t\t\t\ttE.setTranslateY(platform.getTranslateY()+29);\r\n\t\t\t}\r\n\t\t\tif (platform.getBoundsInParent().intersects(foE.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tplatform.setOpacity(0.5);\r\n\t\t\t\tfoE.setTranslateX(platform.getTranslateX()+30);\r\n\t\t\t\tfoE.setTranslateY(platform.getTranslateY()+29);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (Node staticPlat : sP)\r\n\t\t{\r\n\t\t\tif (staticPlat.getBoundsInParent().intersects(a.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tstaticPlat.setOpacity(0.5);\r\n\t\t\t\ta.setTranslateX(staticPlat.getTranslateX()+30);\r\n\t\t\t\ta.setTranslateY(staticPlat.getTranslateY()+29);\r\n\t\t\t\tsetCollision(true);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tstaticPlat.setOpacity(1.0);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//IF AVATAR REACHES TOP, TIMER STOPS\r\n\t\tif (getHealth()==0 || Game.getPlayerScore()== 17)\r\n\t\t{\r\n\t\t\tsetCollision(false);\r\n\t\t}\r\n\t\treturn getCollision();\r\n\t}",
"@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 }",
"public void act() { \n check = borde(flag);\n if(check == true )\n restaura();\n moveRandom(move);\n if(animationE % 3 == 0){\n checkanimation();\n } \n animationE++; \n alive=checkfire();\n if(alive == true){\n enemyoff();\n } \n \n }",
"public void update(){\n if(player.getPlaying()) {\n // update player animation.\n player.update();\n // update background animation.\n bg.update();\n // checks if skater has finished falling animation to end the game.\n if (player.animate instanceof FallAnimate && player.animate.getDone()) {\n player.setPlaying(false);\n player.setFall(false);\n System.out.println(\"End \" + player.getPlaying());\n }\n // checks if player has reached required points.\n if(player.getScore() > TARGETSCORE){\n player.setPlaying(false);\n levelCompleted = true;\n levelReset = System.nanoTime();\n }\n // increment jumpcounter while crouched.\n if (player.animate instanceof CrouchingAnimate && (jumpCounter <= 25)) {\n jumpCounter++;\n }\n // Creating Bananas:\n long bananaElapsed = (System.nanoTime() - bananaStartTime) / 1000000;\n if(bananaElapsed > 10500 && MainActivity.difficulty != 0){\n bananas.add(new Banana(BitmapFactory.decodeResource(getResources(),\n R.drawable.bigbanana), WIDTH + 10, (int) (HEIGHT * 0.85), 40, 40, 1));\n bananaStartTime = System.nanoTime();\n }\n //collision detection:\n for (int i = 0; i < bananas.size(); i++) {\n bananas.get(i).update();\n if (collision(bananas.get(i), player)) {\n bananas.remove(i);\n player.setFall(true);\n player.setPlaying(false);\n break;\n }\n // removing bananas when off screen\n if (bananas.get(i).getX() < -100) {\n bananas.remove(i);\n break;\n }\n }\n // Creating Cones:\n long coneElapsed = (System.nanoTime() - coneStartTime) / 1000000;\n if (coneElapsed > 5000) {\n cones.add(new TallBricks(BitmapFactory.decodeResource(getResources(),\n R.drawable.tallbricks), WIDTH + 10, (int) (HEIGHT * 0.59), 100, 161, 1));\n coneStartTime = System.nanoTime();\n }\n // update and check collisions.\n for (int i = 0; i < cones.size(); i++) {\n\n cones.get(i).update();\n if (collision(cones.get(i), player) && MainActivity.difficulty == 0) {\n cones.remove(i);\n player.forceSetScore(-500);\n break;\n }\n\n if (collision(cones.get(i), player) && MainActivity.difficulty != 0) {\n cones.remove(i);\n player.setFall(true);\n break;\n }\n // removing cones when off screen\n if (cones.get(i).getX() < -100) {\n cones.remove(i);\n break;\n }\n\n if((cones.get(i).getX() < player.getX() -15) ){\n cones.remove(i);\n player.setPendingPoints(1000);\n break;\n }\n }\n }\n else if(player.getPlaying() == false && levelCompleted){\n long resetElapsed = (System.nanoTime()-levelReset)/1000000;\n if(resetElapsed > 4000) {\n Intent resultIntent = new Intent();\n resultIntent.putExtra(\"result\",true);\n ((Activity)context).setResult(Activity.RESULT_OK,resultIntent);\n ((Activity)context).finish();\n }\n }\n else if(player.getPlaying() == false && !levelCompleted){\n if(!reset){\n newGameCreated = false;\n startReset = System.nanoTime();\n reset = true;\n }\n\n long resetElapsed = (System.nanoTime()-startReset)/1000000;\n\n if(resetElapsed > 2500 && !newGameCreated){\n newGame();\n }\n else if(resetElapsed < 2500 && started){\n player.update();\n }\n }\n }",
"public void checkWindCollision() {\n\n if (Intersector.overlaps(player.boundingCircle, wind1.boundingRectangle)) {\n if (!wind1.angry) {\n //Blow Right\n if (wind1.left && (player.x + AssetHandler.WIND_STRENGTH + player.circleRad < AssetHandler.SCREEN_WIDTH)) {\n player.x += AssetHandler.WIND_STRENGTH;\n } else if (!wind1.left && player.x - AssetHandler.WIND_STRENGTH - player.circleRad > 0) {\n player.x -= AssetHandler.WIND_STRENGTH;\n }\n } else {\n wind1.boundingRectangle.x = -wind1.boundingRectangle.width;\n player.paralyzed = true;\n player.paralyzedStart = TimeUtils.nanoTime();\n shake = true;\n }\n\n }\n\n\n //Check 2nd wind\n\n if (Intersector.overlaps(player.boundingCircle, wind2.boundingRectangle)) {\n if (!wind2.angry) {\n if (wind2.left && (player.x + AssetHandler.WIND_STRENGTH + player.circleRad < AssetHandler.SCREEN_WIDTH)) {\n player.x += AssetHandler.WIND_STRENGTH;\n } else if (!wind2.left && player.x - AssetHandler.WIND_STRENGTH - player.circleRad > 0) {\n player.x -= AssetHandler.WIND_STRENGTH;\n }\n } else {\n wind2.boundingRectangle.x = -wind2.boundingRectangle.width;\n player.paralyzed = true;\n player.paralyzedStart = TimeUtils.nanoTime();\n shake = true;\n }\n }\n\n\n //Check 3rd wind\n\n if (Intersector.overlaps(player.boundingCircle, wind3.boundingRectangle)) {\n if (!wind3.angry) {\n if (wind3.left && (player.x + AssetHandler.WIND_STRENGTH + player.circleRad < AssetHandler.SCREEN_WIDTH)) {\n player.x += AssetHandler.WIND_STRENGTH;\n } else if (!wind3.left && player.x - AssetHandler.WIND_STRENGTH - player.circleRad > 0) {\n player.x -= AssetHandler.WIND_STRENGTH;\n }\n } else {\n wind3.boundingRectangle.x = -wind3.boundingRectangle.width;\n player.paralyzed = true;\n player.paralyzedStart = TimeUtils.nanoTime();\n shake = true;\n }\n }\n\n\n /*\n * Check Wind Collision For Particle Effect Generation\n */\n\n\n //Check 1st Wind\n\n if(Intersector.overlaps(player.boundingCircle, wind1.spriteRectangle)) {\n if(!particle) {\n cloudParticle.setPosition(player.x, wind1.y + wind1.height/2);\n if(cloudParticle.isComplete())\n cloudParticle.reset();\n particle = true;\n } else {\n cloudParticle.setPosition(cloudParticle.getEmitters().first().getX(), wind1.y + wind1.height/2);\n }\n if(wind1.angry) {\n cloudParticle.setFlip(false, true);\n } else {\n cloudParticle.setFlip(false, false);\n }\n }\n\n\n //Check 2nd Wind\n\n if(Intersector.overlaps(player.boundingCircle, wind2.spriteRectangle)) {\n if(!particle) {\n cloudParticle.setPosition(player.x, wind2.y + wind2.height/2);\n if(cloudParticle.isComplete())\n cloudParticle.reset();\n particle = true;\n } else {\n cloudParticle.setPosition(cloudParticle.getEmitters().first().getX(), wind2.y + wind2.height/2);\n }\n if(wind2.angry) {\n cloudParticle.setFlip(false, true);\n } else {\n cloudParticle.setFlip(false, false);\n }\n }\n\n\n //Check 3rd Wind\n\n if(Intersector.overlaps(player.boundingCircle, wind3.spriteRectangle)) {\n if(!particle) {\n cloudParticle.setPosition(player.x, wind3.y + wind3.height/2);\n if(cloudParticle.isComplete())\n cloudParticle.reset();\n particle = true;\n } else {\n cloudParticle.setPosition(cloudParticle.getEmitters().first().getX(), wind3.y + wind3.height/2);\n }\n if(wind3.angry) {\n cloudParticle.setFlip(false, true);\n } else {\n cloudParticle.setFlip(false, false);\n }\n }\n\n }",
"public void render(Graphics g) {\n int sxtemp = sx, sytemp = sy;\n g.drawImage(background, 0, 0, 1024, 768, sxtemp, sytemp-768, sxtemp+1024, sytemp, null);\n \n for (Obstacle1 obstacle : floors) {\n\t Rectangle range = new Rectangle(obstacle.getLocation(), obstacle.getSize());\n g.drawImage(obstacle.getImage(), range.x - sx , range.y - sy + 768, range.width, range.height, null);\n //g.drawImage(obstacle, 666, 444, obstacle.getWidth(), obstacle.getHeight(), null);\n\t}\n\tfor (Obstacle2 stair : stairs) {\n\t Rectangle range = new Rectangle(stair.getLocation(), stair.getSize());\n if (stair.getFace() == Direction.RIGHT) {\n g.drawImage(stair.getImage(), range.x + range.width - sx, range.y - sy + 768, -range.width, range.height, null);\n } else {\n g.drawImage(stair.getImage(), range.x - sx , range.y - sy + 768, range.width, range.height, null);\n }\n //g.drawImage(obstacle, 666, 444, obstacle.getWidth(), obstacle.getHeight(), null);\n\t}\n\tfor (Obstacle3 obstacle : rocks) {\n\t Rectangle range = new Rectangle(obstacle.getLocation(), obstacle.getSize());\n g.drawImage(obstacle.getImage(), range.x - sx , range.y - sy + 768, range.width, range.height, null);\n\t}\n\t\n for (Sprite sprite : sprites) {\n //System.out.println(sprite.location);\n //System.out.printf(\"%d %d\\n\", sxtemp, sytemp);\n sprite.setLocation(new Point(sprite.getX()-sxtemp, sprite.getY()-sytemp+768));\n //System.out.printf(\"%d %d\\n\", sxtemp, sytemp);\n sprite.render(g);\n sprite.setLocation(new Point(sprite.getX()+sxtemp, sprite.getY()+sytemp-768));\n }\n for(DropItem dropItem : dropItems) {\n dropItem.setLocation(new Point(dropItem.getLocation().x-sxtemp, dropItem.getLocation().y-sytemp+768));\n dropItem.render(g);\n dropItem.setLocation(new Point(dropItem.getLocation().x+sxtemp, dropItem.getLocation().y+sytemp-768));\n }\n sx = sxtemp; sy = sytemp;\n\n BufferedImage bg = resizeImage((BufferedImage)background, background.getWidth(null)/16, background.getHeight(null)/16);\n g.drawImage(bg, 0, 0, null);\n for (Sprite sprite : sprites) {\n g.setColor(Color.RED);\n Point p = sprite.getLocation();\n if(sprite instanceof Boss) g.fillOval((int)(p.getX()/16), (int)(p.getY()/16), 16, 16);\n else g.fillOval((int)(p.getX()/16), (int)(p.getY()/16), 6, 6);\n }\n for(Obstacle obstacle : floors) {\n Point p = obstacle.getLocation();\n int w = obstacle.getImage().getWidth(null), h = obstacle.getImage().getHeight(null);\n BufferedImage img = resizeImage((BufferedImage)obstacle.getImage(), w/16, h/16);\n g.drawImage(img, (int)(p.getX()/16), (int)(p.getY()/16), null);\n }\n for(Obstacle obstacle : rocks) {\n Point p = obstacle.getLocation();\n int w = obstacle.getImage().getWidth(null), h = obstacle.getImage().getHeight(null);\n BufferedImage img = resizeImage((BufferedImage)obstacle.getImage(), w/16, h/16);\n g.drawImage(img, (int)(p.getX()/16), (int)(p.getY()/16), null);\n }\n for(Obstacle obstacle : stairs) {\n Point p = obstacle.getLocation();\n int w = obstacle.getImage().getWidth(null), h = obstacle.getImage().getHeight(null);\n BufferedImage img = resizeImage((BufferedImage)obstacle.getImage(), w/16, h/16);\n g.drawImage(img, (int)(p.getX()/16), (int)(p.getY()/16), null);\n }\n\n\n g.setColor(Color.green);\n Point p = player.getLocation();\n g.fillOval((int)(p.getX()/16), (int)(p.getY()/16), 8, 8);\n g.setColor(Color.black);\n g.drawOval((int)(p.getX()/16), (int)(p.getY()/16), 8, 8);\n\n g.drawImage(pause, 950, 0, null);\n\n g.setColor(Color.pink);\n g.fillRect(350, 650, 300, 80);\n g.setColor(Color.black);\n g.drawRect(350, 650, 300, 80);\n Image pl;\n try {\n pl = ImageIO.read(new File(\"assets/others/player.png\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(pl, 365, 655, null);\n g.setColor(Color.black);\n g.setFont(new Font(\"TimesRoman\", Font.BOLD, 16));\n g.drawString(\"LV. \" + player.lv, 415, 700); //player.exp + \"/\" + player.lv*100\n g.drawString(\"exp \", 480, 675);\n\n g.setFont(new Font(\"TimesRoman\", Font.PLAIN, 16));\n g.setColor(Color.GRAY);\n g.fillRect(510, 660, 120, 15);\n g.setColor(Color.YELLOW);\n g.fillRect(510, 660, (int) (player.exp * 120 / (player.lv*100)), 15);\n g.setColor(Color.BLACK);\n g.drawRect(510, 660, 120, 15);\n g.drawString(player.exp + \"/\" + player.lv*100, 520, 675);\n\n HealthPointBar hpBar = player.hpBar;\n int width = (int) (hpBar.getHp() * 120 / player.KNIGHT_HP);\n int widthMp = (int) (hpBar.getMp() * 120 / player.KNIGHT_MP);\n g.setColor(Color.RED);\n g.fillRect(510, 685, 120, 15);\n g.setColor(Color.GREEN);\n g.fillRect(510, 685, width, 15);\n g.setColor(Color.WHITE);\n g.fillRect(510, 705, 120, 15);\n g.setColor(Color.BLUE);\n g.fillRect(510, 705, widthMp, 15);\n g.setColor(Color.black);\n g.drawRect(510, 685, 120, 15);\n g.drawRect(510, 705, 120, 15);\n g.setFont(new Font(\"TimesRoman\", Font.PLAIN, 16));\n g.setColor(Color.black);\n g.drawString(\"HP \", 480, 700);\n g.drawString(\"MP \", 480, 720);\n g.drawString(hpBar.getHp() + \"/\" + player.KNIGHT_HP, 520, 700);\n g.drawString(hpBar.getMp() + \"/\" + player.KNIGHT_MP, 520, 720);\n\n\n //boss\n if(bossAppear && !bossDies) {\n g.setColor(Color.pink);\n g.fillRect(350, 0, 300, 80);\n g.setColor(Color.black);\n g.drawRect(350, 0, 300, 80);\n Image bo;\n try {\n bo = ImageIO.read(new File(\"assets/others/boss.png\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(bo, 560, -5, null);\n g.setColor(Color.black);\n\n g.setFont(new Font(\"TimesRoman\", Font.PLAIN, 16));\n hpBar = boss.hpBar;\n width = (int) (hpBar.getHp() * 150 / boss.HP);\n g.setColor(Color.RED);\n g.fillRect(420, 35, 150, 15);\n g.setColor(Color.GREEN);\n g.fillRect(420, 35, width, 15);\n g.setColor(Color.black);\n g.drawRect(420, 35, 150, 15);\n g.setFont(new Font(\"TimesRoman\", Font.PLAIN, 16));\n g.setColor(Color.black);\n g.drawString(\"HP \", 380, 50);\n g.drawString(hpBar.getHp() + \"/\" + boss.HP, 425, 50);\n\n }\n\n if(player.levelUping > 0) {\n player.levelUping--;\n Image lvup;\n try {\n lvup = ImageIO.read(new File(\"assets/lvup/\" + player.lv + \".png\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(lvup, 290, 80, null);\n }\n\n g.setFont(new Font(\"TimesRoman\", Font.BOLD, 16));\n g.setColor(Color.gray);\n if(player.lv >= 1) {\n Image skillu;\n try {\n skillu = ImageIO.read(new File(\"assets/skillicon/skillu.jpg\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(skillu, 0, 680, null);\n g.drawString(\"u\", 20, 675);\n }\n if(player.lv >= 2) {\n Image twoStepJump;\n try {\n twoStepJump = ImageIO.read(new File(\"assets/skillicon/2stepjump.jpg\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(twoStepJump, 50, 680, null);\n g.drawString(\"space\", 50, 675);\n }\n if(player.lv >= 3) {\n Image skilli;\n try {\n skilli = ImageIO.read(new File(\"assets/skillicon/skilli.jpg\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(skilli, 100, 680, null);\n g.drawString(\"i\", 120, 675);\n }\n if(player.lv >= 4) {\n Image skillo;\n try {\n skillo = ImageIO.read(new File(\"assets/skillicon/heal.png\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(skillo, 150, 680, null);\n g.drawString(\"o\", 170, 675);\n }\n\n int hp = player.hpPotionCount, mp = player.mpPotionCount, ring = player.ringCount;\n g.setColor(Color.yellow);\n g.fillRect(860, 680, 150, 50);\n g.setColor(Color.black);\n g.drawRect(860, 680, 50, 50);\n g.drawRect(910, 680, 50, 50);\n g.drawRect(960, 680, 50, 50);\n\n g.setFont(new Font(\"TimesRoman\", Font.BOLD, 16));\n g.setColor(Color.black);\n Image im;\n try {\n im = ImageIO.read(new File(\"assets/dropitem/33.png\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(im, 860, 680, null);\n g.setColor(Color.gray);\n g.drawString(\"1\", 895, 695);\n g.setColor(Color.black);\n g.drawString(\"\" + hp, 895, 730);\n\n try {\n im = ImageIO.read(new File(\"assets/dropitem/22.png\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(im, 910, 680, null);\n g.setColor(Color.gray);\n g.drawString(\"2\", 945, 695);\n g.setColor(Color.black);\n g.drawString(\"\" + mp, 945, 730);\n\n try {\n im = ImageIO.read(new File(\"assets/dropitem/11.png\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n g.drawImage(im, 960, 680, null);\n g.setColor(Color.gray);\n g.drawString(\"3\", 995, 695);\n g.setColor(Color.black);\n g.drawString(\"\" + ring, 995, 730);\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 draw(GameCanvas canvas){\n if(tags.length > 0 && body != null){\n FilmstripAsset fa;\n float angle = (float)((getBody().getAngle() + Math.PI * 4) % (Math.PI * 2));\n\n if (isDead) {\n ImageAsset ia = (ImageAsset) assetMap.get(tags[4]);\n Affine2 aff = new Affine2();\n aff.setToRotationRad((float)(deadAngle + Math.PI/2));\n aff.preScale(ia.getImageScale().x,ia.getImageScale().y * 0.6f );\n aff.preTranslate(body.getPosition().x * drawScale.x, body.getPosition().y*drawScale.y);\n canvas.draw(ia.getTexture(), Color.WHITE, ia.getOrigin().x, ia.getOrigin().y,aff);\n return;\n }\n\n if (isSecondStage){\n fa = (FilmstripAsset) assetMap.get(tags[3]);\n }\n else if(angle <= Math.PI*0.25f || angle > Math.PI*1.75f){\n fa = (FilmstripAsset) assetMap.get(tags[1]);\n }\n else if(angle <= Math.PI*0.75f && angle > Math.PI*0.25f){\n fa = (FilmstripAsset) assetMap.get(tags[2]);\n }\n else if(angle <= Math.PI*1.25f && angle > Math.PI*0.75f){\n fa = (FilmstripAsset) assetMap.get(tags[0]);\n }\n else {\n fa = (FilmstripAsset) assetMap.get(tags[3]);\n }\n\n if(fa != null){\n int nFrame = (GameObject.counter / fa.getSpeed()) % fa.getNumFrames();\n TextureRegion texture = fa.getTexture(nFrame/2);\n\n Affine2 aff = new Affine2();\n aff.setToScaling(fa.getImageScale().x * 1, fa.getImageScale().y * 0.7f);\n aff.preShear(-0.2f, 0);\n aff.preTranslate((body.getPosition().x)* drawScale.x - fa.getImageScale().x * fa.getTexture(nFrame/2).getRegionWidth() * 0.05f , (body.getPosition().y -0.2f ) * drawScale.y - fa.getTexture(nFrame/2).getRegionHeight() * fa.getImageScale().y * 0.05f);\n canvas.draw(fa.getTexture(nFrame/2), new Color(0,0,0,0.5f), fa.getOrigin().x, fa.getOrigin().y, aff);\n\n canvas.draw(texture, Color.WHITE,fa.getOrigin().x,fa.getOrigin().y,body.getPosition().x*drawScale.x,body.getPosition().y*drawScale.x,0,fa.getImageScale().x,fa.getImageScale().y);\n }\n }\n }",
"private void checkCollision(Graphics g) {\n\t\t// collision detection for the tanks\n\t\tGraphics2D g2d = (Graphics2D) g.create();\n\t\tRectangle heroRectangle = hero.getBounds();\n\t\tRectangle hero2Rectangle = computer.getBounds();\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\t// hero1 --------------------\n\t\tAffineTransform at = g2d.getTransform();\n\t\tg2d.setTransform(at);\n\t\tat.rotate(Math.toRadians(hero.getAngle()), hero.getX() + hero.getImageWidth() / 2,\n\t\t\t\thero.getY() + hero.getImageHeight() / 2);\n\t\tGeneralPath heroPath = new GeneralPath();\n\t\theroPath.append(heroRectangle.getPathIterator(at), true);\n\t\tArea heroArea = new Area(heroPath);\n\n\t\t// hero2 ------------------------------\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tat.rotate(Math.toRadians(computer.getAngle()), computer.getX() + computer.getImageWidth() / 2,\n\t\t\t\tcomputer.getY() + computer.getImageHeight() / 2);\n\t\tGeneralPath hero2Path = new GeneralPath();\n\t\thero2Path.append(hero2Rectangle.getPathIterator(at), true);\n\t\tArea hero2Area = new Area(hero2Path);\n\n\t\t// tank1 -- tank2 collision\n\t\thero2Area.intersect(heroArea);\n\t\tif (!hero2Area.isEmpty()) {\n\t\t\tplay(\"tank-tank.wav\");\n\t\t\tposxt2 = computer.getX();\n\t\t\tposyt2 = computer.getY();\n\t\t\tposyt1 = hero.getY();\n\t\t\tposxt1 = hero.getX();\n\t\t\t\n\t\t\texplodet2 = true;\n\t\t\texplodet1 = true;\n\t\t\tg2d.setColor(Color.RED);\n\t\t\tg2d.fill(heroArea);\n\t\t\tcomputer.spawnGenerator();\n\t\t\twhile (getValidRespawnPosition((int) computer.getX(), (int) computer.getY(), computer.getImageWidth(),\n\t\t\t\t\tcomputer.getImageHeight())) {\n\t\t\t\tcomputer.spawnGenerator();\n\t\t\t}\n\n\t\t\thero.spawnGenerator();\n\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\thero.spawnGenerator();\n\t\t\t}\n\t\t}\n\n\t\t// tank2 -- tank1 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m = heroMissiles.get(i);\n\t\t\tRectangle tank1BulletRect = m.getBounds();\n\t\t\tGeneralPath tank1BulletPath = new GeneralPath();\n\t\t\ttank1BulletPath.append(tank1BulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tank1BulletArea = new Area(tank1BulletPath);\n\t\t\thero2Area.intersect(tank1BulletArea);\n\t\t\tif (!hero2Area.isEmpty()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposxt2 = computer.getX();\n\t\t\t\tposyt2 = computer.getY();\n\t\t\t\texplodet2 = true;\n\t\t\t\tif (computer.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp1score++;\n\t\t\t\t\tcomputer.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) computer.getX(), (int) computer.getY(),\n\t\t\t\t\t\t\tcomputer.getImageWidth(), computer.getImageHeight())) {\n\t\t\t\t\t\tcomputer.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\theroMissiles.remove(i);\n\t\t\t\tcomputer.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// tank1 -- tank1 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tRectangle tankBulletRect = m1.getBounds();\n\t\t\tGeneralPath tankBulletPath = new GeneralPath();\n\t\t\ttankBulletPath.append(tankBulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tankBulletArea = new Area(tankBulletPath);\n\t\t\theroArea.intersect(tankBulletArea);\n\t\t\tif (!heroArea.isEmpty() && m1.isReflected()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposyt1 = hero.getY();\n\t\t\t\tposxt1 = hero.getX();\n\t\t\t\texplodet1 = true;\n\t\t\t\tif (hero.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp2score++;\n\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\theroMissiles.remove(i);\n\t\t\t\thero.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\n\t\t// tank1 -- tank2 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tRectangle tank2BulletRect = m1.getBounds();\n\t\t\tGeneralPath tank2BulletPath = new GeneralPath();\n\t\t\ttank2BulletPath.append(tank2BulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tank2BulletArea = new Area(tank2BulletPath);\n\t\t\theroArea.intersect(tank2BulletArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposyt1 = hero.getY();\n\t\t\t\tposxt1 = hero.getX();\n\t\t\t\texplodet1 = true;\n\t\t\t\tif (hero.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp2score++;\n\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thero2Missile.remove(i);\n\t\t\t\thero.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\n\t\t// tank1 -- powerup collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < powerupArray.size(); i++) {\n\t\t\tRectangle powerupRectangle = (powerupArray.get(i)).getBounds();\n\t\t\tGeneralPath powerupPath = new GeneralPath();\n\t\t\tpowerupPath.append(powerupRectangle.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea powerupArea = new Area(powerupPath);\n\t\t\theroArea.intersect(powerupArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\tplay(\"powerup.wav\");\n\t\t\t\tif ((powerupArray.get(i)).getPowerupType() == 5) {\n\t\t\t\t\thero.setIndex(1);\n\t\t\t\t}\n\t\t\t\tint powerupType = (powerupArray.get(i)).getPowerupType();\n\t\t\t\thero.setCurrentPowerup(powerupType);\n\t\t\t\tpowerupArray.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t// tank2 -- powerup collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < powerupArray.size(); i++) {\n\t\t\tRectangle powerupRectangle = (powerupArray.get(i)).getBounds();\n\t\t\tGeneralPath powerupPath = new GeneralPath();\n\t\t\tpowerupPath.append(powerupRectangle.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea powerupArea = new Area(powerupPath);\n\t\t\thero2Area.intersect(powerupArea);\n\t\t\tif (!hero2Area.isEmpty()) {\n\t\t\t\tplay(\"powerup.wav\");\n\t\t\t\tint powerupType = (powerupArray.get(i)).getPowerupType();\n\t\t\t\tcomputer.setCurrentPowerup(powerupType);\n\t\t\t\tpowerupArray.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t// tank 1 and wall collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (Wall w : wallArray) {\n\t\t\tRectangle wallRect = w.getBounds();\n\t\t\tGeneralPath wallPath = new GeneralPath();\n\t\t\twallPath.append(wallRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea wallArea = new Area(wallPath);\n\t\t\theroArea.intersect(wallArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\thero.setX(hero.getPrevX());\n\t\t\t\thero.setY(hero.getPrevY());\n\t\t\t}\n\t\t}\n\t}",
"public boolean isIntersecting(GameObject other){\n if(other.isSolid()&&this.solid){\n return RectF.intersects(other.getHitBox(),this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }\n return false;\n }",
"public void drawOn(DrawSurface surface) {\r\n //define the x,y of the upper left point and the widthe and heigt of the rectangle(block).\r\n// double x = this.getCollisionRectangle().getUpperLeft().getX();\r\n// double y = this.getCollisionRectangle().getUpperLeft().getY();\r\n// double height = this.getCollisionRectangle().getHeight();\r\n// double width = this.getCollisionRectangle().getWidth();\r\n// String hitCounteString;\r\n// hitCounteString = Integer.toString(this.hitCounter); // changing the number of hit from int to string.\r\n// if (this.hitCounter == 2) {\r\n// surface.setColor(this.color);\r\n// } else if (this.hitCounter < 2) {\r\n// surface.setColor(this.color.darker());\r\n// } else {\r\n// surface.setColor(this.color.darker());\r\n// }\r\n//// surface.setColor(this.color); // change the color of the surface , rectangle lines(boundries).\r\n// surface.fillRectangle((int) x, (int) y, (int) width, (int) height);\r\n// surface.setColor(Color.black);\r\n// surface.drawRectangle((int) x, (int) y, (int) width, (int) height);\r\n// surface.setColor(Color.black);\r\n// //if the ball hit the block amount of time that made the hit counter to be under zero or equall\r\n// // marked with nothing.\r\n// if (this.hitCounter <= 0) {\r\n// surface.drawText((int) (this.recangle.getUpperLeft().getX()),\r\n// (int) (this.recangle.getUpperLeft().getY()), \"\", 1);\r\n// } else { // else marked the new hit counter.\r\n// surface.setColor(Color.black);\r\n// surface.drawText((int) (this.recangle.getUpperLeft().getX() - 5 + this.recangle.getWidth() / 2),\r\n// (int) (this.recangle.getUpperLeft().getY() + 5 + this.recangle.getHeight() / 2),\r\n// \"\", 15);\r\n// }\r\n//\r\n// if (this.hasText) {\r\n// settext(surface, this.text);\r\n// }\r\n\r\n\r\n Point upperLeft = this.recangle.getUpperLeft();\r\n double width = this.recangle.getWidth();\r\n double height = this.recangle.getHeight();\r\n if (mapImages == null && mapColors == null) {\r\n\r\n //set the color of the block\r\n surface.setColor(this.color);\r\n surface.fillRectangle((int) upperLeft.getX(), (int) upperLeft.getY(), (int) width, (int) height);\r\n return;\r\n }\r\n if (mapImages.containsKey(this.hitCounter - 1)) {\r\n Image image = this.mapImages.get(this.hitCounter - 1);\r\n surface.drawImage((int) this.recangle.getUpperLeft().getX(),\r\n (int) this.recangle.getUpperLeft().getY(), image);\r\n } else if (mapColors.containsKey(this.hitCounter - 1)) {\r\n surface.setColor(mapColors.get(this.hitCounter - 1));\r\n surface.fillRectangle((int) upperLeft.getX(), (int) upperLeft.getY(), (int) width, (int) height);\r\n }\r\n\r\n if ((this.stroke != null)) {\r\n surface.setColor(this.stroke);\r\n surface.drawRectangle((int) upperLeft.getX(), (int) upperLeft.getY(), (int) width, (int) height);\r\n }\r\n //check if count of the hits is under zero:\r\n if (this.hitCounter <= 0) {\r\n return;\r\n }\r\n surface.setColor(Color.white);\r\n\r\n\r\n }",
"private void showAnimation() {\n // play voice, and start animation\n if (message.getDirect() == HTMessage.Direct.RECEIVE) {\n voiceIconView.setImageResource(+R.anim.voice_from_icon);\n } else {\n voiceIconView.setImageResource(+R.anim.voice_to_icon);\n }\n voiceAnimation = (AnimationDrawable) voiceIconView.getDrawable();\n voiceAnimation.start();\n }",
"public boolean collision(GameObject initial, GameObject secondary){\n\n if (Rect.intersects(initial.getHitbox(),secondary.getHitbox())){\n MediaPlayer myplayer = MediaPlayer.create(getContext(), R.raw.robloxdeath);\n myplayer.start();\n return true;\n }\n return false;\n\n }",
"@Override\n public void render() {\n sortEntities(Entity.getEntities());\n renderBackground();\n renderBattleState();\n if(selectedPc != null){\n MyGL2dRenderer.drawLabel(getSelectedPc().getCollisionBox().left - 4 * GameView.density() + cameraX,\n getSelectedPc().getCollisionBox().bottom - getSelectedPc().getCollisionBox().width() / 5 + cameraY,\n getSelectedPc().getCollisionBox().width() + 8 * GameView.density(),\n getSelectedPc().getCollisionBox().width() * 2 / 5,\n TextureData.selected_character_visual, 255);\n }\n if(!win){\n renderSpells();\n renderGold();\n }\n }",
"public abstract boolean overlap(Catcher catcher, FallingObject object);",
"public void setUpAnimations(){\n //Vertical movement animation\n this.verticalMovement = new Animation[NUMBER_OF_VERTICAL_FRAMES]; //Number of images\n TextureRegion[][] heroVerticalSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_vertical.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_VERTICAL_FRAMES; i++)\n verticalMovement[i] = new Animation(ANIMATION_SPEED, heroVerticalSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n //Jump animation\n this.jumpMovement = new Animation[NUMBER_OF_JUMP_FRAMES];\n TextureRegion[][] heroJumpSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_jump.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_JUMP_FRAMES; i++)\n jumpMovement[i] = new Animation(ANIMATION_SPEED, heroJumpSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n }",
"@Override\n\tpublic void render(float delta) {\n\t Gdx.gl.glClearColor(0, 0, 0.2f, 1);\n\t Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\n\t // tell the camera to update its matrices.\n\t camera.update();\n\n\t // tell the SpriteBatch to render in the\n\t // coordinate system specified by the camera.\n\t batch.setProjectionMatrix(camera.combined);\n\n\t // begin a new batch and draw the boy and\n\t // all drops\n\t batch.begin();\n\t batch.draw(backgroundImage, 0, 0, camera.viewportWidth, camera.viewportHeight);\n\t batch.draw(grassImage, grass.x, grass.y, camera.viewportWidth, 50);\n\t batch.draw(grassImage, grass2.x, grass2.y, camera.viewportWidth, 50);\n\t batch.draw(boyImage, boy.x, boy.y);\n\t batch.draw(boyImageInv, boy2.x, boy2.y);\n\t //batch.draw(boyImage, boy2.x, boy2.y);\n\t \n\t //bobFrame = walkLeftAnimation.getKeyFrame(stateTime, true);\n\n\n\t batch.end();\n\n\t // process user input\n\t if(Gdx.input.isTouched()) {\n//\t Vector3 touchPos = new Vector3();\n//\t touchPos.set(Gdx.input.getX(), Gdx.input.getY(), 0);\n//\t camera.unproject(touchPos);\n//\t boy.x = touchPos.x - 50 / 2;\n\t \t touched = true;\n\t }\n\t \n\t \n\t // jump of the boy\n\t if(touched){\n\t \t boy.y = boy.y + velocidad;\n\t \t boy2.y = boy2.y - velocidad;\n\t \t counterGravity++;\n\t \t if(counterGravity>=2.3321){\n\t \t\t velocidad -= 1;\n\t \t\t counterGravity=0.00;\n\t \t }\n\t }\n\t if(boy.y < 235){\n\t \t boy.y = 235;\n\t \t touched = false;\n\t \t velocidad = 8;\n\t }\n\t if(boy2.y > 160){\n\t \t boy2.y = 160;\n\t \t touched = false;\n\t \t velocidad = 8;\n\t }\n\t \t \n\t //grass movement\n\t //grass.x -= 200 * Gdx.graphics.getDeltaTime();\n\t // grass2.x -= 200 * Gdx.graphics.getDeltaTime();\n\t \n\t if(grass.getX()<0-camera.viewportWidth){\n\t \t grass.x = 800;\n\t }\n\t if(grass2.getX()<0-camera.viewportWidth){\n\t \t grass2.x = 800;\n\t }\n\n\t // check if we need to create a new soccerball\n\t if(TimeUtils.nanoTime() - lastSoccer > 1000000000){\n\t \t spawnSoccerBall();\n\t }\n\t //check if we need to create a new boomerang\n\t if(TimeUtils.nanoTime() - lastBoomerang > 1500000000){\n\t \t spawnBoomerangs();\n\t }\n\n\t // move the soccerballs, remove any that are beneath the bottom edge of\n\t // the screen or that hit the boy. In the later case we play back\n//\t // a sound effect as well.\n//\t Iterator<Rectangle> iter = soccerballs.iterator();\n//\t while(iter.hasNext()) {\n//\t Rectangle soccerball = iter.next();\n//\t soccerball.x -= 200 * Gdx.graphics.getDeltaTime();\n//\t if(soccerball.x + 30 < 0) iter.remove();\n//\t if(soccerball.overlaps(boy)) {\n//\t dropSound.play();\n//\t iter.remove();\n//\t }\n//\t }\n//\n//\t // move the boomerangs, remove any that are beneath the bottom edge of\n//\t // the screen or that hit the boy. In the later case we play back\n//\t // a sound effect as well.\n//\t Iterator<Rectangle> boomIter = boomerangs.iterator();\n//\t while(boomIter.hasNext()) {\n//\t Rectangle boomerang = boomIter.next();\n//\t boomerang.x -= 200 * Gdx.graphics.getDeltaTime();\n//\t if(boomerang.x + 30 < 0) boomIter.remove();\n//\t if(boomerang.overlaps(boy)) {\n//\t dropSound.play();\n//\t boomIter.remove();\n//\t }\n//\t }\n\t\t\n\t}",
"@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }",
"public void dibujar(SpriteBatch batch) {\n timerAnimacion += Gdx.graphics.getDeltaTime();\n // Frame que se dibujará\n TextureRegion region = animatedSprite.getKeyFrame(timerAnimacion);\n //batch.draw(region, sprite.getX(), sprite.getY());\n //Escalar\n sprite.setRegion(region);\n sprite.draw(batch);\n\n\n }",
"void collisionHappened(int position);",
"public void mo5968e() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{-((float) C1413m.f5711i.getHeight()), 0.0f}).setDuration(240);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{0.0f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f}).setDuration(240);\n duration.start();\n duration2.start();\n long j = (long) 160;\n ObjectAnimator.ofFloat(this.f5436pa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, 0.2f, 0.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5438qa, \"alpha\", new float[]{1.0f, 0.0f}).setDuration(j).start();\n duration.addListener(new C1302Xa(this));\n }",
"public void draw(){\n hit();\n hit();\n }",
"@Override\r\n protected boolean hasAnimation() {\r\n return true;\r\n }",
"@Override\n public boolean hasOverlappingRendering() {\n return false;\n }",
"@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 }",
"@Override\n\tpublic void render () {\n\t\tGdx.gl.glClearColor(1, 0, 0, 1);\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\t\tbatch.begin();\n\t\tif (gameOver) {\n\t\t\tbatch.draw(textureGameOver, 0, 0);\n\t\t\tbatch.draw(textureRematch, (WIDTH/2) - (textureRematch.getWidth()/2), 128);\n\n\t\t\tif (player1.character.getHitPoints() <= 0)\n\t\t\t{\n\t\t\t\tbatch.draw(texture2wins, (WIDTH/2) - (texture2wins.getWidth()/2), 416);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbatch.draw(texture1wins,(WIDTH/2) - (texture1wins.getWidth()/2),416);\n\t\t\t}\n\t\t\tbatch.end();\n\n\t\t\tKeyboard masterKey = new Keyboard();\n\t\t\tif (masterKey.isEnterPressed())\n\t\t\t{\n\t\t\t\tgameOver = false;\n\t\t\t\tcreate();\n\t\t\t}\n\t\t}\n\t\t\t/*\n\t\t\tString str;\n\t\t\tif (player1.character.getHitPoints() <= 0)\n\t\t\t\tstr = \"Two\";\n\t\t\telse\n\t\t\t\tstr = \"One\";\n\t\t\tswitch (PopUpQuestion.TwoOptions(null, \"Play again!\", \"Exit\", \"Player \" + str + \" Wins!\", \" \"))\n\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\t\tdispose();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tdispose();*/\n\t\telse if (!paused) {\n\t\t\tdrawRefresh();\n\t\t\tball.render();\n\t\t\tplayer1.render();\n\t\t\tplayer2.render();\n\t\t\tcheckForHits();\n\t\t}\n\t\telse// if (paused)\n\t\t{\n\t\t\tbatch.draw(backgroundImage, 0, 0);\n\t\t\tbatch.draw(textureShade, 0, 0);\n\t\t\tbatch.draw(texturePause, (WIDTH / 2) - (texturePause.getWidth() / 2), (HEIGHT / 2) - (texturePause.getHeight() / 2) + 50);\n\t\t\tbatch.draw(textureControls, 0, 0);\n\t\t\tbatch.end();\n\t\t\tif (player1.doUnpause() || player2.doUnpause())\n\t\t\t\tpause(false);\n\t\t}\n\t}",
"private void collision(){\n\t\tboolean touched = false;\n\t\tboolean hit;\n\t\tint j =0;\n\t\twhile ( j< this.game_.getSaveBaby().size() && !touched){\n\t\t\tBabyBunnies b = this.game_.getSaveBaby().get(j);\n\t\t\ttouched = this.game_.getBunnyHood().getPosition().dst(b.getPosition())<=80;\n\t\t\thit = this.game_.getWolf().getPosition().dst(b.getPosition())<=80;\n\t\t\tif (touched){\n\t\t\t\tthis.game_.setBabySaved(b);\n\t\t\t}\n\t\t\tif (hit){\n\t\t\t\tthis.game_.wolfCatchBunnies(b);\n\t\t\t\t/**\n\t\t\t\t * Test de callback, retour vers l app android\n\t\t\t\t */\n\t\t\t\tif(this.game_.getScoreWolf()==3){\n\t\t\t\t\tif (this.gameCallBack != null) {\n\n this.gameCallBack.gameOverActivity(this.game_.getScoreBunny());\n\t\t\t\t\t\tthis.isGameOver=true;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tGdx.app.log(\"MyGame\", \"To use this class you must implement MyGameCallback!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t}",
"public void toggleAnim(boolean show) {\n if (animatorSet != null) {\n if (preAnimationEndAlpha == (show ? 1f : 0f)) {\n return;\n } else {\n animatorSet.cancel();\n }\n }\n if (show) {\n toogleVisible(mContainer, 0f, 1f, SmoothImageView.ANIMATION_DURATION);\n /* boolean needShow = false;\n for (View control : mControlsVisible.keySet()) {\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 begin\n Boolean prevVisibility = mControlsVisible.get(control);\n needShow = needShow || prevVisibility;\n if (!prevVisibility) {\n continue;\n }\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 end\n toogleVisible(control, 0f, 1f, SmoothImageView.ANIMATION_DURATION);\n }\n if (needShow) {\n toogleVisible(mContainer, 0f, 1f, SmoothImageView.ANIMATION_DURATION);\n }*/\n preAnimationEndAlpha = 1f;\n } else {\n toogleVisible(mContainer, 1f, 0f, SmoothImageView.ANIMATION_DURATION);\n /* for (View control : mControlsVisible.keySet()) {\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 begin\n Boolean prevVisibility = mControlsVisible.get(control);\n if (!prevVisibility) {\n continue;\n }\n //[BUGFIX]-Modify by TCTNJ, dongliang.feng, 2015-06-23, PR1027856 end\n toogleVisible(control, 1f, 0f, SmoothImageView.ANIMATION_DURATION);\n }*/\n preAnimationEndAlpha = 0f;\n }\n if (animatorSet != null) {\n animatorSet.start();\n }\n }",
"public void loadContent(AssetManager manager) {\n\t\tif (worldAssetState != AssetState.LOADING) {\n\t\t\treturn;\n\t\t}\n\t\tmanager.finishLoading();\n\t\t\n\n\t\tint cols = 11;\n\t\tint rows = 1;\n\n\t\t//animationDef\n\t\t//load the animation content here\n\n\t\tlilyFrames = splice(4, 12, 47, LILY_TEXTURE);\n\n\t\tlilyFramesDay = splice(4, 12, 47, LILY_TEXTURE);\n\t\tlilyFramesNight = splice(24, 2, 47, LILY_TEXTURE_N);\n\t\tlilyFramesSunset = splice(24, 2, 47, LILY_TEXTURE_S);\n\n\n\t\tgoalFrames = splice(4,20, GOAL_TEXTURE);\n\t\tgoalAnimation = new Animation(.01f, goalFrames);\n\t\t//lilyAnimation = new Animation(.2f, lilyFrames);\n\t\t\n\t\tenemyFrames = splice(4, 10, 39, ENEMY_TEXTUREA);\n\t\tenemyAnimation = new Animation(.02f, enemyFrames);\n\n\n\t\tcols = 11;\n\t\trows = 1;\n\n\n\t\tclosedFlowerFramesDay = splice(26, 1, \"tethers/Floating_Closed_Day_small.png\");\n\t\tclosedFlowerFramesNight = splice(26, 1, \"tethers/Floating_Closed_Night_small.png\");\n\t\tclosedFlowerFramesSunset = splice(26, 1, \"tethers/Floating_Closed_Sunset_small.png\");\n\t\tclosedFlowerFramesT = splice(23, 1, \"tethers/Floating_Closed_Sunset2.png\");\n\n\n\t\tint index = 0;\n\n\t\topenFlowerFramesDay = splice(26, 1, \"tethers/Floating_Open_Day_small.png\");\n\t\topenFlowerFramesNight = splice(26, 1, \"tethers/Floating_Open_Night_small.png\");\n\t\topenFlowerFramesSunset = splice(26, 1, \"tethers/Floating_Open_Sunset_small.png\");\n\t\topenFlowerFramesT = splice(23, 1, \"tethers/Floating_Open_Sunset2.png\");\n\n\n\t\tcols = 8; \n\n\t\topeningFlowerFramesDay = splice(26, 1, \"tethers/Opening_Flower_Day_small.png\" );\n\t\topeningFlowerFramesNight = splice(26, 1, \"tethers/Opening_Flower_Night_small.png\");\n\t\topeningFlowerFramesSunset = splice(26, 1, \"tethers/Opening_Flower_Sunset_small.png\");\n\t\topeningFlowerFramesT = splice(26, 1, \"tethers/Opening_Flower_Sunset2.png\");\n\n\t\tclosingFlowerFramesDay = splice(26, 1, \"tethers/Closing_Flower_Day_small.png\");\n\t\tclosingFlowerFramesNight = splice(26, 1, \"tethers/Closing_Flower_Night_small.png\");\n\t\tclosingFlowerFramesSunset = splice(26, 1, \"tethers/Closing_Flower_Sunset_small.png\");\n\t\tclosingFlowerFramesT = splice(26, 1, \"tethers/Opening_Flower_Sunset2.png\");\n\n\t\tcols = 12;\n\t\tkoiSSheet = new Texture(Gdx.files.internal(\"koi/Straight_Koi.png\"));\n\t\tTextureRegion[][] tmpkoiS = TextureRegion.split(koiSSheet, koiSSheet.getWidth()/cols, koiSSheet.getHeight()/rows); // #10\n\t\tkoiSFrames = new TextureRegion[cols * rows];\n\t\tindex = 0;\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tkoiSFrames[index++] = tmpkoiS[i][j];\n\t\t\t}\n\t\t}\n\t\tkoiSAnimation = new Animation(.05f, koiSFrames); \n\t\tkoiSspriteBatch = new SpriteBatch(); \n\n\t\tcols = 31;\n\n\t\t//remeber kiddies, animate both directions\n\t\tkoiCSheet = new Texture(Gdx.files.internal(\"koi/curve_koi.png\"));\n\n\t\tTextureRegion[][] tmpkoiC = TextureRegion.split(koiCSheet, koiCSheet.getWidth()/cols, koiCSheet.getHeight()/rows); // #10\n\t\tTextureRegion[][] tmpkoiCFlipped = TextureRegion.split(koiCSheet, koiCSheet.getWidth()/cols, koiCSheet.getHeight()/rows); // #10\n\n\t\tkoiCFrames = new TextureRegion[cols * rows];\n\t\tkoiCFramesFlipped = new TextureRegion[cols * rows];\n\t\tindex = 0;\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\t//tmpkoiC[i][j].flip(false, true);\n\t\t\t\tkoiCFrames[index] = tmpkoiC[i][j];\n\t\t\t\ttmpkoiCFlipped[i][j].flip(false, true);\n\t\t\t\tkoiCFramesFlipped[index++] = tmpkoiCFlipped[i][j];\n\t\t\t}\n\t\t}\n\t\tkoiCAnimation = new Animation(.02f, koiCFrames); \n\t\tkoiCAnimationFlipped = new Animation(.02f, koiCFramesFlipped);\n\n\n\n\t\tenergyBarTexture = createTexture(manager, ENERGYBAR_TEXTURE, false);\n\t\t//enemyTexture = createTexture(manager,ENEMY_TEXTURE,false);\n\t\tenemyTexture = enemyFrames[0];\n\t\tkoiTexture = koiSFrames[0];\n\t\t//koiTexture = createTexture(manager, KOI_TEXTURE, false);\n\n\t\t//lilyTexture = lilyFramesNight[0];\n\t\tlilyTexture = lilyFrames[0];\n\t\tlanternTexture = closedFlowerFramesDay[0];\n\t\tlightingTexture = createTexture(manager, LIGHTING_TEXTURE, false);\n\t\tshadowTexture = createTexture(manager, SHADOW_TEXTURE, false);\n\t\t//goalTexture = createTexture(manager, GOAL_TEXTURE, false);\n\t\tgoalTexture = goalFrames[0];\n\n\t\tUILotusTexture = createTexture(manager, UI_FLOWER, false);\t\n\n\t\tearthTile = createTexture(manager,EARTH_FILE_N,true);\n\t\tearthTileDay = createTexture(manager,EARTH_FILE_D, true);\n\t\tearthTileNight = createTexture(manager,EARTH_FILE_N, true);\n\t\tearthTileSunset = createTexture(manager,EARTH_FILE_S, true);\n\t\tshoreTile = createTexture(manager,SHORE_FILE,true);\n\n\t\trockDay = createTexture(manager,ROCK_FILE_D, true);\n\t\trockNight = createTexture(manager,ROCK_FILE_N, true);\n\t\trockSunset = createTexture(manager,ROCK_FILE_S, true);\n\n\t\t\n\t\t\n\t\twhirlpoolTexture = createTexture(manager, WHIRLPOOL_TEXTURE, true);\n\n\t\tkoiArrow = createTexture(manager, KOI_ARROW, false);\n\t\twhirlArrow = createTexture(manager, WHIRL_ARROW, false);\n\t\t\n\t\ttutorial1 = createTexture(manager, TUTORIAL_TEXTURE1, false);\n\t\ttutorial2 = createTexture(manager, TUTORIAL_TEXTURE2, false);\n\t\ttutorial3 = createTexture(manager, TUTORIAL_TEXTURE3, false);\n\t\ttutorial4 = createTexture(manager, TUTORIAL_TEXTURE4, false);\n\t\ttutorial5 = createTexture(manager, TUTORIAL_TEXTURE5, false);\n\t\ttutorial6 = createTexture(manager, TUTORIAL_TEXTURE6, false);\n\t\t\n\t\thelpTexture = createTexture(manager, HELP_TEXTURE, false);\n\n\t\t// Allocate the tiles\n\n\t\t\n\t\t//setBackground(manager.get(BACKGROUND_FILE_N, Texture.class), 2);\n\t\tsetBackground(createTexture(manager, BACKGROUND_FILE_N, false).getTexture(), 2);\n\t\tgetBackground(2).setWrap(TextureWrap.Repeat, TextureWrap.Repeat);\n\n\t\tsetBackground(createTexture(manager, BACKGROUND_FILE_D, false).getTexture(), 0);\n\t\tgetBackground(0).setWrap(TextureWrap.Repeat, TextureWrap.Repeat);\n\n\t\tsetBackground(createTexture(manager, BACKGROUND_FILE_S, false).getTexture(), 1);\n\t\tgetBackground(1).setWrap(TextureWrap.Repeat, TextureWrap.Repeat);\n\n\t\toverlay = createTexture(manager, OVERLAY_FILE, true).getTexture();\n\t\toverlay.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);\n\n\t\t// Allocate the font\n\t\tif (manager.isLoaded(FONT_FILE)) {\n\t\t\tdisplayFont = manager.get(FONT_FILE,BitmapFont.class);\n\t\t} else {\n\t\t\tdisplayFont = null;\n\t\t}\n\n\t\tif (manager.isLoaded(FONT_FILE2)) {\n\t\t\tsecondFont = manager.get(FONT_FILE2,BitmapFont.class);\n\t\t} else {\n\t\t\tsecondFont = null;\n\t\t}\n\t\t\n\t\tlightingSound = Gdx.audio.newMusic(Gdx.files.internal(LIGHTING_SOUND));\n\t\tlightingSound.setLooping(false);\n\t\t\n\t\tclickSound = Gdx.audio.newMusic(Gdx.files.internal(MENU_CLICK_SOUND));\n\t\tclickSound.setLooping(false);\n\t\t\n\t\tfailSound = Gdx.audio.newMusic(Gdx.files.internal(FAIL_SOUND));\n\t\tfailSound.setLooping(false);\n\t\t\n\t\twhirlSound = Gdx.audio.newMusic(Gdx.files.internal(WHIRL_SOUND));\n\t\twhirlSound.setLooping(false);\n\t\twhirlSound.setPosition(7);\n\t\t\n\t\tworldAssetState = AssetState.COMPLETE;\n\t}",
"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 }",
"public void update(float dt) {\r\n\t\tif (pauseMenuActive() || isComplete() || isFailure()) return;\r\n\t\taction = movementController.update();\r\n\t\tplatformController.update(dt);\r\n\r\n\t\tCharacterModel lead = movementController.getLead();\r\n\t\tCharacterModel avatar = movementController.getAvatar();\r\n\t\tholdingHands = movementController.isHoldingHands();\r\n\r\n\t\tif (movementController.getSwitchedCharacters()) {\r\n\t\t\tswitching = !switching;\r\n\r\n\t\t}\r\n\t\t// Increase animation frame of background\r\n\t\tbackgroundAnimeframe += backgroundAnimationSpeed;\r\n\t\tif (backgroundAnimeframe >= backgroundNumAnimFrames) {\r\n\t\t\tbackgroundAnimeframe = 0;\r\n\t\t}\r\n\r\n\t\tif(holdingHands){\r\n\t\t\tif(lead == somni){\r\n\t\t\t\t// draw somni, phobia, and the hands\r\n\t\t\t\tcombined.setTexture(somnisTexture[action], animationSpeed[action], framePixelWidth[action], offsetsX[action], offsetsY[action],\r\n\t\t\t\t\t\tphobiasTexture[action], animationSpeed[action], framePixelWidth[action], secOffsetsX[action], secOffsetsY[action],\r\n\t\t\t\t\t\tsomniPhobiaHandsTexture, thirdOffsetsX[action], thirdOffsetsY[action]);\r\n\t\t\t}else{\r\n\t\t\t\t// draw phobia, somni, and the hands\r\n\t\t\t\tcombined.setTexture(phobiasTexture[action], animationSpeed[action], framePixelWidth[action], offsetsX[action], offsetsY[action],\r\n\t\t\t\t\t\tsomnisTexture[action], animationSpeed[action], framePixelWidth[action], secOffsetsX[action], secOffsetsY[action],\r\n\t\t\t\t\t\tphobiaSomniHandsTexture, thirdOffsetsX[action], thirdOffsetsY[action]);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(avatar == somni){\r\n\t\t\t\t// draw somni\r\n\t\t\t\tif ((action == 2 || action ==3 || action ==5)&& !avatar.justPropelled()) {\r\n\t\t\t\t\tint facing = somni.isFacingRight()? 1:-1;\r\n\t\t\t\t\t//draw somni with small dash ring\r\n\t\t\t\t\tsomni.setTexture(somnisTexture[action], animationSpeed[action], framePixelWidth[action], 0, 0,\r\n\t\t\t\t\t\t\tyellowRingSmallTexture, 0.2f, 128, 0, -5, facing * dashAngles[action]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (movementController.canHoldHands()){\r\n\t\t\t\t\t\t// somni reaches out hand when phobia within distance\r\n\t\t\t\t\t\tint f = movementController.faceTowards();\r\n\t\t\t\t\t\tsomni.setTexture(somnisTexture[action], animationSpeed[action], framePixelWidth[action], 0, 0,\r\n\t\t\t\t\t\t\t\tsomniHandsTextures[f], thirdOffsetsX[action+6*(f+1)], thirdOffsetsY[action]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// only draw somni\r\n\t\t\t\t\t\tsomni.setTexture(somnisTexture[action], animationSpeed[action], framePixelWidth[action]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// draw phobia\r\n\t\t\t\tif (action == 2 && somni.justPropelled()){\r\n\t\t\t\t\t// draw phobia and a propelling hand\r\n\t\t\t\t\tphobia.setTexture(phobiaIdleTexture, animationSpeed[0], framePixelWidth[0], 0, 0,\r\n\t\t\t\t\t\t\tblueRingBigTexture, 0.2f, 128, secOffsetsX[action], secOffsetsY[action], propelAngles[action]);\r\n\t\t\t\t} else if ((action == 3 || action == 5) && somni.justPropelled()) {\r\n\t\t\t\t\t// draw phobia and an upward propelling hand\r\n\t\t\t\t\tint facing = phobia.isFacingRight()? 1:-1;\r\n\t\t\t\t\tphobia.setTexture(phobiaIdleTexture, animationSpeed[0], framePixelWidth[0], 0, 0,\r\n\t\t\t\t\t\t\tblueRingBigTexture, 0.2f, 128, secOffsetsX[action], secOffsetsY[action], facing*propelAngles[action]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// only draw phobia\r\n\t\t\t\t\tphobia.setTexture(phobiaIdleTexture, animationSpeed[0], framePixelWidth[0]);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\t// draw the leading character phobia\r\n\t\t\t\tif ((action == 2 || action == 3 || action == 5) && !avatar.justPropelled()){\r\n\t\t\t\t\tint facing = phobia.isFacingRight()? 1:-1;\r\n\t\t\t\t\t// draw phobia with small dash ring\r\n\t\t\t\t\tphobia.setTexture(phobiasTexture[action], animationSpeed[action], framePixelWidth[action], 0, 0,\r\n\t\t\t\t\t\t\tblueRingSmallTexture, 0.2f, 128, 0, -5, facing*dashAngles[action]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (movementController.canHoldHands()){\r\n\t\t\t\t\t\t// phobia reaches out hand when somni within distance\r\n\t\t\t\t\t\tint f = movementController.faceTowards();\r\n\t\t\t\t\t\tphobia.setTexture(phobiasTexture[action], animationSpeed[action], framePixelWidth[action], 0, 0,\r\n\t\t\t\t\t\t\t\tphobiaHandsTextures[f], thirdOffsetsX[action+6*(f+1)], thirdOffsetsY[action]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// only draw phobia\r\n\t\t\t\t\t\tphobia.setTexture(phobiasTexture[action], animationSpeed[action], framePixelWidth[action]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// draw the idle character somni\r\n\t\t\t\tif (action == 2 && phobia.justPropelled()){\r\n\t\t\t\t\t// draw somni with a propelling hand\r\n\t\t\t\t\tsomni.setTexture(somniIdleTexture, animationSpeed[0], framePixelWidth[0],0, 0,\r\n\t\t\t\t\t\t\tyellowRingBigTexture, 0.2f, 128, secOffsetsX[action], secOffsetsY[action], propelAngles[action]);\r\n\t\t\t\t} else if ( (action == 3 || action ==5 ) && phobia.justPropelled()) {\r\n\t\t\t\t\tint facing = somni.isFacingRight()? 1:-1;\r\n\t\t\t\t\tsomni.setTexture(somniIdleTexture, animationSpeed[0], framePixelWidth[0], 0, 0,\r\n\t\t\t\t\t\t\tyellowRingBigTexture, 0.2f, 128, secOffsetsX[action], secOffsetsY[action], facing*propelAngles[action]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// only draw somni\r\n\t\t\t\t\tsomni.setTexture(somniIdleTexture, animationSpeed[0], framePixelWidth[0]);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tmovementController.setJustSeparated(false);\r\n\t\t\tmovementController.setJustPropelled(false);\r\n\t\t}\r\n\r\n\t\t// Set camera position bounded by the canvas size\r\n\t\tcamera = canvas.getCamera();\r\n\r\n\t\tif (cameraCenter == null) {\r\n\t\t\tcameraCenter = new Vector2(avatar.getX(), avatar.getY());\r\n\t\t\tcameraCenter.x = avatar.getX();\r\n\t\t\tcameraCenter.y = avatar.getY();\r\n\t\t}\r\n\r\n\t\tfloat PAN_DISTANCE = 100f;\r\n\t\tfloat CAMERA_SPEED = 10f;\r\n\r\n\t\tfloat newX = avatar.getX() * canvas.PPM;\r\n\t\tfloat camX = InputController.getInstance().getCameraHorizontal();\r\n\t\tif (camX != 0) {\r\n\t\t\tpanMovement.x = camX * CAMERA_SPEED * canvas.PPM;\r\n\t\t} else {\r\n\t\t\tpanMovement.x = 0;\r\n\t\t}\r\n\r\n\t\tfloat camY = InputController.getInstance().getCameraVertical();\r\n\t\tif (camY != 0) {\r\n\t\t\tpanMovement.y = camY * CAMERA_SPEED * canvas.PPM;\r\n\t\t} else {\r\n\t\t\tpanMovement.y = 0;\r\n\t\t}\r\n\r\n\t\tfloat newY = avatar.getY() * canvas.PPM;\r\n\r\n\t\tnewX = Math.min(newX, widthUpperBound);\r\n\t\tnewX = Math.max(canvas.getWidth() / 2, newX);\r\n\t\tfloat displacementX = newX - camera.position.x;\r\n\t\tfloat lerpDisplacementX = Math.abs(displacementX + panMovement.x) < PAN_DISTANCE * canvas.PPM ?\r\n\t\t\t\tdisplacementX + panMovement.x : displacementX;\r\n\t\tcamera.position.x += lerpDisplacementX * LERP * dt;\r\n\r\n\t\tnewY = Math.min(newY, heightUpperBound);\r\n\t\tnewY = Math.max(canvas.getHeight() / 2, newY);\r\n\t\tfloat displacementY = newY - camera.position.y;\r\n\t\tfloat lerpDisplacementY = Math.abs(displacementY + panMovement.y) < PAN_DISTANCE * canvas.PPM ?\r\n\t\t\t\tdisplacementY + panMovement.y : displacementY;\r\n\t\tcamera.position.y += lerpDisplacementY * LERP * dt;\r\n\r\n\t\tcamera.update();\r\n\r\n\t}",
"@Override\n\tpublic void render() {\n\t\tupdate();\n\n\t\tGdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); // clear the screen\n\t\tbatch.begin();\n\n\t\tTextureRegion tmpRegion = null;\n\t\t\n\t\t// Draw the terrain!\n\t\tfor (int x = 0; x < 30; ++x) {\n\t\t\tfor (int y = 0; y < 20; ++y) {\n\t\t\t\ttmpRegion = new TextureRegion( tileset32Texture, (tiles[x][y] - 4) * 32, 0, 32, 32);\n\t\t\t\t//pause_button_region = new TextureRegion( spriteSheet, tiles[x][y] - 4, 0, 32, 32);\n\t\t\t\t// switch to 32x32 sprite\n\t\t\t\t//batch.draw(spriteSheet, x * 16, y * 16, tiles[x][y] * 16, 0, 16, 16);\n\t\t\t\tbatch.draw(tmpRegion, x * SQUARE_WIDTH, y * SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH);\n\n\t\t\t\t// Temporary, copy pasta\n\t\t\t\t/*\n\t\t\t\t * switch( movementDirs[x][y] ) { case 'N': batch.draw(\n\t\t\t\t * spriteSheet, x*16, y*16, 11*16, 0, 16, 16 ); break; case 'E':\n\t\t\t\t * batch.draw( spriteSheet, x*16, y*16, 12*16, 0, 16, 16 );\n\t\t\t\t * break; case 'W': batch.draw( spriteSheet, x*16, y*16, 13*16,\n\t\t\t\t * 0, 16, 16 ); break; case 'S': batch.draw( spriteSheet, x*16,\n\t\t\t\t * y*16, 14*16, 0, 16, 16 ); break; }\n\t\t\t\t */\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t// Draw the towers\n\t\tfor( int i = 0; i < towers.size(); ++i )\n\t\t{\n\t\t\tbatch.draw(towers.get(i).m_type.getTextureRegion(), towers.get(i).m_x * SQUARE_WIDTH, (towers.get(i).m_y) * SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH);\n\t\t\t//drawSprite(towers.get( i ).getIconNum(), towers.get(i).m_x, towers.get(i).m_y);\n\t\t\tif (towers.get(i).selected) {\n\t\t\t\t//batch.draw(spriteSheet, towers.get(i).m_x * SQUARE_WIDTH, towers.get(i).m_y * SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, towers.get(i).m_type.getSpriteLocX(), towers.get(i).m_type.getSpriteLocY(), 16, 16, false, true);\n\t\t\t\t//drawSprite(towers.get( i ).getIconNum(), towers.get(i).m_x, towers.get(i).m_y);\n\t\t\t\tbatch.draw(selectionImg, towers.get(i).m_x * SQUARE_WIDTH, towers.get(i).m_y * SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 0, 0, 32, 32, false, true);\n\t\t\t}\n\n\t\t\t\n\t\t}\n\n\t\t// Draw the creeps!\n\t\tfor( int i = 0; i < creeps.size(); ++i)\n\t\t{\n\n\t\t\tif( creeps.get(i).active ) {\n\t\t\t\tTextureRegion toUse = null;\n\t\t\t\t//TextureRegion toUse = new TextureRegion(corporateCreepTexture);\n\t\t\t\tif (creeps.get(i).m_type == CreepType.GLOBAL_CORP) {\n\t\t\t\t\ttoUse = new TextureRegion(corporateCreepTexture);\n\t\t\t\t} else if (creeps.get(i).m_type == CreepType.SEARCHER) {\n\t\t\t\t\ttoUse = new TextureRegion(defconZeplinTexture);\n\t\t\t\t} else if (creeps.get(i).m_type == CreepType.GOVERNMENT) {\n\t\t\t\t\ttoUse = new TextureRegion(govHeliTexture);\n\t\t\t\t} else {\n\t\t\t\t\t// TODO: Change this to difference art.\n\t\t\t\t\ttoUse = new TextureRegion(corporateCreepTexture);\n\t\t\t\t}\n\t\t\t\tbatch.draw(toUse, creeps.get(i).x * SQUARE_WIDTH + creeps.get(i).xOffset, creeps.get(i).y * SQUARE_WIDTH + creeps.get(i).yOffset, SQUARE_WIDTH, SQUARE_WIDTH);\n\t\t\t\t//batch.draw(toUse, creeps.get(i).x * SQUARE_WIDTH + creeps.get(i).xOffset, creeps.get(i).y * SQUARE_WIDTH + creeps.get(i).yOffset, SQUARE_WIDTH, SQUARE_WIDTH, 0, 32, 32, 32, false, false);\n\t\t\t}\n\t\t}\n\n\t\t// Draw the projectiles!\n\t\tfor( int i = 0; i < maxProjectiles; ++i )\n\t\t{\n\t\t\tif( projectiles[i].active )\n\t\t\t{\n//\t\t\t\tbatch.draw( spriteSheet, projectiles[i].my_coords.x*SQUARE_WIDTH, projectiles[i].my_coords.y*SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 0, 16*3, 16, 16, false, false);\n\t\t\t\tif (projectiles[i].towertype == \"judge\"){\n\t\t\t\t\tbatch.draw( spriteSheet, projectiles[i].my_coords.x*SQUARE_WIDTH, projectiles[i].my_coords.y*SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 0, 16*3, 16, 16, false, false);\n\t\t\t\t} else if (projectiles[i].towertype == \"teacher\"){\n\t\t\t\t\tbatch.draw( spriteSheet, projectiles[i].my_coords.x*SQUARE_WIDTH, projectiles[i].my_coords.y*SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 16, 16*3, 16, 16, false, false);\n\t\t\t\t} else if (projectiles[i].towertype == \"lawyer\"){\n\t\t\t\t\tbatch.draw( spriteSheet, projectiles[i].my_coords.x*SQUARE_WIDTH, projectiles[i].my_coords.y*SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 32, 16*3, 16, 16, false, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Draw the UI!\n\n\t\t// Background\n\n\t\tbatch.draw(blackBox, 0, 0, uiPanelWidth , screenHeight);\n\n\t\t// Draw the menu bar\n\t\tbatch.draw(menuTexture,-4,-190);\n\t\t//batch.draw(menu_region, 0, -100);\n\t\t\n\t\t// Draw the free towers.\n\t\t\n\t\tfor (int i = 1; i <= 3; i++) \n\t\t{\n\t\t\tif (free_towers.get(i-1) != null) \n\t\t\t{\n\t\t\t\t//tower_region.setRegion( free_towers.get(i-1).getSpriteLocX(), free_towers.get(i-1).getSpriteLocY(), 16, 16 );\n\t\t\t\tbatch.draw(free_towers.get(i-1).getTextureRegion(), 29, (screenHeight - 60 * i) + 5, SQUARE_WIDTH, SQUARE_WIDTH);\n\t\t\t\t//batch.draw(tower_region, 33, screenHeight - 57 * i, 16, 16);\n\t\t\t\t\n\t\t\t\tString towerPrice = \"$\" + free_towers.get(i-1).getPrice();\n\t\t\t\tTextBounds priceBounds = mFont.getBounds(towerPrice);\n\t\t\t\tColor oldColor = mFont.getColor();\n\t\t\t\tmFont.setColor(Color.GREEN);\n\t\t\t\tmFont.drawWrapped(batch, towerPrice, 10, 33 + screenHeight - 58*i + priceBounds.height, priceBounds.width);\n\t\t\t\tmFont.setColor(oldColor);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t// Keep the GC in its cage as long as possible. \n\t\tif( oldMoney != money || oldLife != life )\n\t\t{\n\t\t\tuiString = \"+: \" + life + '\\n' + \"$: \" + money;\n\t\t\tuiBounds = mFont.getMultiLineBounds(uiString);\n\t\t}\n\t\toldMoney = money;\n\t\toldLife = life;\n\t\t\t\t\n\t\t// Draw droid pause button if on an android device.\n\t\tif (runningDrd) {\n\t\t\t\n\t\t\tpause_button_region.setRegion(7*17, 23, 2, 2);\n\t\t\tbatch.draw(pause_button_region, DRD_PAUSE_RECT.x, DRD_PAUSE_RECT.y, DRD_PAUSE_RECT.width, DRD_PAUSE_RECT.height);\n\t\t\t\n\t\t\tString pause_button_string = \"Pause\";\n\t\t\tTextBounds pauseButtonBounds = mFont.getBounds(pause_button_string);\n\t\t\tmFont.drawWrapped(batch, pause_button_string,\n\t\t\t\t\t\t\t(32 - (pauseButtonBounds.width / 2)),\n\t\t\t\t\t\t\tDRD_PAUSE_RECT.y + pauseButtonBounds.height + 4, pauseButtonBounds.width);\n\t\t}\n\t\t\n\t\t// Draw the restart button if paused or game over.\n\t\tif (life <= 0 || isPaused) {\n\t\t\t\n\t\t\trestart_button_region.setRegion(7*17, 23, 2, 2);\n\t\t\tbatch.draw(restart_button_region, RESTART_RECT.x, RESTART_RECT.y, RESTART_RECT.width, RESTART_RECT.height);\n\t\t\t\n\t\t\tString restart_button_string = \"Restart\";\n\t\t\tTextBounds restartButtonBounds = mFont.getBounds(restart_button_string);\n\t\t\tmFont.drawWrapped(batch, restart_button_string,\n\t\t\t\t\t\t\t(32 - (restartButtonBounds.width / 2)),\n\t\t\t\t\t\t\tRESTART_RECT.y + restartButtonBounds.height + 4, restartButtonBounds.width);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// Draw the start button if we are in build mode.\n\t\tif (buildMode) {\n\t\t\t\n\t\t\tstart_button_region.setRegion(7*17, 23, 2, 2);\n\t\t\tbatch.draw(start_button_region, START_RECT.x, START_RECT.y, START_RECT.width, START_RECT.height);\n\t\t\t\n\t\t\tString start_button_string = \"Start\";\n\t\t\tTextBounds startButtonBounds = mFont.getBounds(start_button_string);\n\t\t\tmFont.drawWrapped(batch, start_button_string,\n\t\t\t\t\t\t\t(32 - (startButtonBounds.width / 2)),\n\t\t\t\t\t\t\tSTART_RECT.y + startButtonBounds.height + 4, startButtonBounds.width);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// Draw the sell button if we are not paused or in build mode and a tower is selected.\n\t\tif (!isPaused && !buildMode && selected != null) {\n\t\t\t\n\t\t\tsell_button_region.setRegion(7*17, 23, 2, 2);\n\t\t\tbatch.draw(sell_button_region, SELL_RECT.x, SELL_RECT.y, SELL_RECT.width, SELL_RECT.height);\n\t\t\t\n\t\t\tString sell_button_string = \"Sell\";\n\t\t\tTextBounds sellButtonBounds = mFont.getBounds(sell_button_string);\n\t\t\tmFont.drawWrapped(batch, sell_button_string,\n\t\t\t\t\t\t\t(32 - (sellButtonBounds.width / 2)),\n\t\t\t\t\t\t\tSTART_RECT.y + sellButtonBounds.height + 4, sellButtonBounds.width);\n\t\t}\n\t\t\n\t\t// Text\n\t\tString uiString = \"+ \" + life + '\\n' + \"$ \" + money;\n\t\tTextBounds uiBounds = mFont.getMultiLineBounds(uiString);\n\t\tColor oldColor = mFont.getColor();\n\t\tmFont.setColor(Color.RED);\n\t\tmFont.drawWrapped(batch, uiString, 3, uiBounds.height + 3, uiBounds.width);\n\t\tmFont.setColor(oldColor);\n\n\t\t// DEBUG TEXT\n\t\t//mFont.drawWrapped(batch, debugtext, 60, uiBounds.height + 3, 1000);\t\t\n\n\t\t// Draw the cursorTexture\n\t\tif (cursorState != null && cursorTexture != null) {\n\t\t\tbatch.draw(cursorTexture, cursorLocX - 8, screenHeight - cursorLocY - 8);\n\t\t}\n\t\t\n\t\t// Render Paused String if needed in bottom right corner.\n\t\tString center_string = null;\n\t\tif (isPaused) {\n\t\t\tcenter_string = \"PAUSED\";\n\t\t} else if (life <= 0) {\n\t\t\tcenter_string = \"GAME OVER\";\n\t\t}\n\t\t\n\t\tif (center_string != null) {\n\t\t\tTextBounds pausedBounds = mFont.getMultiLineBounds(center_string);\n\t\t\tColor oldColor2 = mFont.getColor();\n\t\t\tmFont.setColor(Color.RED);\n\t\t\tmFont.drawWrapped(batch, center_string,\n\t\t\t\t\t(screenWidth / 2) - (pausedBounds.width / 2),\n\t\t\t\t\t(screenHeight / 2) - (pausedBounds.height / 2), pausedBounds.width );\n\t\t\tmFont.setColor(oldColor2);\n\t\t}\n\t\t\n\t\tbatch.end();\n\t}",
"public void onUpdate()\n {\n super.onUpdate();\n this.jumpMovementFactor = 0.0F;\n this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;\n\n if (this.target != null && this.target instanceof EntityLiving)\n {\n EntityLiving var1 = (EntityLiving) this.target;\n\n if (var1.getHealth() <= 0 || !this.canEntityBeSeen(var1))\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n } else\n {\n if (this.target != null && this.target.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n\n if (this.target == null)\n {\n this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);\n\n if (this.target == null)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n\n return;\n }\n }\n }\n\n if (this.posX == (double) this.getOrgX() && this.posY == (double) this.getOrgY() && this.posZ == (double) this.getOrgZ())\n {\n if (!this.isReformed())\n {\n this.setReformed(true);\n }\n\n this.stop();\n this.moveTimer = 0;\n }\n\n if (this.slider == null)\n {\n Vec3 var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n MovingObjectPosition var18 = this.worldObj.rayTraceBlocks(var16, var2);\n var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\n if (var18 != null)\n {\n var2 = Vec3.createVectorHelper(var18.hitVec.xCoord, var18.hitVec.yCoord, var18.hitVec.zCoord);\n }\n\n if (!this.worldObj.isRemote)\n {\n Object var4 = null;\n List var15 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(4.0D, 4.0D, 4.0D));\n double var6 = 0.0D;\n\n for (int var8 = 0; var8 < var15.size(); ++var8)\n {\n Entity var9 = (Entity) var15.get(var8);\n\n if (var9.canBeCollidedWith() && var9 != this)\n {\n float var10 = 0.3F;\n\n if (var9 instanceof EntitySlider)\n {\n this.slider = (EntitySlider) var9;\n var18 = null;\n }\n\n AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);\n MovingObjectPosition var12 = var11.calculateIntercept(var16, var2);\n\n if (var12 != null)\n {\n double var13 = var16.distanceTo(var12.hitVec);\n\n if (var13 < var6 || var6 == 0.0D)\n {\n var6 = var13;\n }\n }\n }\n }\n }\n\n if (this.slider == null || this.slider.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n }\n } else if (this.slider.target != this.target)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n } else\n {\n this.fallDistance = 0.0F;\n double var17;\n double var5;\n double var3;\n\n if (this.gotMovement)\n {\n if (this.isCollided)\n {\n var17 = this.posX - 0.5D;\n var3 = this.boundingBox.minY + 0.75D;\n var5 = this.posZ - 0.5D;\n\n if (this.crushed)\n {\n this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, \"random.explode\", 3.0F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);\n this.worldObj.playSoundAtEntity(this, \"aeboss.slider.collide\", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));\n }\n\n this.stop();\n } else\n {\n if (this.speedy < 2.0F)\n {\n this.speedy += 0.035F;\n }\n\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n\n if (this.direction == 0)\n {\n this.motionY = (double) this.speedy;\n\n if (this.boundingBox.minY > (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY + 0.35D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 1)\n {\n this.motionY = (double) (-this.speedy);\n\n if (this.boundingBox.minY < (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY - 0.25D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 2)\n {\n this.motionX = (double) this.speedy;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 3)\n {\n this.motionX = (double) (-this.speedy);\n\n if (this.posX < (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 4)\n {\n this.motionZ = (double) this.speedy;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 5)\n {\n this.motionZ = (double) (-this.speedy);\n\n if (this.posZ < (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n }\n }\n } else\n {\n this.motionY = 0.0D;\n\n if (this.moveTimer > 0)\n {\n --this.moveTimer;\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n } else\n {\n var17 = Math.abs(this.posX - (this.reform ? (double) this.getOrgX() : this.target.posX));\n var3 = Math.abs(this.boundingBox.minY - (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY));\n var5 = Math.abs(this.posZ - (this.reform ? (double) this.getOrgZ() : this.target.posZ));\n\n if (var17 > var5)\n {\n this.direction = 2;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX))\n {\n this.direction = 3;\n }\n } else\n {\n this.direction = 4;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ))\n {\n this.direction = 5;\n }\n }\n\n if (var3 > var17 && var3 > var5 || var3 > 0.25D && this.rand.nextInt(5) == 0)\n {\n this.direction = 0;\n\n if (this.posY > (this.reform ? (double) this.getOrgY() : this.target.posY))\n {\n this.direction = 1;\n }\n }\n\n this.gotMovement = true;\n }\n }\n\n if (this.harvey > 0.01F)\n {\n this.harvey *= 0.8F;\n }\n }\n }",
"private TextureRegion createJumpingAnimation(MyCumulusGame game) {\n Texture jumping = game.getAssetManager().get(\"bird.png\");\n //todo check if this is correct\n return new TextureRegion(jumping, 2/3f,0f,1f,1/3f);\n }",
"@Override\n public void draw(Batch batch, float parentAlpha) {\n\n if(vidas == 0){\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-12,16,16);\n sprite.draw(batch);\n\n }else{\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-7,16,16);\n sprite.setPosition(body.getPosition().x - 9f, body.getPosition().y - 9);\n sprite.draw(batch);\n patrullar();\n }\n\n\n }",
"private void verificarColisiones() {\n if(inmunidadRamiro){\n tiempoInmunidadRamiro += Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidadRamiro>=6f){//despues de 0.6 seg, vuelve a ser vulnerable\n inmunidadRamiro=false;\n tiempoInmunidadRamiro=0f;\n ramiro.setEstadoItem(Ramiro.EstadoItem.NORMAL);\n musicaRayo.stop();\n if(music){\n musicaFondo.play();\n }\n\n }\n\n if (inmunidad){//Para evitar bugs, Ramiro puede tomar damage cada cierto tiempo...\n //Se activa cada vez que toma damage\n tiempoInmunidad+=Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidad>=0.6f){//despues de 0.6 seg, vuelve a ser vulnerable\n inmunidad=false;\n tiempoInmunidad=0f;\n }\n if (inmunidadItem){\n tiempoInmunidadItem+=Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidadItem>=0.6f){\n inmunidadItem=false;\n tiempoInmunidadItem=0f;\n\n }\n //Verificar colisiones de Item Corazon.\n for (int i=arrCorazonesItem.size-1; i>=0; i--) {\n Corazon cora = arrCorazonesItem.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(cora.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n\n arrCorazonesItem.removeIndex(i);\n agregarCorazon();\n inmunidadItem=true;\n }\n\n }\n\n }\n //Verifica colisiones Rayo emprendedor\n for (int i=arrRayoEmprendedor.size-1; i>=0; i--) {\n RayoEmprendedor rayo= arrRayoEmprendedor.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(rayo.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n\n arrRayoEmprendedor.removeIndex(i);\n inmunidadRamiro();\n\n }\n\n }\n\n }\n //coalisiones de las tareas\n for (int i=arrTarea.size-1; i>=0; i--) {\n Tarea tarea = arrTarea.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(tarea.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n agregarPuntos();\n arrTarea.removeIndex(i);\n inmunidadItem=true;\n }\n\n }\n\n }\n\n\n //Verifica colisiones de camioneta\n if(estadoMapa==EstadoMapa.RURAL || estadoMapa==EstadoMapa.RURALURBANO){\n for (int i=arrEnemigosCamioneta.size-1; i>=0; i--) {\n Camioneta camioneta = arrEnemigosCamioneta.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(camioneta.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n\n for (int i=arrEnemigoAve.size-1; i>=0; i--) {\n Ave ave = arrEnemigoAve.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(ave.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de carro de Lujo\n if(estadoMapa==EstadoMapa.URBANO || estadoMapa == EstadoMapa.URBANOUNIVERSIDAD){\n for (int i=arrEnemigosAuto.size-1; i>=0; i--) {\n Auto cocheLujo = arrEnemigosAuto.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(cocheLujo.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n\n for (int i=arrEnemigoAve.size-1; i>=0; i--) {\n Ave ave = arrEnemigoAve.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(ave.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de carrito de golf\n if(estadoMapa==EstadoMapa.UNIVERSIDAD){\n for (int i=arrEnemigosCarritoGolf.size-1; i>=0; i--) {\n AutoGolf carritoGolf = arrEnemigosCarritoGolf.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(carritoGolf.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de las lamparas\n if(estadoMapa==EstadoMapa.SALONES){\n for (int i=arrEnemigoLampara.size-1; i>=0; i--) {\n Lampara lampara = arrEnemigoLampara.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(lampara.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n //Verifica colisiones de las sillas\n for (int i=arrEnemigoSilla.size-1; i>=0; i--) {\n Silla silla = arrEnemigoSilla.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(silla.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n\n\n\n }",
"public void paintComponent(Graphics g) {\n\t\tDate end = new Date();\n\t\tlong points = end.getTime() - start.getTime();\n\t\t\n\t\tsuper.paintComponent(g);\n\t\tthis.setBackground(new Color(164, 242, 245));\n\t\tg.setColor(new Color(54, 140, 22));\n\t\tg.fill3DRect(0, 400, 500, 100, true); //\n\t\tfor (int i = 0; i < elements.length; i++) {\n\t\t\telements[i].draw(g);\n//\t\t\t elements[i].jump();\n\t\t\tif (player.checkCollision(elements[i])){\n\t\t\t\tanimation.stop();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Izgubio si\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tplayer.draw(g);\n\t\tg.drawString(Long.toString(points), 50, 50);\n\t}",
"public void displayGameMode (Graphics g1)\n {\n if (state == 1)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/1/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 2)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/2/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 3)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/3/plain.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 4)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/4/plain.png\").getImage(), 0, 0, null);\n }\n \n bird1.displayDisplayCharacter (g1);\n bird2.displayDisplayCharacter (g1);\n bird3.displayDisplayCharacter (g1);\n }",
"@Override\n\tpublic void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tanimateFace((int)circle.x, (int)circle.y, (int)circle2.x, (int)circle2.y);\n\t\tdrawFace(g);\n\t}",
"void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }",
"public void render(SpriteBatch batch) {\n if(!isFinished() && explosionType.equals(EXPLOSION_SUPER))\n Utils.drawTextureRegion(\n batch,\n Assets.instance.explosionAssets.superExplosionAnimation.getKeyFrame(Utils.timeInSecsSince(startTime)),\n position.x, position.y, DEFAULT_SCALE);\n\n // Draw smaller regular explosion as enemy's health decreases\n if(!isFinishedReg() && explosionType.equals(EXPLOSION_REGULAR))\n Utils.drawTextureRegion(\n batch,\n Assets.instance.explosionAssets.regularExplosionAnimation.getKeyFrame(Utils.timeInSecsSince(startTime)),\n position.x, position.y, DEFAULT_SCALE);\n }",
"@Override\n public boolean hasOverlappingRendering() {\n return false;\n }",
"@Override\n public boolean hasOverlappingRendering() {\n return false;\n }",
"public void render(Graphics g) {\n\t\tif(facing == 44) {// left moving\r\n\t\t\tLeft.drawAnimation(g, (int)x, (int)y, 32, 28);\r\n\t\t}\r\n\t\tif(facing == 4) {// left\r\n\t\t\tg.drawImage(tex.octorock[0], (int)x, (int)y, 32, 28, null);\r\n\t\t}\r\n\t\t\r\n\t\tif(facing == 66) {// right moving\r\n\t\t\tRight.drawAnimation(g, (int)x, (int)y, 32, 28);\r\n\t\t}\r\n\t\tif(facing == 6) {// right\r\n\t\t\tg.drawImage(tex.octorock[4], (int)x, (int)y, 32, 28, null);\r\n\t\t}\r\n\t\t\r\n\t\tif(facing == 88) {// up moving\r\n\t\t\tUp.drawAnimation(g, (int)x, (int)y, 32, 28);\r\n\t\t}\r\n\t\tif(facing == 8) {// up\r\n\t\t\tg.drawImage(tex.octorock[6], (int)x, (int)y, 32, 28, null);\r\n\t\t}\r\n\t\t\r\n\t\tif(facing == 22) {// down moving\r\n\t\t\tDown.drawAnimation(g, (int)x, (int)y, 32, 28);\r\n\t\t}\r\n\t\tif(facing == 2) {// down\r\n\t\t\tg.drawImage(tex.octorock[2], (int)x, (int)y, 32, 28, null);\r\n\t\t}\r\n\t\t\r\n\t\tif(facing == 666) {// dead\r\n\t\t\tDeath.drawAnimation(g, (int)x, (int)y, 32, 28);\r\n\t\t}\r\n\t\t\r\n\t\tif(facing == 0) {// one with the earth\r\n\t\t\tg.drawImage(tex.block[1], (int)x, (int)y, 32, 32, null);\r\n\t\t}\r\n\t\t\r\n\t\tGraphics2D g2d = (Graphics2D) g;\r\n\t\tg.setColor(Color.red);\r\n\t\t//hit boxes for Octorock\r\n\t\tg2d.draw(getBound());// bottom\r\n\r\n\t\t\r\n\t}",
"public void update(GameContainer gc, StateBasedGame sbg, int i) throws SlickException {\n\r\n //spriteID = new SpriteSheet(\"Images/Free/Main Characters/Pink Man/Run2 (32x32).png\",32,32);\r\n //CA = new Animation(spriteID,50);\r\n \r\n Franklen.CheckMove(gc);\r\n \r\n if(ground.getY()<=Franklen.getYP()+32){\r\n Franklen.setGround(true);\r\n }\r\n else{\r\n Franklen.setGround(false);\r\n }\r\n for (int k = 0; k < Apples.length; k++) {\r\n if(Franklen.getHitBox().intersects(Apples[k].getHitbox())&&Apples.length>0){\r\n \r\n Apples[k].setX(1000);\r\n \r\n apples++;\r\n }\r\n }\r\n \r\n\r\n if(finish.intersects(Franklen.getHitBox())&&apples==10){\r\n sbg.enterState(1, new FadeOutTransition(), new FadeInTransition());\r\n }\r\n }",
"protected void onCollision(Actor other) {\r\n\r\n\t}",
"public void onIntersect() {\n }",
"@Override\n public void collide(ScreenObject other) {\n switch (other.getType()) {\n case ASTEROID:\n hp -= other.dealDamage();\n break;\n case ENEMY:\n hp -= other.dealDamage();\n break;\n case ENEMYBULLET:\n hp -= other.dealDamage();\n break;\n case MACGUFFIN:\n macguffinsCollected++;\n break;\n case PORT:\n if (macguffinsCollected >= level.getMacguffinCount()\n && boundingCircle.contains(other.getPosition())) {\n Gdx.app.log(\"Ship\", \"level over\");\n //ends level\n }\n break;\n }\n }",
"public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }"
] | [
"0.63925886",
"0.59388083",
"0.579286",
"0.57673347",
"0.57483387",
"0.5743549",
"0.5743256",
"0.5656718",
"0.5655287",
"0.56240475",
"0.55897087",
"0.55645096",
"0.5563416",
"0.55573785",
"0.5533956",
"0.5521477",
"0.5505765",
"0.5455898",
"0.5440336",
"0.54037845",
"0.537152",
"0.5364884",
"0.5363703",
"0.5349362",
"0.533334",
"0.5330805",
"0.53281444",
"0.53218675",
"0.5290541",
"0.5278078",
"0.52703387",
"0.5270087",
"0.52697843",
"0.5267311",
"0.5248653",
"0.5242359",
"0.52376777",
"0.5230373",
"0.5227151",
"0.5225314",
"0.52249664",
"0.522411",
"0.5222305",
"0.52214605",
"0.52203876",
"0.52174956",
"0.5214964",
"0.5214161",
"0.5209954",
"0.52052945",
"0.5200991",
"0.5197258",
"0.5191187",
"0.5189866",
"0.5178347",
"0.5176359",
"0.51757205",
"0.51744354",
"0.5174279",
"0.516553",
"0.51559234",
"0.5154128",
"0.51507217",
"0.5148404",
"0.5137268",
"0.51358634",
"0.51265",
"0.51225114",
"0.5120442",
"0.5116888",
"0.51109236",
"0.5106706",
"0.5102076",
"0.509663",
"0.5091536",
"0.50872177",
"0.5086327",
"0.5083913",
"0.5081196",
"0.50799245",
"0.5077275",
"0.5076395",
"0.5072206",
"0.5070584",
"0.50702006",
"0.50686306",
"0.50677466",
"0.50653803",
"0.5064992",
"0.5060902",
"0.5058284",
"0.50545317",
"0.5051887",
"0.5051581",
"0.5051581",
"0.50509465",
"0.5046084",
"0.50396526",
"0.50337315",
"0.50335306",
"0.5032575"
] | 0.0 | -1 |
This method prevent the sprite move out of the window | public void checkIsFrogAtTheEdge() {
if (getY()<0 || getY()>800) {
setY(FrogPositionY);
}
if (getX()<-20) {
move(movementX*2, 0);
} else if (getX()>600) {
move(-movementX*2, 0);
}
if (getY()<130 && ! ((getIntersectingObjects(End.class).size() >= 1))) {
move(0, movementY*2);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void doMove() {\n if (((-Transform.getOffsetTranslation().getX() - (Game.getWindowWidth()) < getPosition().getX()\n && (-Transform.getOffsetTranslation().getX() + (Game.getWindowWidth() * 2)) > getPosition().getX()\n && (-Transform.getOffsetTranslation().getY() - (Game.getWindowHeight())) < getPosition().getY()\n && (-Transform.getOffsetTranslation().getY() + (Game.getWindowHeight() * 2)) > getPosition().getY()))) {\n addPosition(new Vector(Velocity).mult(Game.getDelta()));\n } else {\n Level().RemoveObject(this);\n }\n }",
"public void keepObjectInsideGameWindow(Vector2f position) {\n if(keepInsideWindow) {\n if(position.x > Game.WIDTH) {\n position.x = 0.0f;\n } else if(position.x < 0.0f) {\n position.x = Game.WIDTH;\n }\n if(position.y > Game.HEIGHT) {\n position.y = 0.0f;\n } else if(position.y < 0.0f) {\n position.y = Game.HEIGHT;\n }\n }\n }",
"public void dontMove() {\r\n\t\tspeed = 0;\r\n\t\tif(!playerNear().equals(\"n\")) {\r\n\t\t\tif(playerNear().equals(\"left\")) {\r\n\t\t\t\tsetIcon(leftImage);\r\n\t\t\t}\r\n\t\t\telse if(playerNear().equals(\"right\")) {\r\n\t\t\t\tsetIcon(rightImage);\r\n\t\t\t}\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}",
"protected void goAway() {\n\t\tthis.setVisible(false);\n\t\tthis.setBounds(-800, -800, mWidth, mHeight);\n\t}",
"private void limitScreenMovement() {\r\n\t\tif (x < counterLimit) {\r\n\t\t\tx = counterLimit;\r\n\t\t\tdx = 0;\r\n\t\t} else if (x >= 1) {\r\n\t\t\tMain.endGame();\r\n\t\t}\r\n\t}",
"private void moveOffScreen(GObject element) {\r\n\t\tif (element != null && (element.getX() > getWidth()|| element.getX() + element.getWidth() < 0)) {\r\n\t\t\tremove(element);\r\n\t\t\telement = null;\r\n\t\t}\r\n\t}",
"private void bulletMoveOffScreen() {\r\n\t\tif(bullet != null && (bullet.getX() > getWidth() || bullet.getX() < 0)){\r\n\t\t\tremove(bullet);\r\n\t\t\tbullet = null;\r\n\t\t}\r\n\t}",
"public void stopMoving()\n {\n mouthPosition = 0;\n }",
"public void stopMovement() {\r\n this.canMove = false;\r\n }",
"public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }",
"@Override\n\tpublic void move() {\n\t\tx += ((direction) * xSpeed);\n\t\t//If any sprite has collided with the left or right edge of the screen set collided to true\n\t\tif (x >= 800 - spriteImage.getWidth(null) || x <= 0) collided = true;\n\t}",
"public boolean offScreen() {\r\n\t\treturn (this.getY() < -TREE_HEIGHT || this.getY() > 1000); \r\n\t}",
"public void Move()\n {\n this.x += this.speed;\n\n //Cutoff the position\n if (this.x <= 2)\n {\n this.x = 2;\n }\n else if (this.x >= GameConstants.SCREEN_WIDTH - 2 * this.imageWidth)\n {\n this.x = GameConstants.SCREEN_WIDTH - 2 * this.imageWidth;\n }\n }",
"@Override\n public void update()\n {\n if(!Rect.intersects(spriteBounds, gameRegion) || wasTouched)\n {\n destroy();\n }\n else\n {\n spriteBounds.offset(0, speed);\n }\n }",
"void loopy() {\n if (position.y < -50) {\n position.y = Constants.height + 50;\n } else\n if (position.y > Constants.height + 50) {\n position.y = -50;\n }\n if (position.x< -50) {\n position.x = Constants.width +50;\n } else if (position.x > Constants.width + 50) {\n position.x = -50;\n }\n }",
"@Override\n public void onMove(boolean absolute) {\n \n }",
"public void move(){\n super.move();\n if(getX() >= Main.WIDTH - getWidth() * 1.5) {\n setDirection(-1);\n } else if(getX() <= 50) {\n setDirection(1);\n }\n }",
"public void move() {\n\t\tif (!visible) {\r\n\t\t\thideTurtle();\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic boolean canMove() {\r\n\t\treturn false;\r\n\t}",
"public void boom() {\n\t\tboom.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = boom;\n\t}",
"@Override\n\tpublic boolean isMovable() {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tif(game)\r\n\t\t\tpanel.getGame().stickOff();\r\n\t}",
"@Override\r\n public void onGameStart(){\r\n this.setVisible(false);\r\n }",
"public void makeInvisible()\n {\n wall.makeInvisible();\n roof.makeInvisible();\n window.makeInvisible();\n }",
"public void moveDown()\n\t{\n\t\ty = Math.min(y + 1, main.HEIGHT-1);\n\t\tsprite.setPosition(x*sprite.getWidth(),y*sprite.getHeight());\n\t}",
"public void stop() {\n this.setCurrentCell(0);\n this.setPicX(0);\n slowDownX();\n slowDownY();\n setMoving(false);\n if (moveDown) {\n this.setPicY(0);\n } else if (moveUp) {\n this.setPicY(211);\n } else if (moveLeft) {\n this.setPicY(141);\n } else if (moveRight) {\n this.setPicY(74);\n }\n }",
"public void act() \n {\n move(-2);\n\n if(getX() <= 0)\n {\n getWorld().removeObject(this);\n } \n\n }",
"@Override\n\tpublic boolean onMouseMove(MouseEvent event) {\n\t\treturn false;\n\t}",
"@Override\n public boolean isInScreen(){\n return this.getX() > App.START_COORDINATE_X - this.getSpriteImage().getWidth() / 2\n && this.getX() < App.SCREEN_WIDTH + this.getSpriteImage().getWidth() / 2;\n }",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tmoving = false;\n\t\t}",
"public void move() {\n\t\tx+= -1;\n\t\tif (x < 0) {\n\t\t\tx = (processing.width - 1);\n\t\t}\n\t\ty+= 1;\n\t\tif (y > processing.height-1)\n\t\t\ty=0;\n\t}",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\tsuper.mouseDragged(e);\n\t\t\tint xMaxRightPosition = Constants.VISIBLE_WIDTH - player.getWidth();\n\t\t\tint x = e.getX();\n\t\t\tif (x > 0 && x < xMaxRightPosition) {\n\t\t\t\tplayer.setX(x);\n\t\t\t} else if (x < 0 && player.getX() > 0) {\n\t\t\t\tplayer.setX(0);\n\t\t\t} else if (x > xMaxRightPosition\n\t\t\t\t\t&& player.getX() < xMaxRightPosition) {\n\t\t\t\tplayer.setX(xMaxRightPosition);\n\t\t\t}\n\n\t\t}",
"private void move() {\n if(this.movement[0]) {\n moveRight();\n } else {\n moveLeft();\n }\n if(this.movement[1]) {\n moveDown();\n } else {\n moveUp();\n }\n\n //Checking boundaries of the game\n if(this.XPosition + this.ballWidth > instance.getWidth()) {\n this.movement[0] = false;\n } else if(XPosition <= 0) {\n this.movement[0] = true;\n } else if(YPosition <= 0) {\n this.movement[1] = true;\n } else if(YPosition + ballHeight >= instance.getHeight()) {\n instance.missedBall();\n if (instance.getBalls() > 0){\n this.lostLife.play();\n }\n this.XPosition = instance.getWidth() / 2;\n this.YPosition = instance.getHeight() - 43;\n this.movement[1] = false;\n Player.setPlayerX((instance.getWidth() - 111) / 2);\n Player.setPlayerY(instance.getHeight() - 19);\n instance.isPaused(true);\n }\n\n if (this.boundingBox.intersects(this.playerBoundingBox)){\n Rectangle leftHalfOfPlayer = new Rectangle((int)this.playerBoundingBox.getWidth() / 2, (int)this.playerBoundingBox.getHeight(),\n this.playerBoundingBox.x, this.playerBoundingBox.y);\n this.movement[0] = !this.boundingBox.intersects(leftHalfOfPlayer);\n this.movement[1] = false;\n } else {\n // Check if ball collides with brick;\n for (Bricks[] bricks : instance.getBricks()){\n for (Bricks brick: bricks){\n if (brick.collidesWith(new Rectangle(this.XPosition , this.YPosition , this.ballWidth , this.ballHeight))){\n Rectangle iRect = brick.brickHitBox.intersection(this.boundingBox);\n brick.destroy();\n //Sound brickBreak = new Sound(\"res/Break-Sound.wav\");\n this.brickBreak.play();\n // make logic\n this.movement[1] = true;\n if ((this.boundingBox.x+(this.boundingBox.width/2))<(iRect.x+(iRect.width/2))) {\n this.movement[0] = false;\n }\n if ((this.boundingBox.x+(this.boundingBox.width/2))>(iRect.x+(iRect.width/2))) {\n this.movement[0] = true;\n }\n if ((this.boundingBox.y+(this.boundingBox.height/2))<(iRect.y+(iRect.height/2))) {\n this.movement[1] = false;\n }\n }\n }\n }\n\n }\n\n }",
"public void SystemAction(){\n\t\tif(GOBJECT.mouse.x<GOBJECT.Map.space&&GOBJECT.Map.movex>0){\n\t\t\tGOBJECT.Map.movex--;\n\t\t}\n\t\tif(GOBJECT.mouse.x>this.getWidth()-GOBJECT.Map.space&&(GOBJECT.Map.movex+GameSystem.screen_width)<GOBJECT.Map.maxc*GOBJECT.Map.space){\n\t\t\tGOBJECT.Map.movex++;\n\t\t}\n\t\tif(GOBJECT.mouse.y<GOBJECT.Map.space&&GOBJECT.Map.movey>0){\n\t\t\tGOBJECT.Map.movey--;\n\t\t}\n\t\tif(GOBJECT.mouse.y>this.getHeight()-GOBJECT.Map.space&&GOBJECT.Map.movey+GameSystem.screen_height<GOBJECT.Map.maxr*GOBJECT.Map.space){\n\t\t\tGOBJECT.Map.movey++;\n\t\t}\n\t}",
"void moveEast() {\n xpos = xpos + xspeed;\n if (xpos > width){\n xpos = 0; // 30\n }\n }",
"public void remove(){\n\t\tsetBounds(800, 600, WIDTH, HEIGHT);\n\t}",
"public void swim() {\r\n\t\tif(super.getPosition()[0] == Ocean.getInstance().getWidth()-71){\r\n\t\t\tinvX = true;\r\n\t\t} else if(super.getPosition()[0] == 0){\r\n\t\t\tinvX = false;\r\n\t\t}\r\n\t\tif(super.getPosition()[1] == Ocean.getInstance().getDepth()-71){\r\n\t\t\tinvY = true;\r\n\t\t} else if(super.getPosition()[1] == 0){\r\n\t\t\tinvY = false;\r\n\t\t}\r\n\t\tif(invX){\r\n\t\t\tsuper.getPosition()[0]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[0]+=1;\r\n\t\t}\r\n\t\tif(invY){\r\n\t\t\tsuper.getPosition()[1]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[1]+=1;\r\n\t\t}\r\n\t}",
"public void sprite() {\n\t\tspr.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = spr;\n\t}",
"@Override\r\npublic boolean isOnScreen() {\nreturn false;\r\n}",
"public boolean isOffScreen()\r\n\t{\r\n\t\treturn (getX()<-10&&xVel<0)||(getX()>WIDTH_SCREEN&&xVel>0)||getY()<-10||getY()>HEIGHT_SCREEN;\r\n\t\t\t\r\n\t}",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(x-gameObject.getWidth()/2, 0);\n\t\t\t\t}",
"@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }",
"public void leftPressNotGround() {\n if(!grounded) {\n if(animation.getDirection() == 1) {\n animation.setDirection(-1);\n } \n if(xSpeed > -5) { \n xSpeed -= AIR; \n }\n else {\n xSpeed = -5;\n }\n }\n }",
"public void ScreenWrap(GameObject o){\n\t\tif (o.pos.x > (background.pos.x + background.GetWidth()/2)){\n\t\t\to.pos.x -= background.GetWidth();\n\t\t}\n\t\telse if (o.pos.x < (background.pos.x - background.GetWidth()/2)){\n\t\t\to.pos.x += background.GetWidth();\n\t\t}\n\t\tif (o.pos.y > (background.pos.y + background.GetHeight()/2)){\n\t\t\to.pos.y -= background.GetHeight();\n\t\t}\n\t\telse if (o.pos.y < (background.pos.y - background.GetHeight()/2)){\n\t\t\to.pos.y += background.GetHeight();\n\t\t}\n\t}",
"private void bounceOffHorizontalWall() {\n vy = -vy;\n }",
"private void preventMovementInOppositeDirection() {\n\t\tif(currentDirection == Direction.RIGHT && \n\t\t\t\tsnakeDirection == Direction.LEFT) {\n\t\t\t\n\t\t\tcurrentDirection = Direction.LEFT;\n\t\t} else if(currentDirection == Direction.LEFT && \n\t\t\t\tsnakeDirection == Direction.RIGHT) {\n\t\t\t\n\t\t\tcurrentDirection = Direction.RIGHT;\n\t\t} else if(currentDirection == Direction.DOWN && \n\t\t\t\tsnakeDirection == Direction.UP) {\n\t\t\t\n\t\t\tcurrentDirection = Direction.UP;\n\t\t} else if(currentDirection == Direction.UP && \n\t\t\t\tsnakeDirection == Direction.DOWN) {\n\t\t\t\n\t\t\tcurrentDirection = Direction.DOWN;\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tif(x>0)\r\n\t\t\t\t{\r\n\t\t\t\t\tshell.setLocation(e.x-x + shell.getLocation().x,\r\n\t\t\t\t\t\te.y-y + shell.getLocation().y);\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void move() {\n if (movementCooldown > 0) {\n movementCooldown --;\n } else {\n super.move();\n movementCooldown = MAX_MOVEMENT_COOLDOWN;\n }\n }",
"public void unFollowing() {\n\t\tdouble newTargetX, newTargetY, xValue, yValue;\n\t\tdouble slope = (kin.target.y - kin.position.y) / (kin.target.x - kin.position.x);\n\t\t\n\t\t// off to the left of the screen\n\t\tif (kin.position.x < kin.target.x) {\n\t\t\tnewTargetY = (MainPanel.PWIDTH + img.getWidth() - kin.target.x) * slope + kin.target.y;\n\t\t\txValue = MainPanel.PWIDTH + img.getWidth();\n\t\t} else { // off the right of the screen\n\t\t\tnewTargetY = (-kin.target.x - img.getWidth()) * slope + kin.target.y;;\n\t\t\txValue = -img.getWidth();\n\t\t}\n\t\t\n\t\t// off to the top of the screen\n\t\tif (kin.position.y < kin.target.y) {\n\t\t\tnewTargetX = (MainPanel.PHEIGHT + img.getHeight() - kin.target.y) / slope + kin.target.x;\n\t\t\tyValue = MainPanel.PHEIGHT + img.getHeight();\n\t\t} else { // off the bottom of the screen\n\t\t\tnewTargetX = (-kin.target.y - img.getHeight()) / slope + kin.target.x;\n\t\t\tyValue = -img.getHeight();\n\t\t}\n\t\t\n\t\t// compare distances and use the minimum as target\n\t\tif (getDistance(kin.position.x, kin.position.y, xValue, newTargetY) < getDistance(kin.position.x, kin.position.y, newTargetX, yValue)) {\n\t\t\tkin.target = new Vector2d(xValue, newTargetY);\n\t\t} else {\n\t\t\tkin.target = new Vector2d(newTargetX, yValue);\n\t\t} // end else\n\t}",
"@Override\r\n\tpublic void render () {\n\t if(Gdx.input.isKeyPressed(Input.Keys.LEFT))\r\n sprMstanding.translateX(-1f);\r\n\t if(Gdx.input.isKeyPressed(Input.Keys.RIGHT))\r\n sprMstanding.translateX(1f);\r\n\r\n //sprGoomba sliding across\r\n sprGoomba.translateX(-1f);\r\n\r\n\r\n\t //background\r\n\t\tGdx.gl.glClearColor(0, 0, 1, 1);\r\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\r\n\t\tbatch.begin();\r\n\t\t//draw Mario\r\n\t\tbatch.draw(sprMstanding, sprMstanding.getX(), sprMstanding.getY(),sprMstanding.getWidth()/2,sprMstanding.getHeight()/2,\r\n sprMstanding.getWidth(),sprMstanding.getHeight(),sprMstanding.getScaleX(),sprMstanding.getScaleY(),sprMstanding.getRotation());\r\n\t\t//draw sprGoomba\r\n batch.draw(sprGoomba, sprGoomba.getX(), sprGoomba.getY(), sprGoomba.getWidth()/2,sprGoomba.getHeight()/2,\r\n sprGoomba.getWidth(), sprGoomba.getHeight(),sprGoomba.getScaleX(), sprGoomba.getScaleY(), sprGoomba.getRotation());\r\n\t\tbatch.end();\r\n\t}",
"@Override\n public void clip() {\n graphicsEnvironmentImpl.clip(canvas);\n }",
"@Override\n public boolean mouseMoved(int screenX, int screenY) {\n return false;\n }",
"@Override\n public boolean mouseMoved(int screenX, int screenY) {\n return false;\n }",
"public void rightPressNotGround() {\n if(!grounded) {\n if(animation.getDirection() == -1) {\n animation.setDirection(1);\n }\n if(xSpeed < 5) { \n xSpeed += AIR; \n } \n else {\n xSpeed = 5;\n }\n }\n }",
"public void updatePosition()\r\n\t{\r\n\t\tsuper.updatePosition();\r\n\t\t\r\n\t\t// Update the bomb's position\r\n\t\tPoint nextPosition = getPath().getLocation(t++);\r\n\t\tsetX(nextPosition.x + startX);\r\n\t\tint nextY = nextPosition.y + startY;\r\n\t\tsetY(nextY);\r\n\t\t\r\n\t\t// Blow the bomb up after it reaches mid screen\r\n\t\tif (t > 120 || (nextY < (Global.WINDOW_HEIGHT >> 1) && t > 30))\r\n\t\t{\r\n\t\t\tbombSound.stop();\r\n\t\t\tsuper.remove();\r\n\t\t\tGamePanel.makeExplosion(getX(), getY());\r\n\t\t\t\r\n\t\t\t// Injure all the enemies on the screen\r\n\t\t\t\r\n\t\t\tArrayList<Sprite> sprites = GamePanel.getSprites();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < sprites.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif (sprites.get(i) instanceof Enemy)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy enemy = (Enemy) sprites.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint currentYTop = GamePanel.getLevel().getCurrentY() +\r\n\t\t\t\t\t\tBLOCKS_PER_Y - 1;\r\n\t\t\t\t\tboolean visibleX = enemy.getX() + enemy.getWidth() >= 0 &&\r\n\t\t\t\t\t\tenemy.getX() <= Global.WINDOW_WIDTH;\r\n\t\t\t\t\tboolean yOnScreen = enemy.getY() <= Global.WINDOW_HEIGHT +\r\n\t\t\t\t\t\t100;\r\n\t\t\t\t\tboolean visibleY = enemy.getYBlock() >= currentYTop &&\r\n\t\t\t\t\t\tyOnScreen;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visibleX && visibleY && enemy.isAlive())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tenemy.offsetHealth(-300);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (enemy.getHealth() <= 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tenemy.remove();\r\n\t\t\t\t\t\t\tGamePanel.offsetNumLevelPoints(100);\r\n\t\t\t\t\t\t\tGamePanel.makeExplosion(enemy.getX(), enemy.getY());\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}\r\n\t}",
"public void resetRobotPositionOnUI() {\r\n\t\tthis.x = checkValidX(1);\r\n\t\tthis.y = checkValidY(1);\r\n\t\ttoggleValid();\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t\t\r\n\t}",
"public void bomb() {\n\t\tbomb.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = bomb;\n\t}",
"public void move() {\r\n\t\tsetY(getY() + 134);\r\n\t\tmyImage = myImage.getScaledInstance(100, 300, 60);\r\n\r\n\t}",
"public void vanish() {\n\t\t\r\n\t\tlpanel.addMouseMotionListener(new MouseAdapter() {\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tchecker.setEnabled(false);\r\n\t\t\t\tchecker.setVisible(false);\r\n\t\t\t\trequestL.setEnabled(false);\r\n\t\t\t\trequestL.setVisible(false);\r\n\t\t\t\tpatientL.setEnabled(false);\r\n\t\t\t\tpatientL.setVisible(false);\r\n\t\t\t\treport.setEnabled(false);\r\n\t\t\t\treport.setVisible(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t}",
"@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}",
"public void actionPerformed(ActionEvent actionEvent) {\r\n canvas.setUIInteraction(false);\r\n setVisible(false);\r\n }",
"private void stopDragging() {\n setDragging(false);\n mouseX = mouseY = prevX = prevY = 0;\n }",
"@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}",
"public void stopMovement() {\n this.movementComposer.stopMovement();\n }",
"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 }",
"public void moveBack() {\r\n\t\tsetY(getY() - 134);\r\n\t\tmyImage = myImage.getScaledInstance(100, 100, 60);\r\n\r\n\t}",
"public void actionPerformed(ActionEvent e) {\n \t\t\t\tscreen.game.skip();\n \t\t\t}",
"private boolean isInGameWindow(){\n if (currPos.x > Window.getWidth() || currPos.y > Window.getHeight()){\n return false;\n }\n return true;\n }",
"protected void stopAndViewToPast()\n {\n if(!widgg.common.bFreeze){ \n widgg.common.bFreeze = true;\n //now ixDataShow remain unchanged.\n } else {\n int ixdDataSpread = ixDataShowRight - ixDataShown[pixelOrg.xPixelCurve * 5/10];\n //int ixDataShowRight1 = ixDataShown[nrofValuesShow * 7/8];\n //int ixdDataSpread = ixDataShowRight - ixDataShowRight1;\n ixDataShowRight -= ixdDataSpread;\n if((ixDataShowRight - widgg.ixDataWr) < 0 && (widgg.ixDataWr - ixDataShowRight) < ixdDataSpread) {\n //left end reached.\n ixDataShowRight = widgg.ixDataWr + ixdDataSpread;\n }\n }\n widgg.redraw(100, 200);\n //System.out.println(\"left-bottom\");\n \n }",
"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}",
"@Override\n public void processInput(Vector2f m) {\n\n //Check if mouse within bounds, if so, kill it\n if (mouse.buttonDown(MouseEvent.BUTTON1)) {\n if (m.x < this.tx + 800 && m.x > this.tx - 800 && m.y < this.ty + 800 && m.y > this.ty - 800) {\n this.shotDown = true;\n }\n }\n\n }",
"public void act() \n {\n // Add your action code here.\n /*\n if ( pixelsMoved >= 20 )\n {\n moving = false;\n pixelsMoved = 0;\n }\n */\n if ( moving )\n {\n move(1);\n pixelsMoved++;\n \n if ( pixelsMoved >= 20 )\n {\n setMoving( false );\n }\n }\n }",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(x-gameObject.getWidth()/2, y-gameObject.getHeight()/2);\n\t\t\t\t}",
"@FXML\n private void stopMoving(){\n\n Main.gang.setMoving(false);\n drivingTransition.stop();\n updateGUI();\n }",
"@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 }",
"@Override\r\n\tpublic void update() {\n\t\tx += dx;\r\n\t\ty += dy;\r\n\t if(x<0 && dx<0) dx=-dx;\r\n\t if(x>GamePanel.WIDTH-side && dx>0) dx=-dx;\r\n\t}",
"public void onUpReleased(){\n// player.getSprite().setFitHeight(50);\n shipSoundPlayer.stop();\n if(GameEngine.isPlaying)\n player.setSprite(\"Sprites\\\\spaceship_new.png\");\n }",
"private void bounceOffVerticalWall() {\n vx = -vx;\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 public void update(){\n super.update();\n if(getPositionY() < -2.f){\n setAngleXYDeltaTheta(0.0f);\n setAngleXY(0.0f);\n setPositionY(1.0f);\n setDy(0.0f);\n setDx(0.0f);\n setInPlay(true);\n }\n }",
"public boolean detectBound(){\n // super.detectBound();\n if(posY > height || posY < 0){\n Main.enemies.remove(this);\n return true;\n }\n return false;\n\n }",
"public void act(){\n // Removing object, if out of the simulated zone\n if (atWorldEdge()){\n getWorld().removeObject(this);\n return;\n }\n\n //Move Thanos up\n setLocation (getX(), getY() - speed);\n }",
"public void update() {\n if (!outOfBounds()) {\n super.move(dirVec.mul(ShadowDefend.getTimescale() * speed));\n }\n super.update();\n }",
"@Override\n public boolean canMove(double x, double y) {\n return !getOwner().isDead();\n }",
"protected void mover(){\r\n\t\r\n\t\t\r\n\t\tint centroX;\r\n\t\tint centroY;\r\n\t\tint radioGiro1;\r\n\t\tint coordX;\r\n\t\tint incrementoY;\r\n\t\tint diferenciaEnX;\r\n\t\t\r\n\t\tif(! this.entroAlCirculo){\r\n\t\t\tdirigirHaciaPunto(this.centroGiroX, (this.centroGiroY - this.radioGiro));\r\n\t\t}\r\n\t\t\r\n\t\telse{\t\t\t\t\r\n\t\t\t\r\n\t\t\tcentroX = this.centroGiroX;\r\n\t\t\tcentroY = this.centroGiroY;\r\n\t\t\tincrementoY = 1;\r\n\t\t\tradioGiro1 = this.radioGiro;\r\n\t\t\t\r\n\t\t\tif(this.x > centroX){\t\t\t\t\t\r\n\t\t\t\tthis.regresando = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.regresando){ //chequea si el avion se sobrepasa de los limites verticales del circulo, si es el caso cambia la direccion\r\n\t\t\t\t\r\n\t\t\t\tif((this.y - incrementoY) < (centroY - radioGiro1)){\r\n\t\t\t\t\tthis.regresando = false;\r\n\t\t\t\t}\r\n\t\t\t\telse{}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\tif((this.y + incrementoY) > (centroY + radioGiro1)){\r\n\t\t\t\t\t\tthis.regresando = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse{}\r\n\t\t\t}\t\t\t\r\n\t\t\tif ((this.y <= (centroGiroY + (radioGiro - incrementoY))) || (this.y >= (centroGiroY - (radioGiro - incrementoY)))){\r\n\t\t\t\t\r\n\t\t\t\tif(this.regresando){\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**calcula la posicion de x de acuerdo al movimiento en y, \r\n\t\t\t\t\t* con la formula de una circunferencia plana\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y - 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = coordX;\r\n\t\t\t\t\tthis.y -= incrementoY;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse{\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y + 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = centroX - diferenciaEnX;\r\n\t\t\t\t\tthis.y += incrementoY;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n xPos += movementX;\n yPos += movementY;\n\n if (xPos < 0) {\n xPos = 0;\n } else if (xPos + squareSize > xBound) {\n xPos = xBound - squareSize;\n }\n if (yPos < 0) {\n yPos = 0;\n } else if (yPos + squareSize > yBound) {\n yPos = yBound - squareSize;\n }\n\n // Redraw the square when something happens\n repaint();\n }",
"public void move()\r\n\t{\r\n\t\ty-=8;\r\n\t}",
"protected void onMove() {\r\n }",
"@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tx=y=-1;\r\n\t\t\t}",
"public void empty() {\n\t\tempty.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = empty;\n\t}",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(0,y-gameObject.getHeight()/2);\n\t\t\t\t}",
"public void bounceOffEdge()\n {\n int margin = 2;\n\n if (getX() <= margin || getX() >= getWorld().getWidth() - margin) //left or right side\n {\n turn(180);\n }\n if (getY() <= margin || getY() >= getWorld().getHeight() - margin) //top or bottom side\n {\n turn(180);\n }\n }",
"public void undock() {\n if (getSpeed() == 0) {\n inDock = false;\n }\n }",
"@Override\n public void handle(MouseEvent event) {\n if( robberWillMove ){\n System.out.println(\"robber1\");\n robberWillMove = false;\n robberIsMoving = true;\n }\n }",
"private boolean birdIsOffscreen() {\r\n return (bird.getYpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() + bird.getRadius() < 0) ||\r\n (bird.getXpos() - bird.getRadius() > width);\r\n }",
"public boolean isMovable() {\n\t\treturn false;\n\t}",
"public void joystickDeadZone() {\n\t\tif (joystickLXAxis <= 0.075 && joystickLXAxis >= -0.075) {\n\t\t\tjoystickLXAxis = 0;\n\t\t} if (joystickLYAxis <= 0.075 && joystickLYAxis >= -0.075) {\n\t\t\tjoystickLYAxis = 0;\n\t\t}\n\t\tif (joystickRXAxis <= 0.075 && joystickRXAxis >= -0.075) {\n\t\t\tjoystickRXAxis = 0;\n\t\t} if (joystickRYAxis <= 0.075 && joystickRYAxis >= -0.075) {\n\t\t\tjoystickRYAxis = 0;\n\t\t}\n\t}",
"void moveNorthEast(){\n xpos = xpos + 3;\n ypos = ypos-xspeed;\n if (xpos > width){ // 20\n xpos = random(-width/2, width/2); // 25\n ypos = width; // 30\n }\n }",
"public void update() {\n\t\t\n\t\tVector size = new Vector(Main.frame.getContentPane().getWidth() + 64, 64 + 64);\n\t\tposition = new Vector(0, Main.frame.getContentPane().getHeight() - 40);\n\t\t\n\t\tRectangle rect = new Rectangle(position, size);\n\t\t\n\t\tif (rect.contains(Mouse.getVector())) {\n\t\t\troom.isMouseOverGUI = true;\n\t\t}\n\t}",
"public void move(){\n System.out.println(\"I can't move...\");\n }",
"protected void move() {\n\t\tx += dx;\n\t\ty += dy;\n\t\tif (distance() > range) remove();\n\t}"
] | [
"0.6909506",
"0.66293454",
"0.65116227",
"0.6503227",
"0.64617735",
"0.63481945",
"0.6342362",
"0.63342714",
"0.63285595",
"0.62715995",
"0.62700677",
"0.62608737",
"0.6241361",
"0.61838716",
"0.61708415",
"0.61249024",
"0.61232966",
"0.61182344",
"0.61178267",
"0.6105328",
"0.60757643",
"0.6061058",
"0.60335606",
"0.60183036",
"0.59901536",
"0.5984355",
"0.5913735",
"0.59081024",
"0.590377",
"0.5863662",
"0.58475184",
"0.5830024",
"0.582592",
"0.58132064",
"0.5805249",
"0.57884204",
"0.57849586",
"0.57817245",
"0.57737935",
"0.5751542",
"0.574974",
"0.57444537",
"0.5727205",
"0.5706385",
"0.570344",
"0.56923926",
"0.56866276",
"0.5685525",
"0.5681273",
"0.56811905",
"0.5680543",
"0.5673004",
"0.5673004",
"0.5667462",
"0.5666657",
"0.56652534",
"0.56630725",
"0.56613874",
"0.5656324",
"0.56543946",
"0.5647595",
"0.5647475",
"0.5633015",
"0.56260806",
"0.56258744",
"0.56250864",
"0.5619391",
"0.5615971",
"0.5615779",
"0.5612992",
"0.5611027",
"0.55968887",
"0.5596447",
"0.5595973",
"0.55929685",
"0.5590686",
"0.5585754",
"0.5585644",
"0.5584999",
"0.5581386",
"0.55779964",
"0.55776423",
"0.55768675",
"0.5576803",
"0.5575789",
"0.55737954",
"0.55685276",
"0.5565043",
"0.5561719",
"0.5554112",
"0.5552864",
"0.554012",
"0.55378234",
"0.5533499",
"0.55257004",
"0.55196786",
"0.5514949",
"0.55112714",
"0.550172",
"0.5500788",
"0.5492106"
] | 0.0 | -1 |
This method record the points of the score | public void addPoints(int point){
this.points += point;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void addPointsToScore(int points) {\n score += points;\n }",
"public void awardPoints(int points)\n {\n score += points ;\n }",
"public int returnPoints()\n {\n return score ;\n }",
"public void addPoints(int earnedPoints) {score = score + earnedPoints;}",
"@Override\n\tpublic void saveScore() {\n\t\t\n\t}",
"@Override\n\tpublic void saveScore() {\n\n\t}",
"public int getScore()\n {\n return points + extras;\n }",
"public void score() {\n\t\tif (Integer.parseInt(px.getPosition()) != Integer.parseInt(getCurrentPositionX()))\n\t\t{\n\t\t\tpx.addObserver(Obsx);\n\t\t\tpx.setPosition(getCurrentPositionX());\n\t\t}\n\t\tif (Integer.parseInt(py.getPosition()) != Integer.parseInt(getCurrentPositionY()))\n\t\t{\n\t\t\tpy.addObserver(Obsy);\n\t\t\tpy.setPosition(getCurrentPositionY());\n\t\t}\n\t}",
"public void addToScore(int points) {\n\t\tassert points >= 0 : \"Cannot add negative points\";\n\t\tscore += points;\n\t}",
"public void addScore(int pointsToAdd) {\n\t\tthis.score = this.score + pointsToAdd;\n\t}",
"public int getScorePoints() {\n/* 75 */ return this.scorePoints;\n/* */ }",
"@Override\n\tpublic void printScore() {\n\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn Globals.currentScore + \" \" + String.valueOf(points);\n\t}",
"public int getPoints() { return points; }",
"void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }",
"public void setScore(int pointsToAdd) {\n\n\t\t//Add the additional points to the existing score\n\t\tthis.score = this.score + pointsToAdd;\n\t}",
"@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}",
"@Override\n\tpublic void visitingTeamScored(int points) {\n\t\t\n\t}",
"public int getPoints() {\n return points;\n }",
"public int getPoints() {\n return points;\n }",
"public int getPoints() {\n return points;\n }",
"public int getPoints() {\n return points;\n }",
"private void sketchScore() {\r\n View.sketch(score, this.getSize().width + 15, 0);\r\n }",
"public int getPoints(){\r\n\t\treturn this.points;\r\n\t}",
"public int getPoints(){\r\n\t\treturn this.points;\r\n\t}",
"@Test\n public void testAddPoints() {\n System.out.println(\"addPoints\");\n int points = ScoreBoard.HARD_DROP_POINTS_PER_ROW * 4 + ScoreBoard.POINTS_PER_LINE;\n instance.addPoints(points);\n int result = instance.getPoints();\n int expResult = 108;\n assertEquals(result, expResult);\n }",
"public void addScore()\n {\n score += 1;\n }",
"public void addPoint() {\n points += 1;\n }",
"private void getPoints()\n\t{\n\t\ttotalEntered = statsCollector.getTotalEnteredPoints();\n\t\taverageWait = statsCollector.getAverageWaitPoints();\n\t\tmaxWait = statsCollector.getMaxWaitPoints();\n\t\ttimeAlive = statsCollector.getTimeAlivePoints();\n\t}",
"public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for eating a kibble. Changed to zero here because adjustScoreIncrement's extra points begin at 1 anyway\n\t}",
"private void updateScore(int point) {\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(SCORE_KEY, mScore);\n\n }",
"private void calculateStPointScore() {\n\t\tint total = 0;\n\t\tint maxAnswerSize = 0;\n\t\tfor (QueryInfo oneQ : this.maxQueries) {\n\t\t\ttotal += oneQ.getFrequency() * oneQ.getGapCount();\n\t\t\tint tempSize = oneQ.getSupport() * oneQ.getGapCount();\n\t\t\tif (tempSize > maxAnswerSize)\n\t\t\t\tmaxAnswerSize = tempSize;\n\t\t}\n\t\ttotal += maxAnswerSize;\n\t\tthis.stPointScore = total;\n\t}",
"public void addScore(int score);",
"public int getPoints() {\n return this.points;\n }",
"private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }",
"@Test\n public void addScoreTest() {\n assertTrue(enemyGameBoard.getScore() == 0); //Check if initial value of points = 0\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship\n assertTrue(enemyGameBoard.getScore() == 0);\n\n enemyGameBoard.addScore(true, false); //Hit a ship, but the ship did not sink\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 1\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(true, true); //Hit a ship, and ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 3 after a ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, true); //Did not hit a ship, but did sunk the ship. This should not add any points to the score\n assertTrue(enemyGameBoard.getScore() == 3);\n }",
"private void updateScore(int point){\n sScore.setText(\"\" + mScore + \"/\" + mQuizLibrary.getLength());\n\n }",
"public int getPoints() {\r\n\t\treturn points;\r\n\t}",
"@Override\n\tpublic void inputScore() {\n\n\t}",
"private void saveScore() {\n\t\tif (Serializer.deserialize(Main.SCORES_FILE)) {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tArrayList<Integer> scores = (ArrayList<Integer>) Serializer\n\t\t\t\t\t.getRecovered();\n\n\t\t\tif (this.score > 0) {\n\t\t\t\tscores.add(this.score);\n\n\t\t\t\tSerializer.serialize(Main.SCORES_FILE, scores);\n\t\t\t}\n\t\t}\n\t}",
"public double getPoints()\r\n {\r\n return points;\r\n }",
"public static void createScore(){\n\t}",
"public int getPoints();",
"@Override\n public int getPoints(){\n\n }",
"public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }",
"@Override\n\tpublic double getTotalScore() {\n\t\treturn score;\n\t}",
"public double getScore() {\r\n return score;\r\n }",
"protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }",
"public void addRating(double points) {\n rating += points;\n }",
"public double pointsEarned();",
"public int getPoints() {\n\t\treturn points;\n\t}",
"@Override\n\tpublic void checkScore() {\n\t\t\n\t}",
"public static void incrementScore() {\n\t\tscore++;\n\t}",
"private void printScore() {\r\n View.print(score);\r\n }",
"private void addPoint(){\n\n userList.addUserCorrect();\n userList.addUserAttempt();\n\n\n //This if levels up the user if they have reached the number of points needed\n if (userList.findCurrent().getNumPointsNeeded()\n <= userList.findCurrent().getNumQuestionsCorrect()) {\n\n userList.addUserPointsNeeded();//increment points needed to level up\n userList.levelUpUser();\n }\n }",
"public void addOneToScore() {\r\n score++;\r\n }",
"float getScore();",
"float getScore();",
"private void scoreboard() {\n Intent intent = new Intent(this, AlienPainterScoreboardActivity.class);\n intent.putExtra(SCOREBOARD_STATUS, presenter.getIsVictorious());\n intent.putExtra(POINTS, presenter.getPoints());\n intent.putExtra(NUM_MOVES, presenter.getNumMoves());\n intent.putExtra(TIME_LEFT, presenter.getTimeLeft());\n intent.putExtra(LANGUAGE, isEnglish);\n intent.putExtra(PASS_USER, currUser);\n startActivity(intent);\n finish();\n }",
"int getPoints();",
"public int getPoints() {\r\n\t\treturn this.points;\r\n\r\n\t}",
"public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}",
"public void addToScore(TextView scoreTextView, int points) {\n int score = Integer.parseInt(scoreTextView.getText().toString());\n scoreTextView.setText(String.valueOf(score + points));\n }",
"public void pointsCollected(List<Point> points);",
"public void statistics(){\n System.out.println(this.scoreboard.toString());\n }",
"Float getScore();",
"Scoreboard saveScoreboard(Scoreboard scoreboard);",
"@Override\r\n\tpublic double getScore() {\n\t\treturn score;\r\n\t}",
"public int getScore() { return score; }",
"public Integer getPoints() {\r\n return points;\r\n }",
"public void calculatePoints() {\n /*\n for (int i = 0; i < getRacers().size(); i++) {\n String username = getRacers().get(i).getUsername();\n int total = 0;\n for (int j = 0; j < getRounds().size(); j++) {\n Slot slot = getRounds().get(j).findRacerInRound(username);\n if (slot != null) {\n total = total + slot.getPoints();\n }\n }\n getRacers().get(i).setPoints(total);\n }*/\n }",
"void addScore(double score){\n\t\tsumScore+=score;\n\t\tnumScores++;\n\t\taverage = sumScore/numScores;\n\t}",
"@Override\n public int getScore() {\n return score;\n }",
"public int getPoints(){\n\t\t//add the player socres(including monster killing, powerUp points and winning points\n\t\tint points = this.player.getScore() + 200*this.player.getHealth();\n\t\t\n\t\t//since the better the less time used, we use 600 seconds to minus the total seconds being used\n\t\t//and add it to the points\n\t\t//600 seconds is 10 minutes, which is definity long enough\n\t\t//if exceeds 10 minutes, we will subtract total score\n\t\tif(this.player.win()){\t//only if the player wins will we calculate the time\n\t\t\tpoints += (int)(3600 - (this.time / 1000000000));\n\t\t}\n\t\t\n\t\tthis.totalLabel.setText(String.valueOf(points));\t//set the value of the JLabel\n\t\t\n\t\treturn points;\n\t\t\n\t}",
"public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }",
"public int getPoints() {\n\t\treturn this.points;\n\t}",
"public void showScore(int points) {\n sb.replace(0, sb.length() - 1, \"Score: \" + points);\n score.setText(sb.toString());\n }",
"public int getScore() {return score;}",
"public void calculateFinalPoints() {\n int finalPoints = 0;\n for (final Entry<Question, ExamResultAnswers> entry : submittedAnswers.entrySet()) {\n final Question question = entry.getKey();\n double partialPoint = 0;\n final double pointStep = (double) question.getPoints() / question.getAnswers().size();\n final Iterator<Answer> correctAnswers = question.getAnswers().iterator();\n final Iterator<Answer> studentAnswers = entry.getValue().getAnswers().iterator();\n while (correctAnswers.hasNext() && studentAnswers.hasNext()) {\n final Answer studentAnswer = studentAnswers.next();\n final Answer correctAnswer = correctAnswers.next();\n if (question.getType() == QuestionType.FILL_IN_THE_BLANK) {\n if (studentAnswer.getText().trim().equalsIgnoreCase(correctAnswer.getText().trim())) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n } else if (question.getType() == QuestionType.SINGLE_CHOICE) {\n // A single choice brings only points if the ONE correct one is chosen, otherwise always zero points\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()\n && correctAnswer.isRightAnswer()) {\n partialPoint += question.getPoints();\n break;\n } else if (studentAnswer.isRightAnswer() && !correctAnswer.isRightAnswer()) {\n partialPoint = 0;\n break;\n }\n } else if (question.getType() == QuestionType.MULTIPLE_CHOICE) {\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n }\n }\n if (partialPoint < 0) {\n partialPoint = 0;\n }\n finalPoints += (int) Math.round(partialPoint);\n }\n points = finalPoints;\n final int maxPoints = exam.getMaxPoints();\n passed = (finalPoints / (double) maxPoints) * 100 >= exam.getMinPoints();\n }",
"public float getScore(){return score;}",
"public void addScore(int score) {\n currentScore += score;\n }",
"public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}",
"public String currentScore(){\n return points[player1Score] + \"-\" + points[player2Score];\n }",
"public void setScore(int score) { this.score = score; }",
"public void setScore(double score) {\r\n this.score = score;\r\n }",
"public void countPoints() {\n points = 0;\n checkAnswerOne();\n checkAnswerTwo();\n checkAnswerThree();\n checkAnswerFour();\n checkAnswerFive();\n checkAnswerSix();\n checkAnswerSeven();\n checkAnswerEight();\n checkAnswerNine();\n checkAnswerTen();\n }",
"public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }",
"public boolean recordScore(int score, String player) {\n\t\tboolean recorded = false;\n\t\t\n\t\t// -check if score is the new topScore\n\t\tif (score > topScore) {\n\t\t\t\t// - copy topScore/topName to secondScore/secondName\n\t\t\tsecondScore = topScore;\n\t\t\tsecondScorerName = topScorerName;\n\t\t\t\t// - topScore becomes score\n\t\t\ttopScore = score;\n\t\t\ttopScorerName = player;\n\t\t\t\t// - set response to true\n\t\t\trecorded = true;\n\t\t\t\n\t\t}\n\t\telse if (score > secondScore) {\n\t\t// -otherwise check if score is new secondScore\n\t\t\t\t// - secondScore becomes score\n\t\t\tsecondScore = score;\n\t\t\t\t// - secondName becomes player\n\t\t\tsecondScorerName = player;\n\t\t\t\t// - set response to true\n\t\t\trecorded = true;\n\t\t}\n\t\t// return boolean response\n\t\treturn recorded;\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 }",
"protected abstract void calcScores();",
"public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }",
"public void setScoreZero() {\n this.points = 10000;\n }",
"public float getScore() {\n return score;\n }",
"public double getScore() {\r\n return mScore;\r\n }",
"public int getScore ()\r\n {\r\n\treturn score;\r\n }",
"long getScore();",
"long getScore();",
"long getScore();",
"long getScore();",
"public PointsFinished(Frame frame, int[] scores, int totalScore){\n this.scores = scores;\n this.frame = frame;\n\n this.totalScore = totalScore;\n }"
] | [
"0.74951524",
"0.72201025",
"0.71608865",
"0.6964736",
"0.69054556",
"0.68773574",
"0.6843254",
"0.67044055",
"0.66542864",
"0.6630524",
"0.65954703",
"0.65853065",
"0.6582997",
"0.65801424",
"0.6569261",
"0.6433011",
"0.64060974",
"0.6362772",
"0.63508725",
"0.63508725",
"0.63508725",
"0.63508725",
"0.6313226",
"0.62997866",
"0.62997866",
"0.62896883",
"0.62698",
"0.6257629",
"0.6250036",
"0.62494653",
"0.6249448",
"0.62465495",
"0.6240938",
"0.62391293",
"0.6237997",
"0.6224345",
"0.62230426",
"0.6204225",
"0.61936677",
"0.6190799",
"0.61861557",
"0.61820006",
"0.6174043",
"0.61684173",
"0.61618054",
"0.6158411",
"0.6155451",
"0.61449486",
"0.6140164",
"0.61388636",
"0.61358464",
"0.61347127",
"0.6118789",
"0.6116579",
"0.6101681",
"0.6083398",
"0.6079703",
"0.6079703",
"0.60791266",
"0.6072195",
"0.60649127",
"0.60583484",
"0.60526323",
"0.60491693",
"0.6046274",
"0.6044744",
"0.6034638",
"0.6033473",
"0.60267866",
"0.60253185",
"0.60171896",
"0.60062575",
"0.6004629",
"0.6002097",
"0.5999783",
"0.59923744",
"0.5989909",
"0.59894866",
"0.5987611",
"0.5965408",
"0.5960618",
"0.59456205",
"0.5944979",
"0.59447414",
"0.5937756",
"0.5936616",
"0.593635",
"0.5935628",
"0.59213924",
"0.59191006",
"0.59153295",
"0.5912464",
"0.59053856",
"0.59018403",
"0.5901292",
"0.58981806",
"0.58981806",
"0.58981806",
"0.58981806",
"0.5892673"
] | 0.5984127 | 79 |
This method shown what happen if intersect with the 'end'(cavelike image) | public void IntersectEnd() {
if (getIntersectingObjects(End.class).get(0).isEnd()) {
this.end--;
addPoints(-100);
}
points+=100;
getIntersectingObjects(End.class).get(0).setEnd();
frogReposition();
this.end++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\t\tpublic void testIntersectAtEndPoints2(){\n\t\t\tGenericLineSegmentsIntersect v=new GenericLineSegmentsIntersect();\n\t\t\tint[][] lines={\n\t\t\t\t\t{1,5,5,1},\n\t\t\t\t\t{1,4,5,0},\n\t\t\t\t\t{2,2,6,10}\n\t\t\t};\n\n\t\t\tassertTrue(v.intersects(lines));\n\t\t}",
"public CFWRect intersectsLine( CFWPoint poiBegI, CFWPoint poiEndI)\t{\r\n\t\t//1.rejust rect\r\n\t\t//correct: (m_poiLT.m_fX < m_poiRB.m_fX && m_poiLT.m_fY < m_poiRB.m_fY)\r\n\t\tif(m_poiLT.m_fX > m_poiRB.m_fX && m_poiLT.m_fY > m_poiRB.m_fY)\t{\r\n\t\t\t//exchange all\r\n\t\t\tCFWPoint poiTmp = m_poiLT;\r\n\t\t\tm_poiLT = m_poiRB;\r\n\t\t\tm_poiRB = poiTmp;\r\n\t\t}\r\n\t\telse if(m_poiLT.m_fX > m_poiRB.m_fX && m_poiLT.m_fY < m_poiRB.m_fY)\t{\r\n\t\t\t//exchange X\r\n\t\t\tfloat fXTmp = m_poiLT.m_fX;\r\n\t\t\tm_poiLT.m_fX = m_poiRB.m_fX;\r\n\t\t\tm_poiRB.m_fX = fXTmp;\r\n\t\t}\r\n\t\telse if(m_poiLT.m_fX < m_poiRB.m_fX && m_poiLT.m_fY > m_poiRB.m_fY)\t{\r\n\t\t\t//exchange Y\r\n\t\t\tfloat fYTmp = m_poiLT.m_fY;\r\n\t\t\tm_poiLT.m_fY = m_poiRB.m_fY;\r\n\t\t\tm_poiRB.m_fY = fYTmp;\r\n\t\t}\r\n\t\t//2.intersect test\r\n\t\tCFWPoint poiOutOfRect = new CFWPoint();\r\n\t\tboolean bPoiInsideRect = false;\r\n\t\tCFWRect rectRet = new CFWRect();\r\n\t\tif(!checkPoiInside( poiBegI, poiEndI))\t{\r\n\t\t\t//System.out.println(\"the line has no cross point with the rectangle!\");\r\n\t\t\treturn(rectRet);\r\n\t\t}\r\n\t\telse if(!checkPoiInside( poiEndI, poiBegI))\t{\r\n\t\t\t//System.out.println(\"the line has no cross point with the rectangle!\");\r\n\t\t\treturn(rectRet);\r\n\t\t}\r\n\t\telse\t{\r\n\t\t\tif(isInsideArea( 9, poiBegI))\t{\r\n\t\t\t\tif(isInsideArea( 9, poiEndI))\t{\r\n\t\t\t\t\t//System.out.println(\"the line has no cross point with the rectangle!\");\r\n\t\t\t\t\treturn(rectRet);\r\n\t\t\t\t}\r\n\t\t\t\trectRet.m_poiLT = poiBegI;\r\n\t\t\t\tpoiOutOfRect = poiEndI;\r\n\t\t\t\tbPoiInsideRect = true;\r\n\t\t\t}\r\n\t\t\tif(isInsideArea( 9, poiEndI))\t{\r\n\t\t\t\tif(isInsideArea( 9, poiBegI))\r\n\t\t\t\t\treturn(rectRet);\r\n\t\t\t\trectRet.m_poiLT = poiEndI;\r\n\t\t\t\tpoiOutOfRect = poiBegI;\r\n\t\t\t\tbPoiInsideRect = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//3.intersect\r\n\t\t//if the line is vertical to X/Y, return the line segment\r\n\t\tif(poiEndI.m_fX == poiBegI.m_fX)\t{\r\n\t\t\tif(!bPoiInsideRect)\t{\r\n\t\t\t\trectRet.m_poiLT.m_fX = poiEndI.m_fX;\r\n\t\t\t\t//less than the m_poiLT'Y, use the m_poiLT'Y\r\n\t\t\t\trectRet.m_poiLT.m_fY = Math.max( Math.min(poiBegI.m_fY, poiEndI.m_fY), m_poiLT.m_fY);\r\n\t\t\t\t//larger than m_poiRB's Y, use the m_poiRB's Y\r\n\t\t\t\trectRet.m_poiRB.m_fY = Math.min( Math.max(poiBegI.m_fY, poiEndI.m_fY), m_poiRB.m_fY);\r\n\t\t\t}\r\n\t\t\telse\t{\r\n\t\t\t\tif(poiOutOfRect.m_fY < m_poiLT.m_fY)\r\n\t\t\t\t\trectRet.m_poiRB.m_fY = m_poiLT.m_fY;\r\n\t\t\t\telse if(poiOutOfRect.m_fY > m_poiRB.m_fY)\r\n\t\t\t\t\trectRet.m_poiRB.m_fY = m_poiRB.m_fY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trectRet.m_poiRB.m_fX = poiEndI.m_fX;\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(poiEndI.m_fY == poiBegI.m_fY)\t{\r\n\t\t\tif(!bPoiInsideRect)\t{\r\n\t\t\t\trectRet.m_poiLT.m_fX = Math.max( Math.min( poiBegI.m_fX, poiEndI.m_fX), m_poiLT.m_fX);\r\n\t\t\t\trectRet.m_poiLT.m_fY = poiEndI.m_fY;\r\n\t\t\t\trectRet.m_poiRB.m_fX = Math.min( Math.max( poiBegI.m_fX, poiEndI.m_fX), m_poiRB.m_fX);\r\n\t\t\t}\r\n\t\t\telse\t{\r\n\t\t\t\tif(poiOutOfRect.m_fX < m_poiLT.m_fX)\r\n\t\t\t\t\trectRet.m_poiRB.m_fX = m_poiLT.m_fX;\r\n\t\t\t\telse if(poiOutOfRect.m_fX > m_poiRB.m_fX)\r\n\t\t\t\t\trectRet.m_poiRB.m_fX = m_poiRB.m_fX;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trectRet.m_poiRB.m_fY = poiEndI.m_fY;\r\n\t\t}\r\n\t\telse\t{\r\n\t\t\t//build line function\r\n\t\t\tdouble dK = (poiEndI.m_fY - poiBegI.m_fY)/(poiEndI.m_fX - poiBegI.m_fX);\r\n\t\t\tdouble dB = poiBegI.m_fY - dK*poiBegI.m_fX;\r\n\t\t\t//find intersect points\r\n\t\t\tCFWPoint poiIntersA = new CFWPoint( m_poiLT.m_fX - 1.0f, m_poiLT.m_fY - 1.0f, 0.0f);\r\n\t\t\tCFWPoint poiIntersB = new CFWPoint( m_poiLT.m_fX - 1.0f, m_poiLT.m_fY - 1.0f, 0.0f);\r\n\t\t\tfloat fXTmpA = (float)((m_poiLT.m_fY - dB)/dK);\r\n\t\t\tfloat fXTmpB = (float)((m_poiRB.m_fY - dB)/dK);\r\n\t\t\tfloat fYTmpA = (float)(dK*m_poiLT.m_fX + dB);\r\n\t\t\tfloat fYTmpB = (float)(dK*m_poiRB.m_fX + dB);\r\n\t\t\tif(CFWMath.isBetweenTwoNum( fXTmpA, m_poiLT.m_fX, m_poiRB.m_fX, true))\t{\r\n\t\t\t\tif(poiIntersA.m_fX < m_poiLT.m_fX && poiIntersA.m_fY < m_poiLT.m_fY)\t{\r\n\t\t\t\t\tpoiIntersA.m_fX = fXTmpA;\r\n\t\t\t\t\tpoiIntersA.m_fY = m_poiLT.m_fY;\r\n\t\t\t\t}\r\n\t\t\t\telse\t{\r\n\t\t\t\t\tpoiIntersB.m_fX = fXTmpA;\r\n\t\t\t\t\tpoiIntersB.m_fY = m_poiLT.m_fY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(CFWMath.isBetweenTwoNum( fXTmpB, m_poiLT.m_fX, m_poiRB.m_fX, true))\t{\r\n\t\t\t\tif(poiIntersA.m_fX < m_poiLT.m_fX && poiIntersA.m_fY < m_poiLT.m_fY)\t{\r\n\t\t\t\t\tpoiIntersA.m_fX = fXTmpB;\r\n\t\t\t\t\tpoiIntersA.m_fY = m_poiRB.m_fY;\r\n\t\t\t\t}\r\n\t\t\t\telse\t{\r\n\t\t\t\t\tpoiIntersB.m_fX = fXTmpB;\r\n\t\t\t\t\tpoiIntersB.m_fY = m_poiRB.m_fY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(CFWMath.isBetweenTwoNum( fYTmpA, m_poiLT.m_fY, m_poiRB.m_fY, true))\t{\r\n\t\t\t\tif(poiIntersA.m_fX < m_poiLT.m_fX && poiIntersA.m_fY < m_poiLT.m_fY)\t{\r\n\t\t\t\t\tpoiIntersA.m_fX = m_poiLT.m_fX;\r\n\t\t\t\t\tpoiIntersA.m_fY = fYTmpA;\r\n\t\t\t\t}\r\n\t\t\t\telse\t{\r\n\t\t\t\t\tpoiIntersB.m_fX = m_poiLT.m_fX;\r\n\t\t\t\t\tpoiIntersB.m_fY = fYTmpA;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(CFWMath.isBetweenTwoNum( fYTmpB, m_poiLT.m_fY, m_poiRB.m_fY, true))\t{\r\n\t\t\t\tif(poiIntersA.m_fX < m_poiLT.m_fX && poiIntersA.m_fY < m_poiLT.m_fY)\t{\r\n\t\t\t\t\tpoiIntersA.m_fX = m_poiRB.m_fX;\r\n\t\t\t\t\tpoiIntersA.m_fY = fYTmpB;\r\n\t\t\t\t}\r\n\t\t\t\telse\t{\r\n\t\t\t\t\tpoiIntersB.m_fX = m_poiRB.m_fX;\r\n\t\t\t\t\tpoiIntersB.m_fY = fYTmpB;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(bPoiInsideRect)\t{\r\n\t\t\t\tCFWVector vecBE = new CFWVector(poiOutOfRect.sub(rectRet.m_poiLT));\r\n\t\t\t\tCFWVector vecBA = new CFWVector(poiIntersA.sub(rectRet.m_poiLT));\r\n\t\t\t\tCFWVector vecBB = new CFWVector(poiIntersB.sub(rectRet.m_poiLT));\r\n\t\t\t\tif(vecBE.isSameDir_VerticalIn(vecBA))\t{\r\n\t\t\t\t\trectRet.m_poiRB = poiIntersA;\r\n\t\t\t\t}\r\n\t\t\t\telse if(vecBE.isSameDir_VerticalIn(vecBB))\t{\r\n\t\t\t\t\trectRet.m_poiRB = poiIntersB;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\t{\r\n\t\t\t\trectRet.m_poiLT = poiIntersA;\r\n\t\t\t\trectRet.m_poiRB = poiIntersB;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//last check : intersected line segment whether inside rectangle\r\n\t\tif(!isInsideArea( 9, rectRet.m_poiLT) || !isInsideArea( 9, rectRet.m_poiRB))\t{\r\n\t\t\tSystem.out.println(\"generated line segment isn't inside rectangle!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn(rectRet);\r\n\t}",
"public boolean intersects (UCSCGeneLine first, int start, int end){\n\t\tif (end < first.getTxStart() || start > first.getTxEnd()) return false;\n\t\treturn true;\n\t}",
"private double intersect(double start0, double end0, double start1, double end1)\n {\n double length = Double.min(end0, end1) - Double.max(start0, start1);\n return Double.min(Double.max(0, length), 1.0);\n }",
"public void onIntersect() {\n }",
"public boolean intersects(GraphicalFigure fig) {\n\n\t\t// Get the distance between the 2 figures on the x axis\n\t\tint xDist = pos.xCoord() - fig.getOffset().xCoord();\n\n\t\t// Get the distance on the y axis\n\t\tint yDist = pos.yCoord() - fig.getOffset().xCoord();\n\n\t\t// All if's allow for if the x's are the same\n\t\t// Check to see if the figure is on the right and overlaps\n\t\tif (xDist >= 0 && xDist < fig.getWidth()) {\n\n\t\t\t// For loop variables\n\t\t\tint initial = 0;\n\t\t\tint compare = 0;\n\t\t\tBoolean loopCheck = false;\n\n\t\t\t// All if's allow for if the y's are the same\n\t\t\t// Check if it's above the object and within range\n\t\t\tif (yDist >= 0 && xDist < fig.getHeight()) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = pos.yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = pos.yCoord() + fig.getHeight() - yDist;\n\t\t\t}\n\n\t\t\t// Check if it's below the object and within range\n\t\t\telse if (yDist <= 0 && xDist < height) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = fig.getOffset().yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = fig.getOffset().yCoord() + fig.getHeight() + yDist;\n\t\t\t}\n\n\t\t\t// If the loop check is true, do a for loop\n\t\t\tif (loopCheck) {\n\n\t\t\t\t// Create a location variable\n\t\t\t\tLocation loc;\n\t\t\t\t// Loop through the intersecting rectangle\n\t\t\t\t// Loop Horizontally\n\t\t\t\tfor (int i = pos.xCoord(); i < pos.xCoord() + fig.getWidth() - xDist; i++) {\n\t\t\t\t\t// Loop through vertically\n\t\t\t\t\tfor (int j = initial; j < compare; j++) {\n\t\t\t\t\t\t// Create a location for the new pixel\n\t\t\t\t\t\tloc = new Location(i, j);\n\n\t\t\t\t\t\t// Check for overlap, return true\n\t\t\t\t\t\tif (findPixel(loc) && fig.findPixel(loc)) {\n\t\t\t\t\t\t\treturn true;\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\n\t\t// All if's allow for if the x's are the same\n\t\t// Check if the figure is on the left and overlaps\n\t\telse if (xDist >= 0 && xDist < width) {\n\t\t\t// For loop variables\n\t\t\tint initial = 0;\n\t\t\tint compare = 0;\n\t\t\tBoolean loopCheck = false;\n\n\t\t\t// All if's allow for if the y's are the same\n\t\t\t// Check if it's above the object and within range\n\t\t\tif (yDist >= 0 && xDist < fig.getHeight()) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = pos.yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = pos.yCoord() + fig.getHeight() - yDist;\n\t\t\t}\n\n\t\t\t// Check if it's below the object and within range\n\t\t\telse if (yDist <= 0 && xDist < height) {\n\n\t\t\t\t// Set loopCheck to true\n\t\t\t\tloopCheck = true;\n\n\t\t\t\t// For loop variables\n\t\t\t\t// Set initial to the location of the y coordinate\n\t\t\t\tinitial = fig.getOffset().yCoord();\n\n\t\t\t\t// Set the compare value to the location of the y + the height of the figure -\n\t\t\t\t// the y distance\n\t\t\t\tcompare = fig.getOffset().yCoord() + fig.getHeight() + yDist;\n\t\t\t}\n\n\t\t\t// If the loop check is true, do a for loop\n\t\t\tif (loopCheck) {\n\n\t\t\t\t// Create a location variable\n\t\t\t\tLocation loc;\n\t\t\t\t// Loop through the intersecting rectangle\n\t\t\t\t// Loop Horizontally\n\t\t\t\tfor (int i = fig.getOffset().xCoord(); i < fig.getOffset().xCoord() + width + xDist; i++) {\n\t\t\t\t\t// Loop through vertically\n\t\t\t\t\tfor (int j = initial; j < compare; j++) {\n\t\t\t\t\t\t// Create a location for the new pixel\n\t\t\t\t\t\tloc = new Location(i, j);\n\n\t\t\t\t\t\t// Check for overlap, return true\n\t\t\t\t\t\tif (findPixel(loc) && fig.findPixel(loc)) {\n\t\t\t\t\t\t\treturn true;\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\n\t\t// If no intersection found, return false\n\t\treturn false;\n\t}",
"public abstract boolean intersect(BoundingBox bbox);",
"boolean intersects( Geometry gmo );",
"private static boolean hasVisibleRegion(int begin,int end,int first,int last) {\n return (end > first && begin < last);\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isIntersection();",
"public BufferedImage getThresh(BufferedImage img, int left, int right, int top, int bottom) { // Method to get thresholded image \n\t\t//Vision.logger.debug(\"Starting thresholding\");\n\n\t\t//stops it fucking up the locations before we've given it the thresholds\n\t\tif (worldState.isClickingDone()){\n\n\t\t\tnewBluePixels = new ArrayList<Point>();\n\t\t\tnewYellowPixels = new ArrayList<Point>();\n\t\t\tArrayList<Point> bluePixels = new ArrayList<Point>();\n\t\t\tArrayList<Point> yellowPixels = new ArrayList<Point>();\n\t\t\t/*pitch = worldState.getRoom();\n\t\t\twidth = right-left;\n\t\t\theight = top-bottom;*/\n\n\t\t\t/*\n Initialising to one to stop java dividing by 0 when it shouldn't\n\t\t\t */\n\t\t\tredCountA = 0;\n\t\t\tredCountB = 0;\n\t\t\tredCountC = 0;\n\t\t\tredCountD = 0;\n\t\t\tredCountE = 0;\n\t\t\tredCentroidA.setLocation(0,0);\n\t\t\tredCentroidB.setLocation(0,0);\n\t\t\tredCentroidC.setLocation(0,0);\n\t\t\tredCentroidD.setLocation(0,0);\n\t\t\tredCentroidE.setLocation(0,0);\n\n\t\t\tblueCountA = 0;\n\t\t\tblueCountB = 0;\n\t\t\tblueCountC = 0;\n\t\t\tblueCountD = 0;\n\t\t\tblueCountE = 0;\n\t\t\tblueCentroidA.setLocation(0,0);\n\t\t\tblueCentroidB.setLocation(0,0);\n\t\t\tblueCentroidC.setLocation(0,0);\n\t\t\tblueCentroidD.setLocation(0,0);\n\t\t\tblueCentroidE.setLocation(0,0);\n\n\t\t\tyellowCountA = 0;\n\t\t\tyellowCountB = 0;\n\t\t\tyellowCountC = 0;\n\t\t\tyellowCountD = 0;\n\t\t\tyellowCountE = 0;\n\t\t\tyellowCentroidA.setLocation(0,0);\n\t\t\tyellowCentroidB.setLocation(0,0);\n\t\t\tyellowCentroidC.setLocation(0,0);\n\t\t\tyellowCentroidD.setLocation(0,0);\n\t\t\tyellowCentroidE.setLocation(0,0);\n\n\t\t\t//Vision.logger.debug(\"Iterating image\");\n\t\t\tfor (int i = left; i < right; i++) {\n\t\t\t\tfor (int j = top; j < bottom; j++) {\n\t\t\t\t\t//Vision.logger.debug(\"Oh dear (i,j) = \" + Integer.toString(i) + \",\" + Integer.toString(j) + \")\");\n\t\t\t\t\tc = new Color(img.getRGB(i,j));\n\n\t\t\t\t\tGB = Math.abs((c.getBlue() - c.getGreen()));\n\t\t\t\t\tRG = Math.abs((c.getRed() - c.getGreen()));\n\t\t\t\t\t//RB = Math.abs((c.getRed() - c.getBlue()));\n\n\t\t\t\t\tif(isRed(c, GB)){ // was inside RB > 50 && RG > 50\n\t\t\t\t\t\timg.setRGB(i, j, Color.red.getRGB()); //Red Ball\n\t\t\t\t\t\trandy = Math.random();\n\t\t\t\t\t\tif (randy > 0 && randy <= 0.2){\t\t\t\t\t\t \n\t\t\t\t\t\t\tredCountA++;\n\t\t\t\t\t\t\tredCentroidA.setLocation(redCentroidA.getX() + i, redCentroidA.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.2 && randy <= 0.4){\n\t\t\t\t\t\t\tredCountB++;\n\t\t\t\t\t\t\tredCentroidB.setLocation(redCentroidB.getX() + i, redCentroidB.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.4 && randy <= 0.6){\n\t\t\t\t\t\t\tredCountC++;\n\t\t\t\t\t\t\tredCentroidC.setLocation(redCentroidC.getX() + i, redCentroidC.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.6 && randy <= 0.8){\n\t\t\t\t\t\t\tredCountD++;\n\t\t\t\t\t\t\tredCentroidD.setLocation(redCentroidD.getX() + i, redCentroidD.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.8 && randy <= 1){\n\t\t\t\t\t\t\tredCountE++;\n\t\t\t\t\t\t\tredCentroidE.setLocation(redCentroidE.getX() + i, redCentroidE.getY() + j);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (isYellow(c)) {\n\t\t\t\t\t\tsetCs(i,j,right,left,top,bottom, img);\n\t\t\t\t\t\tif (isYellow(cS) && isYellow(cE) && isYellow(cEE) && isYellow(cEN) && isYellow(cSS) && isYellow(cSW) ){\n\t\t\t\t\t\t\timg.setRGB(i, j, Color.yellow.getRGB()); // Yellow robot\n\t\t\t\t\t\t\tyellowRobotX.add(i);\n\t\t\t\t\t\t\tyellowRobotY.add(j);\n\t\t\t\t\t\t\trandy = Math.random();\n\t\t\t\t\t\t\tif (randy > 0 && randy <= 0.2){\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tyellowCountA++;\n\t\t\t\t\t\t\t\tyellowCentroidA.setLocation(yellowCentroidA.getX() + i, yellowCentroidA.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.2 && randy <= 0.4){\n\t\t\t\t\t\t\t\tyellowCountB++;\n\t\t\t\t\t\t\t\tyellowCentroidB.setLocation(yellowCentroidB.getX() + i, yellowCentroidB.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.4 && randy <= 0.6){\n\t\t\t\t\t\t\t\tyellowCountC++;\n\t\t\t\t\t\t\t\tyellowCentroidC.setLocation(yellowCentroidC.getX() + i, yellowCentroidC.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.6 && randy <= 0.8){\n\t\t\t\t\t\t\t\tyellowCountD++;\n\t\t\t\t\t\t\t\tyellowCentroidD.setLocation(yellowCentroidD.getX() + i, yellowCentroidD.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.8 && randy <= 1){\n\t\t\t\t\t\t\t\tyellowCountE++;\n\t\t\t\t\t\t\t\tyellowCentroidE.setLocation(yellowCentroidE.getX() + i, yellowCentroidE.getY() + j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tyellowPixels.add(new Point(i,j));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (isBlue(c)){\n\t\t\t\t\t\tsetCs(i,j,right,left,top,bottom, img);\n\t\t\t\t\t\tif (isBlue(cS) && isBlue(cE) && isBlue(cEE) && isBlue(cEN) && isBlue(cSS) && isBlue(cSW) ){\n\t\t\t\t\t\t\timg.setRGB(i, j, Color.blue.getRGB()); // Blue robot \n\t\t\t\t\t\t\tblueRobotX.add(i);\n\t\t\t\t\t\t\tblueRobotY.add(j);\n\t\t\t\t\t\t\trandy = Math.random();\n\t\t\t\t\t\t\tif (randy > 0 && randy <= 0.2){\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tblueCountA++;\n\t\t\t\t\t\t\t\tblueCentroidA.setLocation(blueCentroidA.getX() + i, blueCentroidA.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.2 && randy <= 0.4){\n\t\t\t\t\t\t\t\tblueCountB++;\n\t\t\t\t\t\t\t\tblueCentroidB.setLocation(blueCentroidB.getX() + i, blueCentroidB.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.4 && randy <= 0.6){\n\t\t\t\t\t\t\t\tblueCountC++;\n\t\t\t\t\t\t\t\tblueCentroidC.setLocation(blueCentroidC.getX() + i, blueCentroidC.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.6 && randy <= 0.8){\n\t\t\t\t\t\t\t\tblueCountD++;\n\t\t\t\t\t\t\t\tblueCentroidD.setLocation(blueCentroidD.getX() + i, blueCentroidD.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.8 && randy <= 1){\n\t\t\t\t\t\t\t\tblueCountE++;\n\t\t\t\t\t\t\t\tblueCentroidE.setLocation(blueCentroidE.getX() + i, blueCentroidE.getY() + j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbluePixels.add(new Point(i,j));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//make blue thresholds for the different pitches in that [pitch][x] style\n\t\t\t\t\t}\n\t\t\t\t\telse if (isGreen(c,GB,RG)) {\n\t\t\t\t\t\timg.setRGB(i,j, Color.green.getRGB()); // GreenPlates \n\t\t\t\t\t\tif (Point.distance(\tworldState.getBlueRobot().getPosition().getCentre().x,\n\t\t\t\t\t\t\t\tworldState.getBlueRobot().getPosition().getCentre().y,\n\t\t\t\t\t\t\t\ti,j) < 34) {\n\t\t\t\t\t\t\tblueGreenPlate.add(new Point(i,j));\n\t\t\t\t\t\t} \n\t\t\t\t\t\tif (Point.distance(\tworldState.getYellowRobot().getPosition().getCentre().x,\n\t\t\t\t\t\t\t\tworldState.getYellowRobot().getPosition().getCentre().y,\n\t\t\t\t\t\t\t\ti,j) < 34){\n\t\t\t\t\t\t\tyellowGreenPlate.add(new Point(i,j));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (redCountA == 0) redCountA++;\n\t\t\tif (redCountB == 0) redCountB++;\n\t\t\tif (redCountC == 0) redCountC++;\n\t\t\tif (redCountD == 0) redCountD++;\n\t\t\tif (redCountE == 0) redCountE++;\n\t\t\tif (blueCountA == 0) blueCountA++;\n\t\t\tif (blueCountB == 0) blueCountB++;\n\t\t\tif (blueCountC == 0) blueCountC++;\n\t\t\tif (blueCountD == 0) blueCountD++;\n\t\t\tif (blueCountE == 0) blueCountE++;\n\t\t\tif (yellowCountA == 0) yellowCountA++;\n\t\t\tif (yellowCountB == 0) yellowCountB++;\n\t\t\tif (yellowCountC == 0) yellowCountC++;\n\t\t\tif (yellowCountD == 0) yellowCountD++;\n\t\t\tif (yellowCountE == 0) yellowCountE++;\n\n\n\t\t\t//TODO: Run these points through the parralax fix\n\t\t\ttotalRedX = 0;\n\t\t\ttotalRedY = 0;\n\t\t\tnumRedCentroids = 0;\n\n\n\t\t\tredCentroidA.setLocation(redCentroidA.getX()/redCountA, redCentroidA.getY()/redCountA);\n\t\t\tredCentroidB.setLocation(redCentroidB.getX()/redCountB, redCentroidB.getY()/redCountB);\n\t\t\tredCentroidC.setLocation(redCentroidC.getX()/redCountC, redCentroidC.getY()/redCountC);\n\t\t\tredCentroidD.setLocation(redCentroidD.getX()/redCountD, redCentroidD.getY()/redCountD);\n\t\t\tredCentroidE.setLocation(redCentroidE.getX()/redCountE, redCentroidE.getY()/redCountE);\n\n\t\t\ttotalYellowX = 0;\n\t\t\ttotalYellowY = 0;\n\t\t\tnumYellowCentroids = 0;\n\n\n\t\t\tyellowCentroidA.setLocation(yellowCentroidA.getX()/yellowCountA, yellowCentroidA.getY()/yellowCountA);\n\t\t\tyellowCentroidB.setLocation(yellowCentroidB.getX()/yellowCountB, yellowCentroidB.getY()/yellowCountB);\n\t\t\tyellowCentroidC.setLocation(yellowCentroidC.getX()/yellowCountC, yellowCentroidC.getY()/yellowCountC);\n\t\t\tyellowCentroidD.setLocation(yellowCentroidD.getX()/yellowCountD, yellowCentroidD.getY()/yellowCountD);\n\t\t\tyellowCentroidE.setLocation(yellowCentroidE.getX()/yellowCountE, yellowCentroidE.getY()/yellowCountE);\n\n\t\t\ttotalBlueX = 0;\n\t\t\ttotalBlueY = 0;\n\t\t\tnumBlueCentroids = 0;\n\n\n\t\t\tblueCentroidA.setLocation(blueCentroidA.getX()/blueCountA, blueCentroidA.getY()/blueCountA);\n\t\t\tblueCentroidB.setLocation(blueCentroidB.getX()/blueCountB, blueCentroidB.getY()/blueCountB);\n\t\t\tblueCentroidC.setLocation(blueCentroidC.getX()/blueCountC, blueCentroidC.getY()/blueCountC);\n\t\t\tblueCentroidD.setLocation(blueCentroidD.getX()/blueCountD, blueCentroidD.getY()/blueCountD);\n\t\t\tblueCentroidE.setLocation(blueCentroidE.getX()/blueCountE, blueCentroidE.getY()/blueCountE);\n\n\t\t\tc = new Color(img.getRGB((int)redCentroidA.getX(), (int)redCentroidA.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidA.getX();\n\t\t\t\ttotalRedY += redCentroidA.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidB.getX(), (int)redCentroidB.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidB.getX();\n\t\t\t\ttotalRedY += redCentroidB.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidC.getX(), (int)redCentroidC.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidC.getX();\n\t\t\t\ttotalRedY += redCentroidC.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidD.getX(), (int)redCentroidD.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidD.getX();\n\t\t\t\ttotalRedY += redCentroidD.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidE.getX(), (int)redCentroidE.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidE.getX();\n\t\t\t\ttotalRedY += redCentroidE.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\n\t\t\tif (numRedCentroids == 0){\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\n\t\t\tredX = (int)(totalRedX/numRedCentroids);\n\t\t\tredY = (int)(totalRedY/numRedCentroids);\n\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidA.getX(), (int)yellowCentroidA.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidA.getX();\n\t\t\t\ttotalYellowY += yellowCentroidA.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidB.getX(), (int)yellowCentroidB.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidB.getX();\n\t\t\t\ttotalYellowY += yellowCentroidB.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidC.getX(), (int)yellowCentroidC.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidC.getX();\n\t\t\t\ttotalYellowY += yellowCentroidC.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidD.getX(), (int)yellowCentroidD.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidD.getX();\n\t\t\t\ttotalYellowY += yellowCentroidD.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidE.getX(), (int)yellowCentroidE.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidE.getX();\n\t\t\t\ttotalYellowY += yellowCentroidE.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\n\t\t\tif (numYellowCentroids == 0){\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\n\t\t\tyellowX = (int)(totalYellowX/numYellowCentroids);\n\t\t\tyellowY = (int)(totalYellowY/numYellowCentroids);\n\n\t\t\tc = new Color(img.getRGB((int)blueCentroidA.getX(), (int)blueCentroidA.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidA.getX();\n\t\t\t\ttotalBlueY += blueCentroidA.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidB.getX(), (int)blueCentroidB.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidB.getX();\n\t\t\t\ttotalBlueY += blueCentroidB.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidC.getX(), (int)blueCentroidC.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidC.getX();\n\t\t\t\ttotalBlueY += blueCentroidC.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidD.getX(), (int)blueCentroidD.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidD.getX();\n\t\t\t\ttotalBlueY += blueCentroidD.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidE.getX(), (int)blueCentroidE.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidE.getX();\n\t\t\t\ttotalBlueY += blueCentroidE.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\n\t\t\tif (numBlueCentroids == 0){\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\n\t\t\tblueX = (int)(totalBlueX/numBlueCentroids);\n\t\t\tblueY = (int)(totalBlueY/numBlueCentroids);\n\n\t\t\tblueGreenPlate4Points = plate.getCorners(blueGreenPlate);\n\t\t\tyellowGreenPlate4Points = plate.getCorners(yellowGreenPlate);\n\n\t\t\tworldState.getBlueRobot().getPosition().setCorners(blueGreenPlate4Points);\n\t\t\tworldState.getYellowRobot().getPosition().setCorners(yellowGreenPlate4Points);\n\n\t\t\tPoint fixBall = new Point(redX,redY);\n\t\t\tif ((redX != 0) && (redY != 0)) {\n\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\tworldState.setBallPosition(fixBall);\n\t\t\t\t}else{ \n\t\t\t\t\tworldState.setBallPosition(DistortionFix.barrelCorrected(fixBall));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tPoint fixBlue = new Point(blueX,blueY);\n\t\t\tif ((blueX != 0) && (blueY != 0)) {\n\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\tworldState.setBlueRobotPosition(fixParallax(fixBlue,worldState.getBlueRobot()));\n\t\t\t\t}else{\n\t\t\t\t\tworldState.setBlueRobotPosition(fixParallax(DistortionFix.barrelCorrected(fixBlue),worldState.getBlueRobot()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tPoint fixYell = new Point(yellowX,yellowY);\n\t\t\tif ((yellowX != 0) && (yellowY != 0)) {\n\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\tworldState.setYellowRobotPosition(fixParallax(fixYell,worldState.getYellowRobot()));\n\t\t\t\t}else{\n\t\t\t\t\tworldState.setYellowRobotPosition(fixParallax(DistortionFix.barrelCorrected(fixYell),worldState.getYellowRobot()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(Point p : bluePixels){\n\n\t\t\t\tif( plate.isInRectangle(p,blueGreenPlate4Points) ){\n\t\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\t\tnewBluePixels.add(fixParallax(p,worldState.getBlueRobot()));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnewBluePixels.add(fixParallax(DistortionFix.barrelCorrected(p),worldState.getBlueRobot()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(Point p : yellowPixels){\n\n\t\t\t\tif( plate.isInRectangle(p,yellowGreenPlate4Points) ){\n\t\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\t\tnewYellowPixels.add(fixParallax(p,worldState.getYellowRobot()));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnewYellowPixels.add(fixParallax(DistortionFix.barrelCorrected(p),worldState.getYellowRobot()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tworldState.setBluePixels(newBluePixels);\n\t\t\tworldState.setYellowPixels(newYellowPixels);\n\n\t\t\t//The above is supposed to filter the pixels and pick up only the T pixels, but the orientation then is always with the (0,0) point \n\n\n\t\t\tblueGreenPlate.clear();\n\t\t\tyellowGreenPlate.clear();\n\n\t\t}\n\n\t\treturn img;\n\n\t}",
"@Override\n public boolean\n doIntersection(Ray inOut_Ray) {\n // TODO!\n return false;\n }",
"public boolean areIntersecting() {\n return intersection != null;\n }",
"@Override\n\tpublic void intersect(Ray ray, IntersectResult result) {\n\t\t\t\tdouble tmin,tmax;\n\t\t\t\tdouble xmin, xmax, ymin, ymax, zmin, zmax;\n\t\t\t\t//find which face to cross\n\n\t\t\t\tif(ray.viewDirection.x>0){\n\t\t\t\t\txmin=(min.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t\txmax=(max.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t}else{\n\t\t\t\t\txmin=(max.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t\txmax=(min.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t}\n\t\t\t\tif(ray.viewDirection.y>0){\n\t\t\t\t\tymin=(min.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t\tymax=(max.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t}else{\n\t\t\t\t\tymin=(max.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t\tymax=(min.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t}\n\t\t\t\tif(ray.viewDirection.z>0){\n\t\t\t\t\tzmin=(min.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t\tzmax=(max.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t}else{\n\t\t\t\t\tzmin=(max.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t\tzmax=(min.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmin=Double.max(xmin, ymin);\n\t\t\t\ttmin=Double.max(tmin, zmin);\n\t\t\t\ttmax=Double.min(xmax, ymax);\n\t\t\t\ttmax=Double.min(tmax, zmax);\n\t\t\t\t\n\t\t\t\t \n\t\t\t\tif(tmin<tmax && tmin>0){\n\t\t\t\t\t\n\t\t\t\t\tresult.material=material;\n\t\t\t\t\tresult.t=tmin;\n\t\t\t\t\tPoint3d p=new Point3d(ray.viewDirection);\n\t\t\t\t\tp.scale(tmin);\n\t\t\t\t\tp.add(ray.eyePoint);\n\t\t\t\t\tresult.p=p;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfinal double epsilon=1e-9;\n\t\t\t\t\t// find face and set the normal\n\t\t\t\t\tif(Math.abs(p.x-min.x)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(-1,0,0);\n\t\t\t\t\t}else if(Math.abs(p.x-max.x)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(1,0,0);\n\t\t\t\t\t}else if(Math.abs(p.y-min.y)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,-1,0);\n\t\t\t\t\t}else if(Math.abs(p.y-max.y)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,1,0);\n\t\t\t\t\t}else if(Math.abs(p.z-min.z)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,0,-1);\n\t\t\t\t\t}else if(Math.abs(p.z-max.z)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,0,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t}",
"String isIntersect(pair pair1){\n\t\tString s;\n\t\tif(pair1.z==true){\n\t\t\tif(pair1.x>=xRange.x && pair1.x<=xRange.y){ s=\"mid\";\n\t\t\treturn s;\n\t\t\t}\n\t\t\telse if(pair1.x<xRange.x){s=\"right\";\n\t\t\treturn s;\n\t\t\t}\n\t\t\telse{s=\"left\";\n\t\t\treturn s;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t}\n\t\telse{\n\t\t\tif(pair1.y>=yRange.x && pair1.y<=yRange.y){ s=\"mid\";\n\t\t\treturn s;}\n\t\t\telse if(pair1.y<yRange.x){s=\"right\";\n\t\t\treturn s;\n\t\t\t} \n\t\t\telse{s=\"left\";\n\t\t\treturn s;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t}\t\t\t\t \n\t}",
"public Intersection trace(Point start, Point end) {\n\t\tdouble curDist, closeDist;\r\n\t\tIntersection closestIntersection= new Intersection(60+1, null, null);\r\n\t\tfor(Thing thing:thing){\r\n\t\t Intersection thingIntersection = thing.getIntersection(start, end);\r\n\t\t\tcurDist = thingIntersection.getDistance();\r\n\t\t\tcloseDist = closestIntersection.getDistance();\r\n\t\t\tif (curDist < closeDist) {\r\n\t\t\t\tclosestIntersection = thingIntersection;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(Thing light:lights){\r\n\t\t Intersection thingIntersection = light.getIntersection(start, end);\r\n\t\t\tcurDist = thingIntersection.getDistance();\r\n\t\t\tcloseDist = closestIntersection.getDistance();\r\n\t\t\tif (curDist < closeDist) {\r\n\t\t\t\tclosestIntersection = thingIntersection;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closestIntersection;\r\n\t}",
"public void renderSectionF(Output output, int start, int end) {\n\t\t\n\t\t//Vector point = camera.position;\n\t\tVector point = new Vector(0.0, 3.8, 8.0);\n\t\tVector point2 = camera.position;\n\n\t\tfor(int x = start; x < end; x++) {\n\t\t\tfor(int y = 0; y < output.height; y++) {\n\t\t\t\t\n\t\t\t\toutput.writePixel(x, y, new Vector(0.0, 255.0, 0.0));\n\t\t\t\t\n\t\t\t\tdouble worldX = ((double)x - output.width / 2.0) / output.width;\n\t\t\t\tdouble worldY = ((double)y - output.height / 2.0) / output.width;\n\t\t\t\t\t\t\n\t\t\t\tVector locDirection = new Vector(worldX, worldY, camera.focalLength);\n\t\t\t\t\n\t\t\t\tVector w = camera.lookingAt;\n\t\t\t\tVector u = camera.lookingAt.cross(camera.up);\n\t\t\t\tVector v = camera.up;\n\t\t\t\t\n\t\t\t\tVector direction = Transforms.localToWorldCoords(locDirection, u, v, w);\n\t\t\t\tRay primaryRay = new Ray(camera.position, direction);\n\t\t\t\t\n\t\t\t\tVector color = new Vector(0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t\tObjectHit hit = getHit(primaryRay);\n\t\t\t\t\n\t\t\t\tif(hit.hit) {\n\t\t\t\t\tVector vec = point.minus(hit.hitPoint).normalized();\n\t\t\t\t\tVector vec2 = point2.minus(hit.hitPoint).normalized();\n\t\t\t\t\t\n\t\t\t\t\tdouble factor = 255 * vec.dot(hit.normal) + 255 * vec2.dot(hit.normal);\n\t\t\t\t\t\n\t\t\t\t\tcolor = color.plus(hit.material.getColor(hit.textureCoordinates.x, hit.textureCoordinates.y).times(factor));\n\t\t\t\t\t//color = new Vector(hit.textureCoordinates.x, hit.textureCoordinates.y, 1 - hit.textureCoordinates.x - hit.textureCoordinates.y).times(255);\n\t\t\t\t}\n\t\t\t\n\t\t\t\toutput.writePixel(x, y, color);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public boolean intersects (GraphicalFigure fig) {\n\t\t\n\t\t// Check to see if there is any overlap between the 2 figures horizontally\n\t\tif (fig.getOffset().xCoord() > this.gfPos.xCoord() + this.getWidth() || this.gfPos.xCoord() > fig.getOffset().xCoord() + fig.getWidth()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Check to see if there is any overlap between the 2 figures vertically\n\t\tif (fig.getOffset().yCoord() > this.gfPos.yCoord() + this.getHeight() || this.gfPos.yCoord() > fig.getOffset().yCoord() + fig.getHeight()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean intersects(int from1, int to1, int from2, int to2) {\n\t\treturn from1 <= from2 && to1 >= from2 // (.[..)..] or (.[...]..)\n\t\t\t\t|| from1 >= from2 && from1 <= to2; // [.(..]..) or [..(..)..\n\t}",
"void drawRegion (double b, double e) {\n begT = b; endT = e;\n drawStuff (img.getGraphics ());\n }",
"public void intersect (int mousex, int mousey) {\n if (mousex <= (pos.x + dim.w) && mousex >= pos.x && mousey <= (pos.y + dim.h) && mousey >= pos.y) {\n isect = true;\n }\n else {\n isect = false;\n }\n }",
"private ArrayList<ColorMixerModel.ColorItem> pathIntersection(){\n ArrayList<ColorMixerModel.ColorItem> toDel = new ArrayList<>();\n for(ColorMixerModel.ColorItem c: cmModel.colorSet){\n Ellipse2D.Float cobj = new Ellipse2D.Float(c.getPos().x,c.getPos().y, c.getR(),c.getR());\n if(mouseTrace.intersects(cobj.getBounds2D())){\n toDel.add(c);\n }\n }\n return toDel;\n }",
"static boolean rectanglesOverlap(Rectangle r1, Rectangle r2){\n List<int[]> pointsOfInterest = new ArrayList<int[]>();\n for (int[] i : r1.getPoints())\n for (int[] j : r2.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r2.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n\n // Check if any points in rectangle 2 fall in 1\n //List<int[]> pointsOfInterest = new ArrayList<int[]>();\n pointsOfInterest.clear();\n for (int[] i : r2.getPoints())\n for (int[] j : r1.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r1.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n \n return false;\n }",
"public void intersect(Shape s);",
"@Override\n public boolean intersectsAt(Point point){\n if (planeImage.getBoundingBoxAt(currPos).intersects(point)){\n return true;\n }\n else\n return false;\n }",
"private boolean isOverlapped(Image img1, int x1, int y1, Image img2,\r\n\t\t\tint x2, int y2, int distThreshold) {\r\n\t\tint xCenter1 = x1 + img1.getWidth() / 2;\r\n\t\tint yCenter1 = y1 = img1.getHeight() / 2;\r\n\r\n\t\tint xCenter2 = x2 + img2.getWidth() / 2;\r\n\t\tint yCenter2 = y2 = img2.getHeight() / 2;\r\n\r\n\t\tint xCenterDist = Math.abs(xCenter1 - xCenter2);\r\n\t\tint yCenterDist = Math.abs(yCenter1 - yCenter2);\r\n\r\n\t\treturn distThreshold >= xCenterDist + yCenterDist;\r\n\t}",
"@Override\r\n public void intersect( Ray ray, IntersectResult result ) {\n\t\r\n }",
"public boolean doOverlapNew(VIntWritable[] e1, VIntWritable[] e2){\n\t\tSet<VIntWritable> intersection = new HashSet<>(Arrays.asList(e1));\t\t\t\t\n\t\tintersection.retainAll(Arrays.asList(e2));\t\t\n\t\t\n\t\t//System.out.println(\"overlap? \"+ (intersection.isEmpty() ? false : true));\n\t\treturn intersection.isEmpty() ? false : true;\n\t\t\n\t\t//SOLUTION 2: slower O(nlogn) but needs less space\n//\t\tArrays.sort(e1); //O(nlogn)\n//\t\tfor (VIntWritable tmp : e2) { //O(m)\n//\t\t\tif (Arrays.binarySearch(e1, tmp) == -1) //O(logm)\n//\t\t\t\treturn false;\n//\t\t}\n//\t\treturn true;\n\t\t\n\t\t\n\t\t\t\n\t}",
"public Point getLeft(BufferedImage dest_image, Point centroid, Point begin, Point end) {\n\n\n int xc = centroid.x;\n\n int x = begin.x;\n int y = begin.y;\n\n int x_sumL = 0;\n int y_sumL = 0;\n\n int countL = 0;\n for (y = begin.y; y < end.y; y++) {\n for (x = begin.x; x <= xc; x++) {\n\n if (image_dest.getRGB(x, y) != -1) {\n x_sumL += x;\n y_sumL += y;\n countL++;\n //\t\t\t\t System.out.print(\"0\");\n } else {\n //\t\t\t\tSystem.out.print(\"1\");\n }\n }\n //\t\tSystem.out.println(\"\");\n\n }\n//\t\tSystem.out.println(\"xsumL : \"+x_sumL);\n//\t\tSystem.out.println(\"ysumL : \"+y_sumL);\n//\t\tSystem.out.println(\"CountL :\"+countL);\n int x_left = 0;\n int y_left = 0;\n if (countL == 0) {\n //JOptionPane.showMessageDialog(null, \"Kiri count 0 \"+fname );\n x_left = 0;\n y_left = 0;\n } else {\n double d_yLeft = Double.valueOf(df.format(new Double(y_sumL).doubleValue() / new Double(countL).doubleValue()));\n double d_xLeft = Double.valueOf(df.format(new Double(x_sumL).doubleValue() / new Double(countL).doubleValue()));\n y_left = (int) Math.round(new Double(d_yLeft));\n x_left = (int) Math.round(new Double(d_xLeft));\n\n//\t\t\tx_left = (int)Math.round(new Double(x_sumL)/new Double(countL));\n//\t\t\ty_left = (int)Math.round(new Double(y_sumL)/new Double(countL));\n }\n return new Point(x_left, y_left);\n\n }",
"static boolean doTheseOverlap(RBox b1, RBox b2){\n\t\t\n\t\tif(contains(b1,b2))\n\t\t\treturn true;\n\t\t\n\t\tif(contains(b2,b1))\n\t\t\treturn true;\n\t\t\n\t\tboolean xOverlap=false ;\n\t\tboolean yOverlap=false ;\n\t\t\n\t\tif(b1.xmax==b2.xmin && b2.xmax > b1.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif(b2.xmax==b1.xmin && b1.xmax > b2.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif((b1.xmin<=b2.xmin&&b1.xmax>=b2.xmax)||(b2.xmin<=b1.xmin&&b2.xmax>=b1.xmax))\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\tif(b1.xmin >= b2.xmin && b1.xmin <= b2.xmax)\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\t if(b1.xmax >= b2.xmin && b1.xmax <= b2.xmax)\n\t\t \txOverlap = true;\n\t\t else{//System.out.println(\"X overlap\");\n\t\t \treturn false;}\n\t\t\n\t\t\n\t\tif((b1.ymin<=b2.ymin&&b1.ymax>=b2.ymax)||(b2.ymin<=b1.ymin&&b2.ymax>=b1.ymax))\n\t\t yOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\tif(b1.ymin>=b2.ymin && b1.ymin<=b2.ymax)\n\t\t\tyOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\t\tif(b1.ymax>=b2.ymin && b1.ymax<=b2.ymax)\n\t\t\t\tyOverlap=true;\n\t\t\telse{\n\t\t\t\t//System.out.println(\"Y overlap\");\n\t\t\t\treturn false;}\n\t\t\n\t\tif(xOverlap&&yOverlap)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}",
"static Boolean lineBetween(int x1, int y1, int x2, int y2) {\n double m, b; // for line eqn.\n int maxV = Math.max( pgmInf.img[y1][x1], pgmInf.img[y2][x2] );\n int xmin = Math.min(x1, x2), xmax = Math.max(x1, x2);\n int ymin = Math.min(y1, y2), ymax = Math.max(y1, y2);\n\n if (x1 == x2) {\n // x = c\n for (int y=ymin ; y < ymax ; y++)\n if (pgmInf.img[y][x1] > maxV) return false;\n }\n else {\n // setup for y=mx + b form\n double top = (y1-y2), bot = (x1-x2);\n m = top / bot; \n\n if (m > -1 && m < 1) {\n // y = mx + b\n b = y1 - m * (double)x1;\n\n for (int x=xmin ; x < xmax ; x++) {\n int y = (int)Math.round( m * (double)x + b );\n if (pgmInf.img[y][x] > maxV ) return false;\n }\n }\n else {\n // x = my + b\n top = (x1-x2); bot = (y1-y2); \n m = top / bot; b = x1 - m * (double)y1;\n\n for (int y=ymin ; y < ymax ; y++) {\n int x = (int)Math.round( m* (double)y + b );\n if (pgmInf.img[y][x] > maxV) return false;\n }\n }\n }\n return true;\n }",
"boolean losCompare(double x1, double y1, double x2, double y2, CObject pHo)\r\n {\r\n double delta;\r\n int x, y;\r\n\r\n int xLeft = pHo.hoX - pHo.hoImgXSpot;\r\n int xRight = xLeft + pHo.hoImgWidth;\r\n int yTop = pHo.hoY - pHo.hoImgYSpot;\r\n int yBottom = yTop + pHo.hoImgHeight;\r\n\r\n if (x2 - x1 > y2 - y1)\r\n {\r\n delta = (double) (y2 - y1) / (double) (x2 - x1);\r\n if (x2 > x1)\r\n {\r\n if (xRight < x1 || xLeft >= x2)\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n if (xRight < x2 || xLeft >= x1)\r\n {\r\n return false;\r\n }\r\n }\r\n y = (int) (delta * (xLeft - x1) + y1);\r\n if (y >= yTop && y < yBottom)\r\n {\r\n return true;\r\n }\r\n\r\n y = (int) (delta * (xRight - x1) + y1);\r\n if (y >= yTop && y < yBottom)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n delta = (double) (x2 - x1) / (double) (y2 - y1);\r\n if (y2 > y1)\r\n {\r\n if (yBottom < y1 || yTop >= y2)\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n if (yBottom < y2 || yTop >= y1)\r\n {\r\n return false;\r\n }\r\n }\r\n x = (int) (delta * (yTop - y1) + x1);\r\n if (x >= xLeft && x < xRight)\r\n {\r\n return true;\r\n }\r\n\r\n x = (int) (delta * (yTop - y1) + x1);\r\n if (x >= xLeft && x < xRight)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n }",
"private boolean intersects(int x, int y, int size){\n count++;\n return(!(\n x > this.x + this.width ||\n x + size < this.x ||\n y > this.y + this.height ||\n y + size < this.y\n ));\n }",
"private boolean intersects(Circle range) {\n\t\treturn range.intersects(boundary);\n\t}",
"private boolean commonEndPoint (Coordinate endPoint_in, Coordinate endPoint_out) {\r\n\t\tif (endPoint_in.equals3D(endPoint_out)) {\r\n\t\t\treturn true;\r\n\t\t} else return false;\t\r\n\t}",
"@SuppressWarnings(\"unused\")\r\n private void JCATsegmentVisceralFat2D01() {\r\n \r\n // get the VOI for the external boundary of the abdomen\r\n VOIVector vois = abdomenImage.getVOIs();\r\n if(vois.size() != 1) {\r\n System.err.println(\"segmentVisceralFat2D() Error, did not get 1 VOI\");\r\n return;\r\n }\r\n\r\n // abdomenImage has one VOI, lets get it\r\n VOI theVOI = vois.get(0);\r\n \r\n // find the center-of-mass of the contour\r\n VOIContour maxContour = ((VOIContour)theVOI.getCurves().get(0));\r\n int[] xVals = new int [maxContour.size()];\r\n int[] yVals = new int [maxContour.size()];\r\n int[] zVals = new int [maxContour.size()];\r\n maxContour.exportArrays(xVals, yVals, zVals);\r\n \r\n int xcm = 0, ycm = 0, zcm = 0;\r\n for (int idx = 0; idx < maxContour.size(); idx++) {\r\n xcm += xVals[idx];\r\n ycm += yVals[idx];\r\n zcm += zVals[idx];\r\n }\r\n \r\n xcm /= maxContour.size();\r\n ycm /= maxContour.size();\r\n zcm /= maxContour.size();\r\n \r\n ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm +\" Zcm: \" +zcm+\"\\n\", ViewJFrameMessage.DEBUG);\r\n \r\n // This point should be inside the abdomen\r\n // walk right until you find the external border of the abdomen\r\n \r\n // update the volumeBitSet to match the closed abdomenImage\r\n short[] srcSliceBuffer = new short[sliceSize];\r\n short[] profile = new short[xDim];\r\n try {\r\n abdomenImage.exportData(0, sliceSize, sliceBuffer);\r\n srcImage.exportData(0, sliceSize, srcSliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"Error exporting data\");\r\n return;\r\n }\r\n\r\n int x = xcm;\r\n int elementCount = 0;\r\n int yOffset = ycm * xDim;\r\n while (x < xDim && sliceBuffer[x + yOffset] == abdomenTissueLabel) {\r\n profile[elementCount] = srcSliceBuffer[x + yOffset];\r\n x++;\r\n elementCount++;\r\n } // end while(...)\r\n \r\n // profile has an intensity profile of the pixels along the ray from the \r\n // contour CM to the external skin boundary. \r\n \r\n \r\n }",
"private static boolean intersect(\n\t\tDateTime start1, DateTime end1,\n\t\tDateTime start2, DateTime end2)\n\t{\n\t\tif (DateTime.op_LessThanOrEqual(end2, start1) || DateTime.op_LessThanOrEqual(end1, start2))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public boolean overlapsBlock ( ) {\r\n\t\tif (current_block >= getBlockCount())\r\n\t\t\treturn true;\r\n\r\n\t\tif (circum_area == null)\r\n\t\t\treturn true;\r\n\r\n\t\tCoor start_coor = new Coor((double)ra_start[(int)current_block], -6.0);\r\n\t\tCoor end_coor = new Coor((double)ra_end[(int)current_block], 90.0);\r\n\t\tif (circum_area.overlapsArea(start_coor, end_coor))\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}",
"public static boolean intervalIntersect(float start1, float end1, float start2, float end2) {\n\t\treturn (start1 <= end2 && start2 <= end1);\n\t}",
"public void renderImage()\n {\n for (int i = 0; i < _imageWriter.getNx(); i++)\n {\n for (int j = 0; j < _imageWriter.getNy(); j++)\n {\n Ray ray;\n ray = new Ray(_scene.getCamera().constructRayThroughPixel(_imageWriter.getNx(), _imageWriter.getNy(),j,i,\n _scene.getScreenDistance(), _imageWriter.getWidth(),_imageWriter.getHeight()));\n\n if(i==255 && j==255)\n System.out.print(\"111\");\n Map<Geometry, List<Point3D>> intersectionPoints = new HashMap<>(getSceneRayIntersections(ray));\n\n if(intersectionPoints.isEmpty())\n _imageWriter.writePixel(j, i, _scene.getBackground());\n else\n {\n Map<Geometry, Point3D> closestPoint = getClosestPoint(intersectionPoints);\n Map.Entry<Geometry,Point3D> entry;\n Iterator<Entry<Geometry, Point3D>> it = closestPoint.entrySet().iterator();\n entry = it.next();\n _imageWriter.writePixel(j, i, calcColor(entry.getKey(), entry.getValue(), ray));\n }\n\n }\n }\n //printGrid(1);\n\n }",
"public static boolean isIntersecting(Coord p1, Coord q1, Coord p2, Coord q2) \n { \n // Find the four orientations needed for general and \n // special cases \n int o1 = orientation(p1, q1, p2); \n int o2 = orientation(p1, q1, q2); \n int o3 = orientation(p2, q2, p1); \n int o4 = orientation(p2, q2, q1); \n \n // General case \n if(o1 != o2 && o3 != o4) \n return true; \n \n // Special Cases \n // p1, q1 and p2 are colinear and p2 lies on segment p1q1 \n if (o1 == 0 && isOnSegment(p1, q1, p2)) return true; \n \n // p1, q1 and q2 are colinear and q2 lies on segment p1q1 \n if (o2 == 0 && isOnSegment(p1, q1, q2)) return true; \n \n // p2, q2 and p1 are colinear and p1 lies on segment p2q2 \n if (o3 == 0 && isOnSegment(p2, q2, p1)) return true; \n \n // p2, q2 and q1 are colinear and q1 lies on segment p2q2 \n if (o4 == 0 && isOnSegment(p2, q2, q1)) return true; \n \n return false; // Doesn't fall in any of the above cases \n }",
"public boolean isOverlapping(Filter f);",
"@Test\n public void endToEndTest() throws FitsException, IOException, ClassNotFoundException {\n\n ImageData imageData = new ImageData(frArray, IMAGE_TYPE,COLROID, rangeValues, 0,0, 100, 100, true );\n //Test the ImageData without mask\n BufferedImage calculatedImage = imageData.getImage(frArray);\n\n compareImage(expectedImage,calculatedImage);\n\n\n //Test the ImageData withmask\n ImageData imageDataWithMask = new ImageData(frArray, IMAGE_TYPE,imageMasks, rangeValues, 0,0, 100, 100, true );\n BufferedImage calculatedImageWithMask = imageDataWithMask.getImage(frArray);\n compareImage(expectedImageWithMask,calculatedImageWithMask);\n\n }",
"private boolean overlaps(Point2D p0, Point2D p1)\n {\n return Math.abs(p0.getX() - p1.getX()) < 0.001 && Math.abs(p0.getY() - p1.getY()) < 0.001;\n }",
"private boolean isOverlapping( int[] t0, int[] t1)\n {\n if ( t0.length == 1)\n {\n return t0[ 0] >= t1[ 0]; \n }\n else\n {\n return t0[ 1] >= t1[ 0]; \n }\n }",
"protected boolean checkPoiInside( CFWPoint poiBegI, CFWPoint poiEndI)\t{\r\n\t\t//[begin point in area 1] unintersect: 1,2,3,7,8\r\n\t\t//[begin point in area 2] unintersect: 1,2,3\r\n\t\t//[begin point in area 3] unintersect: 1,2,3,4,5\r\n\t\t//[begin point in area 4] unintersect: 3,4,5\r\n\t\t//[begin point in area 5] unintersect: 3,4,5,6,7\r\n\t\t//[begin point in area 6] unintersect: 5,6,7\r\n\t\t//[begin point in area 7] unintersect: 5,6,7,8,1\r\n\t\t//[begin point in area 8] unintersect: 7,8,1\r\n\t\t//[begin point in area 9] unintersect: 9\r\n\t\tif(isInsideArea( 1, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 2, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 8, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 2, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 2, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 3, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 2, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 4, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 4, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 4, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 5, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 4, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 6, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 6, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 6, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 7, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 6, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 8, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 8, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 8, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Test\n void findIntersections() {\n Cuboid cuboid1 = new Cuboid(4,4,4);\n Ray ray1 = new Ray(new Point3D(-3,0,0), new Vector3D(1,0,0));\n ArrayList<GeoPoint> actual1 = cuboid1.findIntersections(ray1);\n ArrayList<GeoPoint> expected1 = new ArrayList<>();\n expected1.add(new GeoPoint(cuboid1, new Point3D(2,0,0)));\n expected1.add(new GeoPoint(cuboid1, new Point3D(-2,0,0)));\n\n assertTrue(Util.intersectionsEqual(expected1, actual1));\n\n //Aligned with Y axis but have different dimensions\n Cuboid cuboid2 = new Cuboid(2,4,3);\n Ray ray2 = new Ray(new Point3D(0,100,0), new Vector3D(0,-1,0));\n ArrayList<GeoPoint> actual2 = cuboid2.findIntersections(ray2);\n ArrayList<GeoPoint> expected2 = new ArrayList<>();\n expected2.add(new GeoPoint(cuboid1, new Point3D(0,2,0)));\n assertEquals(expected2.get(0).point, actual2.get(0).point);\n\n Cuboid cuboid3 = new Cuboid(2,4,3, new Ray(new Point3D(1,1,1), new Vector3D(0,0,1)));\n Ray ray3 = new Ray(new Point3D(0,100,0), new Vector3D(0,-1,0));\n ArrayList<GeoPoint> actual3 = cuboid3.findIntersections(ray3);\n ArrayList<GeoPoint> expected3 = new ArrayList<>();\n expected3.add(new GeoPoint(cuboid1, new Point3D(0,3,0)));\n assertEquals(expected3.get(0).point, actual3.get(0).point);\n\n Ray ray = new Ray(new Point3D(0,0,-200), Vector3D.zAxis);\n ArrayList<GeoPoint> interesections = cuboid1.findIntersections(ray);\n }",
"public void intersectFromClipboard() { genericClipboard(SetOp.INTERSECT); }",
"@Override\n\tpublic boolean intersects(Rectangle2D arg0) {\n\t\treturn false;\n\t}",
"Multimap<String, String> intersects(Circle bounds);",
"private static boolean doBoundingBoxesIntersect(Rectangle a, Rectangle b) {\r\n\t return a.getMinX() <= b.getMaxX() \r\n\t && a.getMaxX() >= b.getMinX() \r\n\t && a.getMinY() <= b.getMaxY()\r\n\t && a.getMaxY() >= b.getMinY();\r\n\t}",
"private ArrayList<int[]> getOverlapping(ArrayList<int[]> list, int start, int end) {\n ArrayList<int[]> result=new ArrayList<int[]>();\n for (int[] seg:list) {\n if (!(start>seg[1] || end<seg[0])) result.add(seg);\n }\n return result;\n }",
"private static long addLchOverlap(Obs obs, long start, long end) {\n return LttsServicesClient.getInstance().getShutterOverlap(obs, new Interval(start, end));\n }",
"public void intersections(){\n\n \tif (ball.intersect(paddle.getX(), paddle.getY(), paddle.getWidth(), paddle.getHeight())){\n\t\t\tball.bouncePaddle(paddle.getX(),paddle.getY(),paddle.getWidth(),paddle.getHeight());\n\t\t}\n\n\t\t//WHEN POWERUP HITS PADDLE\n\n\t\tfor (int i = 0; i < powerups.size(); i++){\n\t\t\tif (paddle.intersect(powerups.get(i).getX(), powerups.get(i).getY(), powerups.get(i).getWidth(), powerups.get(i).getHeight())) {\n\t\t\t\tif (powerups.get(i).getType() != 4){\n\t\t\t\t\tpaddle.setType(powerups.get(i).getType());\n\t\t\t\t}else{\n\t\t\t\t\tball.setType(1);\n\t\t\t\t}\n\t\t\t\tpowerups.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t//WHEN LASER HITS BRICK\n\n\t\tfor (int i = 0; i < lasers.size() ; i++){\n\t\t\tfor (int j = 0; j < bricks.size(); j++){\n\n\t\t\t\tif (lasers.size() != 0 && lasers.get(i).intersect(bricks.get(j).getX(), bricks.get(j).getY(), bricks.get(j).getWidth(), bricks.get(j).getHeight())){\n\t\t\t\t\tbricks.get(j).hit(0);\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tif (i > 0){\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\n\t\t//BRICKS\n\t\tfor (int i = 0; i < bricks.size(); i++){\n\t\t\t//WHEN BALL HITS BRICK\n\t\t\tif (ball.intersect(bricks.get(i).getX(), bricks.get(i).getY(), bricks.get(i).getWidth(), bricks.get(i).getHeight())){\n\t\t\t\t\n\t\t\t\tball.bounceBrick(ball.hitOnSide(bricks.get(i).getX(), bricks.get(i).getY(), bricks.get(i).getWidth(), bricks.get(i).getHeight()));\n\t\t\t\tball.move();\n\n\n\t\t\t\tbricks.get(i).hit(ball.getType());\n\t\t\t\tif (ball.getType() == 1){\n\t\t\t\t\tfor (int j = 0; j < bricks.size(); j++){\n\t\t\t\t\t\tif (bricks.get(j).getX() > ball.getX()-50 && bricks.get(j).getX() < ball.getX()+50){\n\t\t\t\t\t\t\tif (bricks.get(j).getY() > ball.getY()-75 && bricks.get(j).getY() < ball.getY()+75){\n\t\t\t\t\t\t\t\tbricks.get(j).hit(1);\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\tball.setType(0);\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t//WHEN BRICK DIES\n\t\tfor (int i = bricks.size()-1; i>=0; i--){\n\t\t\tif (bricks.get(i).isDead()){\n\t\t\t\tif (bricks.get(i).spawnPowerup()){\n\t\t\t\t\tpowerups.add(new Powerup(bricks.get(i).getX(), bricks.get(i).getY(), paddle));\n\t\t\t\t}\n\t\t\t\tbricks.remove(i);\n\t\t\t}\n\t\t}\n\n }",
"public boolean intersects(Circle other)\n{\n if (Math.abs(center.x - other.center.x) <= (radius +other.radius) && \n Math.abs(center.y - other.center.y) <= (radius + other.radius))// true calculation needs both radius to\n return true;\n return false;\n}",
"public boolean intersect(Unit collidee) {\n if (collidee instanceof Qix) {\n Qix qix = (Qix) collidee;\n return qix.intersect(this);\n }\n Rectangle colliderR = this.toRectangle();\n // subtract one from width&height to make collisions look more real\n Rectangle collideeR = collidee.toRectangle();\n\n if (colliderR.intersects(collideeR)) {\n\n LOGGER.log(Level.WARNING, this.toString() + \" collided with \" + collidee.toString() + \" at (\" + this.getX()\n + \",\" + this.getY() + \")\", this.getClass());\n\n return true;\n }\n return false;\n }",
"private static boolean areOverlapping( int ix0, int ix1, int len )\n {\n if( ix0<ix1 ){\n return ix0+len>ix1;\n }\n else {\n return ix1+len>ix0;\n }\n }",
"@Test\n public void sample1(){\n int[][] a = new int[][] {\n new int [] {0,2},\n new int [] {5,10},\n new int [] {13,23},\n new int [] {24,25}\n };\n int [][] b = new int [][] {\n new int [] {1,5},\n new int [] {8,12},\n new int [] {15,24},\n new int [] {25,26}\n };\n int [][] expected = new int [][] {\n new int [] {1,2},\n new int [] {5,5},\n new int [] {8,10},\n new int [] {15,23},\n new int [] {24,24},\n new int [] {25,25},\n };\n int [][] output = underTest.intervalIntersection(a,b);\n assertArrayEquals(expected,output);\n }",
"static boolean doIntersect(Point p1, Point q1,\n Point p2, Point q2)\n {\n // Find the four orientations needed for\n // general and special cases\n int o1 = orientation(p1, q1, p2);\n int o2 = orientation(p1, q1, q2);\n int o3 = orientation(p2, q2, p1);\n int o4 = orientation(p2, q2, q1);\n\n // General case\n if (o1 != o2 && o3 != o4)\n {\n return true;\n }\n\n // Special Cases\n // p1, q1 and p2 are colinear and\n // p2 lies on segment p1q1\n if (o1 == 0 && onSegment(p1, p2, q1))\n {\n return true;\n }\n\n // p1, q1 and p2 are colinear and\n // q2 lies on segment p1q1\n if (o2 == 0 && onSegment(p1, q2, q1))\n {\n return true;\n }\n\n // p2, q2 and p1 are colinear and\n // p1 lies on segment p2q2\n if (o3 == 0 && onSegment(p2, p1, q2))\n {\n return true;\n }\n\n // p2, q2 and q1 are colinear and\n // q1 lies on segment p2q2\n if (o4 == 0 && onSegment(p2, q1, q2))\n {\n return true;\n }\n\n // Doesn't fall in any of the above cases\n return false;\n }",
"IPoint intersect(Figures figures)\n { float epsilon=IPoint.epsilon;\n Vec3D e1 = figures.getP2().minus(figures.getP1());\n Vec3D e2 = figures.getP3().minus(figures.getP1());\n Vec3D p = dir.cross(e2);\n float a = e1.dot(p);\n if ((a>-epsilon) && (a<epsilon)) return new IPoint(null,null,-1);\n float f = 1/a;\n Vec3D s = start.minus(figures.getP1());\n float u = f*s.dot(p);\n if ((u<0.0) || (u>1.0)) return new IPoint(null,null,-1);\n Vec3D q = s.cross(e1);\n float v = f*dir.dot(q);\n if ((v<0.0) || (u+v>1.0)) return new IPoint(null,null,-1);\n float dist=f*e2.dot(q);\n if (dist<epsilon) return new IPoint(null,null,-1);\n Vec3D ip=figures.getP1().mult(1-u-v).add(figures.getP2().mult(u)).add(figures.getP3().mult(v));\n return new IPoint(figures,ip,dist);\n }",
"private boolean isIntersected(Waypoint w1, Waypoint w2, Waypoint w3, Waypoint w4){\n\t\tint o1 = this.orientation(w1, w2, w3);\n\t\tint o2 = this.orientation(w1, w2, w4);\n\t\tint o3 = this.orientation(w3, w4, w1);\n\t\tint o4 = this.orientation(w3, w4, w2);\n\t\tboolean intersected = false;\n\t\t\n\t\tif (o1 != o2 && o3 != o4){\n\t\t\tintersected = true;\n\t\t}\n//\t\tCheck if the two segmenets are colinear and they intersect\n//\t\tif (o1 == 0 && this.pointOnSegment(w1, w2, w3)) {\n//\t\t\tintersected = true;\n//\t\t\treturn intersected;\n//\t\t}\n//\n//\t\t\n//\t\tif (o2 == 0 && this.pointOnSegment(w1, w2, w4)) {\n//\t\t\tintersected = true;\n//\t\t\treturn intersected;\t\t\t\n//\t\t}\n//\t\t\n//\t\tif (o3 == 0 && this.pointOnSegment(w3, w4, w1)) {\n//\t\t\tintersected = true;\n//\t\t\treturn intersected;\t\n//\t\t}\n//\t\t\n//\t\tif (o4 == 0 && this.pointOnSegment(w3, w4, w2)) {\n//\t\t\tintersected = true;\n//\t\t\treturn intersected;\n//\t}\n\t\treturn intersected;\n\t}",
"public abstract boolean hit(Rectangle2D r);",
"private boolean isCollision(Date currentStart, Date currentEnd,\n Date otherStart, Date otherEnd)\n {\n return currentStart.compareTo(otherEnd) <= 0\n && otherStart.compareTo(currentEnd) <= 0;\n }",
"public boolean linesIntersect() {\n\t\twhile (true) {\n\t\t\t// for loop for the asteroid's lines\n\t\t\tfor (int i = 0; i < NUM_LINES; i++) {\n\t\t\t\t// for loop for the ship's lines\n\t\t\t\tfor (int j = 0; j < ship.shipOutLine().length; j++) {\n\t\t\t\t\tint o1 = orientation(outLine[i].getStart(),\n\t\t\t\t\t\t\toutLine[i].getEnd(),\n\t\t\t\t\t\t\tship.shipOutLine()[j].getStart());\n\t\t\t\t\tint o2 = orientation(outLine[i].getStart(),\n\t\t\t\t\t\t\toutLine[i].getEnd(), ship.shipOutLine()[j].getEnd());\n\t\t\t\t\tint o3 = orientation(ship.shipOutLine()[j].getStart(),\n\t\t\t\t\t\t\tship.shipOutLine()[j].getEnd(),\n\t\t\t\t\t\t\toutLine[i].getStart());\n\t\t\t\t\tint o4 = orientation(ship.shipOutLine()[j].getStart(),\n\t\t\t\t\t\t\tship.shipOutLine()[j].getEnd(), outLine[i].getEnd());\n\n\t\t\t\t\tif (o1 != o2 && o3 != o4) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t}",
"private boolean colisionEstorbos(){\r\n\t\tif(game.estorbo1.getBounds().intersects(getBounds())){\r\n\t\t\tasignarVelocidad(game.estorbo1, rebotes1);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(game.estorbo2.getBounds().intersects(getBounds())){\r\n\t\t\tasignarVelocidad(game.estorbo2, rebotes2);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(game.estorbo3.getBounds().intersects(getBounds())){\r\n\t\t\tasignarVelocidad(game.estorbo3, rebotes3);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private void cleanIntersectionsFromCommonEndPoints (Coordinate[] endPointsA, Coordinate[] endPointsB, List<Coordinate> intersectionPoints) {\r\n\t\tif (intersectionPoints != null && intersectionPoints.size()>0) {\r\n\t\t\tfor (int i = 0; i<endPointsA.length; i++) {\r\n\t\t\t\tif (endPointsA[i].equals2D(endPointsB[i])) {\r\n\t\t\t\t\tif (intersectionPoints.contains(endPointsA[i])) {\r\n\t\t\t\t\t\tintersectionPoints.remove(intersectionPoints.indexOf(endPointsA[i]));\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}",
"static boolean SegmentsIntersect(PT a, PT b, PT c, PT d) {\r\n\t\tif (LinesCollinear(a, b, c, d)) {\r\n\t\t\tif (dist2(a, c) < EPS || dist2(a, d) < EPS || dist2(b, c) < EPS || dist2(b, d) < EPS)\r\n\t\t\t\treturn true;\r\n\t\t\tif (dot(c.subtract(a), c.subtract(b)) > 0 && dot(d.subtract(a), d.subtract(b)) > 0\r\n\t\t\t\t\t&& dot(c.subtract(b), d.subtract(b)) > 0)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (cross(d.subtract(a), b.subtract(a)) * cross(c.subtract(a), b.subtract(a)) > 0)\r\n\t\t\treturn false;\r\n\t\tif (cross(a.subtract(c), d.subtract(c)) * cross(b.subtract(c), d.subtract(c)) > 0)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"public boolean doesLineCut(Line line) {\n if (containsExclusive(line.getPoint1())) {\n return true;\n }\n if (containsExclusive(line.getPoint2())) {\n return true;\n }\n\n double x1 = Math.min(line.getPoint1().getX(), line.getPoint2().getX());\n double x2 = Math.max(line.getPoint1().getX(), line.getPoint2().getX());\n double y1 = Math.min(line.getPoint1().getY(), line.getPoint2().getY());\n double y2 = Math.max(line.getPoint1().getY(), line.getPoint2().getY());\n\n // y = mx + c\n // x = (y-c)/m\n double m = (line.getPoint2().getY() - line.getPoint1().getY()) / (line.getPoint2().getX() - line.getPoint1().getX());\n double c = line.getPoint1().getY() - (m * line.getPoint1().getX());\n\n double xNorth = Double.NaN;\n double xSouth = Double.NaN;\n double yWest = Double.NaN;\n double yEast = Double.NaN;\n if (Double.isInfinite(m)) {\n // Vertical line\n xNorth = x1;\n xSouth = x1;\n } else if (m == 0.0) {\n yWest = c;\n yEast = c;\n } else {\n xNorth = ((double) start.getY() - c) / m;\n xSouth = ((double) end.getY() - 1 - c) / m;\n yWest = m * (double) start.getX() + c;\n yEast = m * (double) end.getX() - 1 + c;\n }\n\n\n // Since both points are outside the rectangle, one crossed edged is enough.\n\n // Check north\n if (!Double.isNaN(xNorth) && start.getX() <= xNorth && xNorth < end.getX() && x1 <= xNorth && xNorth <= x2 && y2 > start.getY() && y1 < end.getY()) {\n return true;\n }\n // Check east\n if (!Double.isNaN(yWest) && start.getY() <= yWest && yWest < end.getY() && y1 <= yWest && yWest <= y2 && x2 > start.getX() && x1 < end.getX()) {\n return true;\n }\n // Check south\n if (!Double.isNaN(xSouth) && start.getX() <= xSouth && xSouth < end.getX() && x1 <= xSouth && xSouth <= x2 && y2 > start.getY() && y1 < end.getY()) {\n return true;\n }\n // Check west\n return !Double.isNaN(yEast) && start.getY() <= yEast && yEast < end.getY() && y2 <= yEast && yEast <= y2 && x2 > start.getX() && x1 < end.getX();\n }",
"private boolean collision2() {\n return game.racket2.getBounds2().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }",
"public boolean hitCharacter(myCharacter characterImage){\n\t\t\t\tArea ba = new Area(characterImage.getShape());\n\t\t\t\tArea pa = new Area(getRect());\n\n\t\t\t\t//if(character2.getShape().intersects(getRect()))return(true);\n\t\t\t\tpa.intersect(ba);\n\t\treturn !pa.isEmpty();\n\n\n/*\t\ttouching = false;\n\t\tcharacter = characterImage;\n\t\tcharacterX = character.getOrigin().getX();\n\t\tcharacterY = character.getOrigin().getY();\n\t\tcharacterWidth = character.getDimension().getWidth();\n\t\tcharacterHeight = character.getDimension().getHeight();\n\n\t\tif(hits(character.getOrigin(), character.getDimension())==true){\n\n\t\t\tfor(int i = 0; i<character.getCollisionBoxes().size(); i++){\n\t\t\t\tint x = ((int)(character.getCollisionBoxes().get(i).getX()));\n\t\t\t\tint y = ((int)(character.getCollisionBoxes().get(i).getY()));\n\t\t\t\tint width = (int)(character.getCollisionBoxes().get(i).getWidth());\n\t\t\t\tint height =(int)(character.getCollisionBoxes().get(i).getHeight());\n\t\t\t\tPoint p = new Point(x,y);\n\t\t\t\tDimension d = new Dimension(width,height);\n\t\t\t\tif(hits(p,d)&&!character.isGhost()){\n\t\t\t\t\ttouching=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn(touching);*/\n\t}",
"private void computeDirect() {\n\t\t\tif (startY > 0) {\n\t\t\t\toffset = (startY - 1) * width;\n\t\t\t} else {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tendY = endY == height ? endY - 1 : endY;\n\n\t\t\tfor (int y = startY; y <= endY; y++) {\n\t\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\t\tfinal Point3D moveX = xAxis.scalarMultiply(x * horizontal / (width - 1));\n\t\t\t\t\tfinal Point3D moveY = yAxis.scalarMultiply(y * vertical / (height - 1));\n\t\t\t\t\tfinal Point3D screenPoint = screenCorner.add(moveX).sub(moveY);\n\n\t\t\t\t\tfinal Ray ray = Ray.fromPoints(eye, screenPoint);\n\n\t\t\t\t\tRayCasterUtil.tracer(scene, ray, rgb);\n\t\t\t\t\tred[offset] = rgb[0] > 255 ? 255 : rgb[0];\n\t\t\t\t\tgreen[offset] = rgb[1] > 255 ? 255 : rgb[1];\n\t\t\t\t\tblue[offset] = rgb[2] > 255 ? 255 : rgb[2];\n\n\t\t\t\t\toffset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public static void obtenerInfoColisionJugador(Jugador jugador, Objeto col,String[] direccion, ArrayList<Objeto> obj_colision) {\n Rectangle[] lados_ente = jugador.objeto_ente.getRectangle();\n Rectangle[] lados_col = col.getRectangle();\n\n \n if (col.getTag().compareToIgnoreCase(Objeto.Tag.COMIDA) == 0 || col.getTag().compareToIgnoreCase(Objeto.Tag.MONEDA) == 0) {\n //System.out.println(\"COMIDA\");\n for(int i=0;i<4;i++)\n if (lados_ente[i].intersects(lados_col[0])) {\n obj_colision.add(col);\n return;\n }\n }\n\n \n \n if (col.getTag().compareToIgnoreCase(Objeto.Tag.ENEMIGO) == 0) {\n\n //System.out.println(lados_ente[0].x + \" con \" + lados_col[0].x + \" tag: \" + col.getId());\n if (lados_ente[0].intersects(lados_col[2])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"enemigo_arriba\";\n }\n //else\n // System.out.println(lados_ente[0].y + \" con \" + lados_col[2].y + \" tag: \" + col.getId());\n if (lados_ente[1].intersects(lados_col[3])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"enemigo_derecha\";\n\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"enemigo_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[1])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"enemigo_izquierda\";\n }\n\n }\n \n if (col.getTag().compareToIgnoreCase(Objeto.Tag.NPC) == 0) {\n\n //System.out.println(lados_ente[0].x + \" con \" + lados_col[0].x + \" tag: \" + col.getId());\n if (lados_ente[0].intersects(lados_col[0])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"npc_arriba\";\n }\n //else\n // System.out.println(lados_ente[0].y + \" con \" + lados_col[2].y + \" tag: \" + col.getId());\n if (lados_ente[1].intersects(lados_col[0])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"npc_derecha\";\n\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"npc_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[0])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"npc_izquierda\";\n }\n\n }\n\n if (lados_ente[0].intersects(lados_col[0])) {\n //\"arriba\";\n obj_colision.add(col);\n direccion[0] = \"entorno_arriba\";\n }\n if (lados_ente[1].intersects(lados_col[0])) {\n //\"derecha\";\n obj_colision.add(col);\n direccion[1] = \"entorno_derecha\";\n }\n if (lados_ente[2].intersects(lados_col[0])) {\n //\"abajo\";\n obj_colision.add(col);\n direccion[2] = \"entorno_abajo\";\n }\n if (lados_ente[3].intersects(lados_col[0])) {\n //\"izquierda\";\n obj_colision.add(col);\n direccion[3] = \"entorno_izquierda\";\n }\n }",
"public static int area_intersection(int blx1, int bly1, int trx1,int try1, int blx2, int bly2,int trx2,int try2){\r\n\t\tint base = 0, height = 0, area = 0;\r\n\t\r\n\t\tif (blx2>=blx1 && blx2<=trx1){\r\n\t\t\tif (bly2>=bly1 && bly2<=try1){\r\n\tif (trx2<=trx1 && trx2>=blx1){\r\n\tbase = trx2 - blx2;\r\n\theight = try2 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\telse{\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if( bly1>=bly2 && bly1<=try2){\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (bly2>=bly1 && bly2<=try1){\r\n\tif( blx1>=blx2 && blx1<=trx2){\r\n\tbase = trx1 - blx1;\r\n\theight = try2 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (blx1>=blx2 && blx1<=trx2){\r\n\t if( bly1>=bly2 && bly1<=try2){\r\n\tbase = trx1 - blx1;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t }\r\n\tif( trx2>=blx1 && trx2<=trx1){\r\n\tbase = trx2 - blx1;\r\n\theight = try2 - bly1;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (bly2>=bly1 && bly2<=try1){\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t\t}\r\n\t//end\r\n\r\n\t\t//else if(trx1 - blx2)==0 || (try1 - bly1)==0 || !(trx1>blx2 and trx2>trx1 && bly2<=bly1){\r\n\t//area = 0\r\n\t\t//}\r\n\t//end\r\n\t \r\n\t//if( area && area<=2147483647 )\r\n\t//area\r\n\t//else\r\n\t//-1\r\n\t//end\r\n\r\n\t\treturn area;\r\n\t}",
"boolean intersect(Segment other) {\n\t\tint o1 = orientation(other.from);\n\t\tint o2 = orientation(other.to);\n\t\tint o3 = other.orientation(from);\n\t\tint o4 = other.orientation(to);\n\t\treturn (o1 != o2 && o3 != o4) // <- General case, special case below\n\t\t\t\t|| (o1 == 0 && inBoundingBox(other.from)) || (o2 == 0 && inBoundingBox(other.to))\n\t\t\t\t|| (o3 == 0 && other.inBoundingBox(from)) || (o4 == 0 && other.inBoundingBox(to));\n\t}",
"private ArrayList<Point> extractCC(Point r, Image img)\r\n/* 55: */ {\r\n/* 56: 58 */ this.s.clear();\r\n/* 57: 59 */ this.s.add(r);\r\n/* 58: 60 */ this.temp.setXYBoolean(r.x, r.y, true);\r\n/* 59: 61 */ this.list2.add(r);\r\n/* 60: */ \r\n/* 61: 63 */ Point[] N = { new Point(1, 0), new Point(0, 1), new Point(-1, 0), new Point(0, -1), \r\n/* 62: 64 */ new Point(1, 1), new Point(-1, -1), new Point(-1, 1), new Point(1, -1) };\r\n/* 63: */ \r\n/* 64: 66 */ ArrayList<Point> pixels = new ArrayList();\r\n/* 65: */ int x;\r\n/* 66: */ int i;\r\n/* 67: 68 */ for (; !this.s.isEmpty(); i < N.length)\r\n/* 68: */ {\r\n/* 69: 70 */ Point tmp = (Point)this.s.pop();\r\n/* 70: */ \r\n/* 71: 72 */ x = tmp.x;\r\n/* 72: 73 */ int y = tmp.y;\r\n/* 73: 74 */ pixels.add(tmp);\r\n/* 74: */ \r\n/* 75: 76 */ this.temp2.setXYBoolean(x, y, true);\r\n/* 76: */ \r\n/* 77: 78 */ i = 0; continue;\r\n/* 78: 79 */ int _x = x + N[i].x;\r\n/* 79: 80 */ int _y = y + N[i].y;\r\n/* 80: 82 */ if ((_x >= 0) && (_x < this.xdim) && (_y >= 0) && (_y < this.ydim)) {\r\n/* 81: 84 */ if (!this.temp.getXYBoolean(_x, _y))\r\n/* 82: */ {\r\n/* 83: 86 */ boolean q = img.getXYBoolean(_x, _y);\r\n/* 84: 88 */ if (q)\r\n/* 85: */ {\r\n/* 86: 90 */ Point t = new Point(_x, _y);\r\n/* 87: 91 */ this.s.add(t);\r\n/* 88: */ \r\n/* 89: 93 */ this.temp.setXYBoolean(t.x, t.y, true);\r\n/* 90: 94 */ this.list2.add(t);\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94: 78 */ i++;\r\n/* 95: */ }\r\n/* 96: 99 */ for (Point t : this.list2) {\r\n/* 97:100 */ this.temp.setXYBoolean(t.x, t.y, false);\r\n/* 98: */ }\r\n/* 99:101 */ this.list2.clear();\r\n/* 100: */ \r\n/* 101:103 */ return pixels;\r\n/* 102: */ }",
"private boolean hasOverlap(int[] i1, int[] i2)\n {\n // Special case of consecutive STEP-BY-STEP intervals\n if(i1[0] <= i2[0] && i2[0] <= i1[1])\n return true;\n if(i2[0] <= i1[0] && i1[0] <= i2[1])\n return true;\n return false;\n }",
"boolean outOfSight();",
"public ArrayList<Point> getLeftZone(BufferedImage image_dest, Point divider) {\n int count = 0;\n int x_sum = 0;\n int y_sum = 0;\n\n int w = image_dest.getWidth();\n int h = image_dest.getHeight();\n int xLeftCentroid = 0;\n int yLeftCentroid = 0;\n\n Point point1 = null; //right \t-A\n Point point2 = null; //left\t\t-B\n Point point3 = null; //centroid\t-C\n\n ArrayList<Point> points = new ArrayList<Point>();\n\n //\tint y_divider = divider.y;\n\n for (int y = 0; y < h; y++) {\n for (int x = 0; x <= divider.x; x++) {\n if (image_dest.getRGB(x, y) != -1) {\n\n x_sum += x;\n y_sum += y;\n count++;\n\n //\tSystem.out.print(\"0\");\n } else {\n\n //\t\tSystem.out.print(\"1\");\n }\n\n }\n //\tSystem.out.println(\"\");\n }\n //\tSystem.out.println(\"\\n\\n\");\n\n if (count == 0) {\n //JOptionPane.showMessageDialog(null, \"No black pixels exist\");\n point1 = new Point(0, 0);\n point2 = new Point(0, 0);\n point3 = new Point(0, 0);\n } else {\n double d_yLeftCentroid = Double.valueOf(df.format(new Double(y_sum).doubleValue() / new Double(count).doubleValue()));\n double d_xLeftCentroid = Double.valueOf(df.format(new Double(x_sum).doubleValue() / new Double(count).doubleValue()));\n yLeftCentroid = (int) Math.round(new Double(d_yLeftCentroid));\n xLeftCentroid = (int) Math.round(new Double(d_xLeftCentroid));\n\n\n point3 = new Point(xLeftCentroid, yLeftCentroid);\n\n Point begin = new Point(0, 0);\n Point end = new Point(divider.x, h);\n\n\n point2 = getLeft(image_dest, point3, begin, end);\n //System.out.println(\"Point 2 :\"+point2);\n\n begin.x = xLeftCentroid;//�\n begin.y = 0;\n\n end.x = divider.x;\n end.y = h;\n\n point1 = getRight(image_dest, point3, begin, end);\n\n }\n points.add(point1);\n points.add(point2);\n points.add(point3);\n return points;\n }",
"private boolean intersectsAggregate( Aggregate mprim ) throws Exception {\n boolean inter = false;\n\n int cnt = mprim.getSize();\n\n for ( int i = 0; i < cnt; i++ ) {\n if ( intersects( mprim.getObjectAt( i ) ) ) {\n inter = true;\n break;\n }\n }\n\n return inter;\n }",
"public abstract boolean overlap(Catcher catcher, FallingObject object);",
"public ArrayList<Point> getRightZone(BufferedImage image_dest, Point divider) {\n int count = 0;\n int x_sum = 0;\n int y_sum = 0;\n\n int w = image_dest.getWidth();\n int h = image_dest.getHeight();\n int xRightCentroid = 0;\n int yRightCentroid = 0;\n\n Point point1 = null; //right \t-A\n Point point2 = null; //left\t\t-B\n Point point3 = null; //centroid\t-C\n\n ArrayList<Point> points = new ArrayList<Point>();\n\n //\tint y_divider = divider.y;\n\n for (int y = 0; y < h; y++) {\n for (int x = divider.x; x < w; x++) {\n if (image_dest.getRGB(x, y) != -1) {\n\n x_sum += x;\n y_sum += y;\n count++;\n\n //\t\t\t\tSystem.out.print(\"0\");\n } else {\n //\n//\t\t\t\t\tSystem.out.print(\"1\");\n }\n\n }\n //\t\tSystem.out.println(\"\");\n }\n//\t\tSystem.out.println(\"\\n\\n\");\n\n if (count == 0) {\n //JOptionPane.showMessageDialog(null, \"No black pixels exist\");\n point1 = new Point(0, 0);\n point2 = new Point(0, 0);\n point3 = new Point(0, 0);\n } else {\n\n double d_yRightCentroid = Double.valueOf(df.format(new Double(y_sum).doubleValue() / new Double(count).doubleValue()));\n double d_xRightCentroid = Double.valueOf(df.format(new Double(x_sum).doubleValue() / new Double(count).doubleValue()));\n yRightCentroid = (int) Math.round(new Double(d_yRightCentroid));\n xRightCentroid = (int) Math.round(new Double(d_xRightCentroid));\n\n //xRightCentroid = (int)Math.round(new Double(x_sum)/new Double(count));\n //yRightCentroid = (int)Math.round(new Double(y_sum)/new Double(count));\n\n point3 = new Point(xRightCentroid, yRightCentroid);\n\n Point begin = new Point(divider.x, 0);\n Point end = new Point(xRightCentroid, h);\n\n\n point2 = getLeft(image_dest, point3, begin, end);\n //System.out.println(\"Point 2 :\"+point2);\n\n begin.x = xRightCentroid;//�\n begin.y = 0;\n\n end.x = w;\n end.y = h;\n\n point1 = getRight(image_dest, point3, begin, end);\n\n }\n points.add(point1);\n points.add(point2);\n points.add(point3);\n\n status = \"reset\";\n return points;\n }",
"@SuppressWarnings(\"unused\")\r\n private void JCATsegmentSubcutaneousFat2D() {\r\n \r\n // a buffer to store a slice from the source Image\r\n short[] srcBuffer;\r\n try {\r\n srcBuffer = new short [sliceSize];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"JCATsegmentVisceralFat2D(): Can NOT allocate srcBuffer\");\r\n return;\r\n }\r\n \r\n // get the data from the segmented abdomenImage and the srcImage\r\n try {\r\n abdomenImage.exportData(0, sliceSize, sliceBuffer);\r\n srcImage.exportData(0, sliceSize, srcBuffer);\r\n } catch (IOException ex) {\r\n// System.err.println(\"JCATsegmentVisceralFat2D(): Error exporting data\");\r\n MipavUtil.displayError(\"JCATsegmentVisceralFat2D(): Error exporting data\");\r\n return;\r\n }\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n\r\n // Use the CM, the abdomenImage, and the srcImage to define points on the\r\n // abdomen and visceral VOI's\r\n ArrayList<Integer> xArrAbdom = new ArrayList<Integer>();\r\n ArrayList<Integer> yArrAbdom = new ArrayList<Integer>();\r\n ArrayList<Integer> xArrVis = new ArrayList<Integer>();\r\n ArrayList<Integer> yArrVis = new ArrayList<Integer>();\r\n findVOIs(centerOfMass, xArrAbdom, yArrAbdom, srcBuffer, xArrVis, yArrVis);\r\n \r\n int[] x1 = new int[xArrAbdom.size()];\r\n int[] y1 = new int[xArrAbdom.size()];\r\n int[] z1 = new int[xArrAbdom.size()];\r\n for(int idx = 0; idx < xArrAbdom.size(); idx++) {\r\n x1[idx] = xArrAbdom.get(idx);\r\n y1[idx] = yArrAbdom.get(idx);\r\n z1[idx] = 0;\r\n }\r\n\r\n // make the VOI's and add the points to them\r\n abdomenVOI = new VOI((short)0, \"Abdomen\");\r\n abdomenVOI.importCurve(x1, y1, z1);\r\n \r\n\r\n for(int idx = 0; idx < xArrVis.size(); idx++) {\r\n x1[idx] = xArrVis.get(idx);\r\n y1[idx] = yArrVis.get(idx);\r\n }\r\n\r\n subcutaneousVOI = new VOI((short)0, \"Subcutaneous area\");\r\n subcutaneousVOI.importCurve(x1, y1, z1);\r\n \r\n/*\r\n ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm);\r\n sliceBuffer[ycm * xDim + xcm] = 20;\r\n for (int idx = 0; idx < xArr.size(); idx++) {\r\n sliceBuffer[yArr.get(idx) * xDim + xArr.get(idx)] = 20;\r\n sliceBuffer[yArrVis.get(idx) * xDim + xArrVis.get(idx)] = 30;\r\n }\r\n // save the sliceBuffer into the abdomenImage\r\n try {\r\n abdomenImage.importData(0, sliceBuffer, false);\r\n } catch (IOException ex) {\r\n System.err.println(\"segmentThighTissue(): Error importing data\");\r\n }\r\n*/\r\n// ShowImage(srcImage, \"Segmented Abdomen\");\r\n\r\n\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"Abdomen VOI points:\");\r\n// for (int idx = 0; idx < xArr.size(); idx++) {\r\n// ViewUserInterface.getReference().getMessageFrame().append(xArr.get(idx) +\" \" + yArr.get(idx));\r\n// }\r\n\r\n }",
"private boolean overlappingEvents(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"public Coordinates intersection() {\n return intersection;\n }",
"public void paintComponent(Graphics g) \r\n {\r\n super.paintComponent(g);\r\n Graphics2D g2d = (Graphics2D) g;\r\n //inital light is red\r\n String intLight = \"Red\";\r\n \r\n \r\n //loops through the 2d array of the intersection and draws a sqare for each value that is colored dependnig \r\n //on the value inisde the array\r\n for(int i = 0; i < 10; i++)\r\n {\r\n for(int j = 0; j < 10; j++)\r\n {\r\n if ( board[i][j].equals(\"l\")) //land aka not where i can can drive\r\n {\r\n g.setColor(Color.gray);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if ( board[j][i].equals(\"vr\")) // vertical right lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 1, 50);\r\n }\r\n else if ( board[j][i].equals(\"vl\")) //vertical left lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if ( board[j][i].equals(\"hb\")) //horizontal bottom lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 50, 1);\r\n }\r\n \r\n else if ( board[j][i].equals(\"ht\")) //horizontal top lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if ( board[j][i].equals(\"i\")) //intersection\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 50);\r\n }\r\n else if (board[j][i].equals(\"vri\")) //the space before the intersection for the vertical right lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50+5, 50, 45);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 1, 50);\r\n //light\r\n if(light.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect(i*50, j*50, 50, 5);\r\n }\r\n else if (board[j][i].equals(\"vli\")) //the space before the intersection for the vertical left lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 50, 45);\r\n //light\r\n if(light.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect(i*50, (j+1)*50-5, 50, 5);\r\n }\r\n else if (board[j][i].equals(\"hbi\")) //the space before the intersection for the horizontal bottom lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50, j*50, 45, 50);\r\n g.setColor(Color.yellow);\r\n g.fillRect(i*50, j*50, 50, 1);\r\n //light2\r\n if(light2.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light2.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light2.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect((i+1)*50-5, j*50, 5, 50);\r\n }\r\n else if (board[j][i].equals(\"hti\")) //the space before the intersection for the horizontal top lane\r\n {\r\n g.setColor(Color.black);\r\n g.fillRect(i*50+5, j*50, 45, 50);\r\n //light2\r\n if(light2.getStatus().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if(light2.getStatus().equals(\"Yellow\"))\r\n g.setColor(Color.yellow);\r\n else if(light2.getStatus().equals(\"Green\"))\r\n g.setColor(Color.green);\r\n g.fillRect(i*50, j*50, 5, 50);\r\n }\r\n }\r\n } \r\n //screates a linked list that is ach lane, every node inside the list will either have a car or be empty\r\n Map scan;\r\n scan = saveHB;\r\n while(scan != null)\r\n {\r\n //each ehicle tpye is a different color so its easy to see which vehicle is which\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n //if there is a vehicle in this space draw the vehicle\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n scan = saveHT;\r\n while(scan != null)\r\n {\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n \r\n scan = saveVR;\r\n while(scan != null)\r\n {\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n scan = saveVL;\r\n while(scan != null)\r\n {\r\n if(scan.getVehicle() != null)\r\n {\r\n if (scan.getVehicle().getColor().equals(\"Blue\"))\r\n g.setColor(Color.blue);\r\n else if (scan.getVehicle().getColor().equals(\"Red\"))\r\n g.setColor(Color.red);\r\n else if (scan.getVehicle().getColor().equals(\"Gray\"))\r\n g.setColor(Color.gray);\r\n }\r\n if(scan.getVehicle() != null)\r\n {\r\n g.fillRect(scan.getXCoord()*50,scan.getYCoord()*50+5, scan.getVehicle().xVal(), scan.getVehicle().yVal());\r\n //System.out.println(\"At: \" + scan.getXCoord() + \" \" + scan.getYCoord()+ \" \" + scan.getVehicle().xVal() + \" \" + scan.getVehicle().yVal() + \" \" + scan.getVehicle().vehicleType);\r\n }\r\n scan = scan.Next();\r\n }\r\n }",
"public boolean reachable(Vertex start, Vertex end){\n\t\tSet<Vertex> reach = this.post(start); \n\t\treturn reach.contains(end);\n\t}",
"public void contrast(BufferedImage img, int startX, int startY, int endX, int endY) throws IOException{\r\n int pixels[] = new int[3];\r\n double ww[]=new double[3];\r\n WritableRaster raster = img.getRaster();\r\n double c = 1.1;\r\n \r\n for(int i=startX;i<endX;i++) {\r\n \r\n for(int j=startY;j<endY;j++){\r\n \r\n raster.getPixel(i, j, pixels);\r\n \r\n ww[0]=pixels[0];\r\n ww[1]=pixels[1];\r\n ww[2]=pixels[2];\r\n \r\n ww[0]=ww[0]-128;\r\n ww[1]=ww[1]-128;\r\n ww[2]=ww[2]-128;\r\n \r\n ww[0]=ww[0]*c;\r\n ww[1]=ww[1]*c;\r\n ww[2]=ww[2]*c;\r\n \r\n \r\n \r\n \r\n raster.setPixel(i, j, ww);\r\n \r\n }\r\n \r\n }\r\n\r\n }",
"private void circleCollison() {\n\t\t\n\t}",
"static int findOverlappingArea(int a[][], int b[][]){\n int startX,startY,endX,endY;\n if(a[0][0]>b[0][0]){\n startX = a[0][0];\n }else{\n startX = b[0][0];\n }\n \n if(a[0][1] > b[0][1]){\n startY = a[0][1];\n }else{\n startY = b[0][1];\n }\n \n /*Find minimum X and Y values from the top coordinates */\n \n if(a[1][0] < b[1][0]){\n endX = a[1][0];\n }else{\n endX = b[1][0];\n }\n \n if(a[1][1] < b[1][1]){\n endY = a[1][1];\n }else{\n endY = b[1][1];\n }\n \n return (endX-startX)*(endY-startY);\n }",
"public boolean overlap(Circle other) {\r\n\t\t// implementation not shown\r\n\t}",
"public boolean colision(Nave nave) {\r\n\t\t\r\n\t\tint[] arrayY = cargarPuntoColisionY();\r\n\t\tint[] arrayX = cargarPuntoColisionX();\r\n\t\tboolean A,B,C,D,E,F,G,H;\r\n\t\tboolean fColision = false;\r\n\t\tint i = 0;\r\n\t\t\r\n\t\twhile(i + 1 < arrayY.length && !fColision){\r\n\t\t\r\n\t\t\tA = x + arrayX[i] >= nave.getX();\r\n\t\t\tB = x + arrayX[i] <= (nave.getX() + nave.getWidth());\r\n\t\t\tC = y + arrayY[i] >= nave.getY();\r\n\t\t\tD = y + arrayY[i] <= (nave.getY() + nave.getHeight());\r\n\t\t\tE = (x + arrayX[i+1]) >= nave.getX();\r\n\t\t\tF = (x + arrayX[i+1]) <= (nave.getX() + nave.getWidth());\r\n\t\t\tG = (y + arrayY[i+1]) >= nave.getY();\r\n\t\t\tH = (y + arrayY[i+1]) <= (nave.getY() + nave.getHeight());\r\n\t\t\r\n\t\t\t// funcion de colicion que verifica si uno o mas puntos del borde del objeto nave intersectan con el borde del objeto que ejecuta la funcion\r\n\t\t\tfColision = fColision || (A && B || E && F) && (C && D || G && H) || !A && !F && ( !H && D || G && H) || !C && !H && (B && !F || !A && E);\r\n\t\t\ti = i+2;\r\n\t\t}\r\n\t\t\r\n\t\treturn getVisible() && nave.getVisible() && fColision;\r\n\t\t\t\r\n\t\t\t\t\r\n\t}",
"public void getIntersection(int[] A, int[] B, ArrayList<int[]> intersections) \n {\n if (A[0] >= B[0] && A[0] <= B[1]) \n {\n if (A[1] >= B[0] && A[1] <= B[1]) \n {\n // Take the entirety of A\n intersections.add(A);\n } \n else \n {\n // Take the start of A to end of B\n int[] intersection = new int[]{A[0], B[1]};\n intersections.add(intersection);\n }\n } \n else \n {\n if (A[1] >= B[0] && A[1] <= B[1]) \n {\n // Take start of B to end of A\n int[] intersection = new int[]{B[0], A[1]};\n intersections.add(intersection);\n } \n else \n {\n if (A[0] < B[0] && A[1] > B[1]) \n {\n // Take the entirety of B\n intersections.add(B);\n } \n else \n {\n // No intersection at all\n return;\n }\n }\n }\n }",
"public boolean isLineCrossing(Simple2DPoint start, Simple2DPoint end) {\n\n\t\tLog.info(\"Does line:\"+start+\">\"+end+\" cross or is within box \"+this.toString());\n\n\t\t//TODO: we need to write a method that returns true or false depending if the line crosses this box\n\n\t\t//first check if either end of the line is inside\n\t\t//(in most cases this will be good enough)\n\t\tif (isPointInside(topleft.x, topleft.y)){\n\t\t\tLog.info(\"___________________contained within\");\n\t\t\treturn true;\n\t\t}\n\t\tif (isPointInside(end.x, end.y)){\n\t\t\tLog.info(\"___________________contained within\");\n\t\t\treturn true;\n\t\t}\n\n\t\t//Now we check if the line cross's the box, but doesnt end in it.\n\t\t//For collision detection this should be a lot less likely then the above, as it means a character has somehow ended up on either\n\t\t//side of a objects collision map at the same time.\n\n\t\t//We check for crossing lines by checking each side of this box as its own line against the supplied line.\n\t\t//Effectively making 4 separate \"is line crossing line\" tests\n\n\t\t//first we get the 4 corners of the box from the two we know already\n\t\tSimple2DPoint topLeft = topleft;\n\t\tSimple2DPoint topRight = new Simple2DPoint(bottomright.x,topleft.y);\n\t\tSimple2DPoint bottomLeft = new Simple2DPoint(topleft.x,bottomright.y);\n\t\tSimple2DPoint bottomRight = bottomright;\n\n\t\t//then we test each side against the supplied line\n\t\tSimple2DPoint intersectPoint = Polygon.lineIntersect2d(start, end, topLeft, topRight);\n\t\tif (intersectPoint!=null){\n\t\t\treturn true;\n\t\t}\n\n\t\tintersectPoint =Polygon.lineIntersect2d(start, end, topRight, bottomRight);\n\t\tif (intersectPoint!=null){\n\t\t\treturn true;\n\t\t}\n\n\t\tintersectPoint = Polygon.lineIntersect2d(start, end, bottomRight, bottomLeft);\n\t\tif (intersectPoint!=null){\n\t\t\treturn true;\n\t\t}\n\n\t\tintersectPoint = Polygon.lineIntersect2d(start, end, bottomLeft, topLeft);\n\t\tif (intersectPoint!=null){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t\t\n\t}",
"public double getNumIntersect() {\n\t\treturn m_numIntersect;\n\t}",
"public void detect_lines(float[] image,long width, long height, Lines contours, MutableLong num_result, double sigma, double low, double high, long mode, boolean compute_width, boolean correct_pos,boolean extend_lines, Junctions junctions)\r\n\t{\r\n\t byte[] ismax;\r\n\t float[] ev, n1, n2, p1, p2;\r\n\t float[][] k = new float[5][(int) (width*height)];\r\n\t \r\n\t// for (i=0;i<5;i++)\r\n\t// k[i] = xcalloc(width*height,sizeof(float));\r\n\t Convol convol = new Convol();\r\n\t convol.convolve_gauss(image,k[0],width,height,sigma,LinesUtil.DERIV_R);\r\n\t convol.convolve_gauss(image,k[1],width,height,sigma,LinesUtil.DERIV_C);\r\n\t convol.convolve_gauss(image,k[2],width,height,sigma,LinesUtil.DERIV_RR);\r\n\t convol.convolve_gauss(image,k[3],width,height,sigma,LinesUtil.DERIV_RC);\r\n\t \r\n\t convol.convolve_gauss(image,k[4],width,height,sigma,LinesUtil.DERIV_CC);\r\n\t\r\n\t ismax = new byte[(int) (width*height)];\r\n\t ev = new float[(int) (width*height)];\r\n\t n1 = new float[(int) (width*height)];\r\n\t n2 = new float[(int) (width*height)];\r\n\t p1 = new float[(int) (width*height)];\r\n\t p2 = new float[(int) (width*height)];\r\n\t /*\r\n\t * The C library function void *memset(void *str, int c, size_t n) \r\n\t * copies the character c (an unsigned char) to the first n characters \r\n\t * of the string pointed to by the argument str.\r\n\t */\r\n\t // memset(ismax,0,width*height*sizeof(*ismax));\r\n\t // memset(ev,0,width*height*sizeof(*ev));\r\n\t for(int j = 0; j < ismax.length; j++){\r\n\t\t ev[j] = 0;\r\n\t\t ismax[j] = 0;\r\n\t }\r\n\r\n\t compute_line_points(k,ismax,ev,n1,n2,p1,p2,width,height,low,high,mode);\r\n\t \r\n\t Link l = new Link();\r\n\t l.compute_contours(ismax,ev,n1,n2,p1,p2,k[0],k[1],contours,num_result,sigma,\r\n\t extend_lines,(int)mode,low,high,width,height,junctions);\r\n\t Width w = new Width();\r\n\t if (compute_width)\r\n\t w.compute_line_width(k[0],k[1],width,height,sigma,mode,correct_pos,contours,\r\n\t num_result);\r\n\r\n\t}",
"int section(float mbr[])\r\n {\r\n boolean inside;\r\n boolean overlap;\r\n int i;\r\n \r\n overlap = true;\r\n inside = true;\r\n for (i = 0; i < dimension; i++)\r\n {\r\n if (mbr[2*i] > bounces[2*i + 1] ||\r\n mbr[2*i + 1] < bounces[2*i]) \r\n overlap = false;\r\n if (mbr[2*i] < bounces[2*i] ||\r\n mbr[2*i + 1] > bounces[2*i + 1]) \r\n inside = false;\r\n }\r\n if (inside)\r\n return Constants.INSIDE;\r\n else if (overlap)\r\n return Constants.OVERLAP;\r\n else\r\n return Constants.S_NONE;\r\n }",
"public boolean overlap(float[] a, float[] b) {\r\n return ( (b[0] <= a[0] && a[0] <= b[3]) || (b[0] <= a[3] && a[3] <= b[3]) ) &&\r\n ( (b[1] <= a[1] && a[1] <= b[4]) || (b[1] <= a[4] && a[4] <= b[4]) ) &&\r\n ( (b[2] <= a[2] && a[2] <= b[5]) || (b[2] <= a[5] && a[5] <= b[5]) );\r\n }",
"public void showIsInside(boolean b){\n\t\tif (b){\n\t\t\tSystem.out.println(\"This point inside this figure\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"This point outside this figure\");\n\t\t}\n\t}",
"void trackFilteredObject(com.ilos.wiser.ILOSDataCollection.Object theObject, Mat threshold, Mat HSV, Mat cameraFeed, String colour, int counter) {\n ArrayList<com.ilos.wiser.ILOSDataCollection.Object> Objects = new ArrayList<>();\n Mat temp = new Mat();\n threshold.copyTo(temp);\n //Contours track the edges of the binary image\n List<MatOfPoint> contours = new ArrayList<>();\n Mat hierarchy = new Mat();\n boolean redFound = false;\n boolean blueFound = false;\n //Copies contours to the list contours\n Imgproc.findContours(temp,contours,hierarchy,Imgproc.RETR_EXTERNAL,Imgproc.CHAIN_APPROX_SIMPLE);\n boolean objectFound = false;\n if (!hierarchy.empty()) {\n for (int i = 0; i >=0; i = (int)hierarchy.get(i, 0)[1]) {\n MatOfPoint contour = contours.get(i);\n Moments moment = Imgproc.moments(contour);\n double area = moment.m00;\n if(area > MIN_AREA) {\n com.ilos.wiser.ILOSDataCollection.Object object = new com.ilos.wiser.ILOSDataCollection.Object(counter);\n //sets fields for the object based on the moment class\n object.setXPos(moment.m10/area);\n object.setYPos(moment.m01/area);\n object.type = theObject.type;\n object.colour = theObject.colour;\n //Tags if each object has been found to track how long it has been off screen for\n if(object.colour == new Scalar(255,0,0)){\n redFound = true;\n }\n if(object.colour == new Scalar(0,255,0)){\n blueFound = true;\n }\n //Appends a list of the object that are seen on the current frame\n Objects.add(object);\n\n objectFound = true;\n\n }else {objectFound = false;}\n }\n if(!redFound){\n if(redStart==1) {\n redStart = System.currentTimeMillis();\n }\n else{\n redEnd = System.currentTimeMillis();\n }\n if(redStart!=1 && redEnd!=0) {\n redGone = redEnd - redStart;\n if(redGone > 300) {\n System.out.println(\"RED OFF SCREEN: \" + redGone);\n }\n redStart = 1;\n redEnd = 0;\n }\n\n }\n if(!blueFound){\n if(blueStart==1) {\n blueStart = System.currentTimeMillis();\n }\n else{\n blueEnd = System.currentTimeMillis();\n }\n if(blueStart!=1 && blueEnd!=0) {\n blueGone = blueEnd - blueStart;\n if(blueGone > 300) {\n System.out.println(\"BLUE OFF SCREEN\" + blueGone);\n }\n blueStart = 1;\n blueEnd = 0;\n }\n }\n if(objectFound == true && collectData) {\n //This does all of the highlighting of the circles on the scren\n drawObject(Objects, mRgba, temp, contours, hierarchy);\n }\n //If collection is finished\n if(!collectData && redList.size()>0 && blueList.size()>0){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n coordText.setText(\"Press back to select a new path!\");\n }\n });\n }\n }\n }",
"boolean isPartiallyOverlapped(int[] x, int[] y) {\n return y[0] <= x[1]; //정렬이 이미 되어 있어서 simplify 할 수 있음\n }"
] | [
"0.6267102",
"0.6260333",
"0.6254047",
"0.6170025",
"0.60478145",
"0.6001644",
"0.59186727",
"0.5885705",
"0.5854712",
"0.5854365",
"0.5802306",
"0.57977706",
"0.5762833",
"0.57475007",
"0.5730222",
"0.57144636",
"0.56484365",
"0.56184244",
"0.5600271",
"0.5586908",
"0.5586903",
"0.557684",
"0.5561726",
"0.55408704",
"0.5539484",
"0.5519816",
"0.5505662",
"0.54828227",
"0.5472672",
"0.545518",
"0.5446365",
"0.54425764",
"0.54136235",
"0.54132605",
"0.5399518",
"0.53973365",
"0.5391154",
"0.5378451",
"0.53742737",
"0.5343183",
"0.5342708",
"0.5342235",
"0.53396755",
"0.53396094",
"0.5331443",
"0.532936",
"0.532023",
"0.5319225",
"0.5299957",
"0.52992815",
"0.5291211",
"0.5289394",
"0.5289167",
"0.52538085",
"0.5248696",
"0.52463406",
"0.52437705",
"0.5242571",
"0.5240029",
"0.5233646",
"0.52255064",
"0.52236664",
"0.5220043",
"0.5218174",
"0.52164507",
"0.52118134",
"0.52098465",
"0.52061605",
"0.52038944",
"0.5201563",
"0.51929295",
"0.51893586",
"0.5187804",
"0.51864916",
"0.51839364",
"0.51821953",
"0.51757646",
"0.5172887",
"0.5171783",
"0.51695067",
"0.5169238",
"0.5164219",
"0.5162625",
"0.51601595",
"0.51601464",
"0.5147972",
"0.51477766",
"0.5137105",
"0.513542",
"0.5129015",
"0.51245034",
"0.51222575",
"0.512181",
"0.5121362",
"0.5114814",
"0.51140195",
"0.5112726",
"0.51126564",
"0.510918",
"0.51087517"
] | 0.63815135 | 0 |
This method update the sprite according to frame at the moment of the time | @Override
public void act(long now) {
checkIsFrogAtTheEdge();
if (getIntersectingObjects(Car.class).size() >= 1 ||
getIntersectingObjects(Truck.class).size() >= 1 ||
getIntersectingObjects(LongTruck.class).size() >= 1)
{
intersectCar = true;
}
else if (getIntersectingObjects(Log.class).size() >= 1 && !death) {
move(frogSpeed.ObjSpeed(frogLevel, 6), 0);
}
else if (getIntersectingObjects(LongLog.class).size() >= 1 && !death) {
move(frogSpeed.ObjSpeed(frogLevel, 8), 0);
}
else if (getIntersectingObjects(Turtle.class).size() >= 1) {
move(frogSpeed.ObjSpeed(frogLevel, 7), 0);
}
else if (getIntersectingObjects(WetTurtle.class).size() >= 1){
if (getIntersectingObjects(WetTurtle.class).get(0).isSunk()) {
intersectWater = true;
} else {
move(frogSpeed.ObjSpeed(frogLevel, 7), 0);
}
}
else if (getIntersectingObjects(End.class).size() >= 1) {
IntersectEnd();
}
else if (getY() < waterPositionY) {
intersectWater = true;
}
getlives();
CheckIntersect(intersectCar, intersectWater, now);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 }",
"public void updateSprite() {\n //move to next frame\n if (this.curSpriteFrame == this.framesPerSprite) {\n if (this.spriteNum+1 < this.sprites.get(this.state).length) {\n this.spriteNum++;\n } else {\n this.spriteNum = 0;\n }\n this.curSpriteFrame = 0;\n }\n this.curSpriteFrame++;\n }",
"@Override\r\n public void update() {\r\n // Animate sprite\r\n if (this.spriteTimer++ >= 4) {\r\n this.spriteIndex++;\r\n this.spriteTimer = 0;\r\n }\r\n if (this.spriteIndex >= this.animation.length) {\r\n this.destroy();\r\n } else {\r\n this.sprite = this.animation[this.spriteIndex];\r\n }\r\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}",
"@Override\n public void updateStates() {\n mySprite.update();\n }",
"public void update(long fps) {\n rect.left = rect.left + ((float)xVelocity / fps);\n rect.top = rect.top + ((float)yVelocity / fps);\n rect.right = rect.left + width;\n rect.bottom = rect.top + height;\n }",
"@Override\n public void update() {\n update(Pong.STANDARD_FRAMETIME);\n }",
"@Override\n\t public void update() {\n\t \tif (getNode().getTranslateX() != 0 || getNode().getTranslateY() != 0) {\n\t \t\tsetState(SpriteState.ANIMATION_ACTIVE);\n\t\t \tupdateVelocity();\n\t\t \tgetNode().setTranslateX(getNode().getTranslateX() - getvX());\n\t\t \tgetNode().setTranslateY(getNode().getTranslateY() - getvY());\n\t\t if (getNode().getTranslateX() == 0 && getNode().getTranslateY() == 0) {\n\t\t \t\tsetState(SpriteState.IDLE);\n\t\t }\n\t \t}\n\t \t\n\t getNode().setLayoutX(getxPos());\n\t getNode().setLayoutY(getyPos());\n\t }",
"@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}",
"public void update(long gameTime) {\n\t\tif (!touched) {\n\t\t\tx += (speed.getXv() * speed.getxDirection());\n\t\t\ty += (speed.getYv() * speed.getyDirection());\n\t\t}\n\t\tif (gameTime > frameTicker + framePeriod) {\n\t\t\tframeTicker = gameTime;\n\t\t\tcurrentFrame++;\n\t\t\tif (currentFrame >= frameNr) {\n\t\t\t\tcurrentFrame = 0;\n\t\t\t}\n\t\t}\n\t\tthis.sourceRect.left = currentFrame * spriteWidth;\n\t\tthis.sourceRect.right = this.sourceRect.left + spriteWidth;\n\t}",
"void update() {\n rectToBeDrawn = new Rect((frameNumber * frameSize.x)-1, 0,(frameNumber * frameSize.x + frameSize.x) - 1, frameSize.x);\n\n //now the next frame\n frameNumber++;\n\n //don't try and draw frames that don't exist\n if(frameNumber == numFrames){\n frameNumber = 0;//back to the first frame\n }\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}",
"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 }",
"public void tick(){\n\t\ttimer += System.currentTimeMillis() - lastTime;\n\t\tif(timer > speed){\n\t\t\tcurrent = image.next();\n\t\t\ttimer = 0;\n\t\t}\n\t\tlastTime = System.currentTimeMillis();\n\t}",
"@Override\n public void update(){\n getNextPosition();\n checkTileMapCollision();\n setPosition(xtemp, ytemp);\n animation.update();\n }",
"@Override\n\tpublic void update() {\n\t\tkeyFrame++;\n\t\tif(keyFrame > 60)\n\t\t\tsetDead(true);\n\t\tif(move)\n\t\t\tif(!isDead())\n\t\t\t\tpositionY += getSpeed();\n\t}",
"@Override\n\tpublic void update() \n\t{\n\t\tPoint loc = getLocationCopy();\n\t\tEnemy c = game.findNearestEnemy(loc);\n\t\tif (c == null)\n\t\t\treturn;\n\t\t\n\t\tif(c.getLocation().distance(loc) < 100 && game.getFrameCount() % 30 == 0)\n\t\t{\n\t\t\tFlyingSalt s = new FlyingSalt(game, loc, \n\t\t\t\t\t\t\t\t\tc.getLocation().x - position.x,\n\t\t\t\t\t\t\t\t\tc.getLocation().y - position.y);\n\t\t\tgame.addAnimatable(s);\n\t\t}\n\t}",
"@Override\n public void update() {\n if(alive==false){\n afterBeKilled();\n return;\n }\n animate();\n chooseState();\n checkBeKilled();\n if(attack){\n if(timeBetweenShot<0){\n chooseDirection();\n attack();\n timeBetweenShot=15;\n }\n else{\n timeBetweenShot--;\n }\n\n }\n else{\n calculateMove();\n setRectangle();\n }\n }",
"public void tick() {\n long elapsed = (System.nanoTime()-startTime)/1000000;\n\n if(elapsed>delay) {\n currentFrame++;\n startTime = System.nanoTime();\n }\n if(currentFrame == images.length){\n currentFrame = 0;\n }\n }",
"@Override\n\tpublic void update() {\n\n\t\ttimer++;\n\t\tupdatePlayer();\n\t\tupdateScreen();\n\t\tupdateLives();\n\n\t}",
"@Override\n\tpublic void update(float delta) {\n\t\tupdateMotion();\n\n\t\t// set position of sprite and update frames\n\t\tsetPosition(body.getWorldCenter().x - getWidth() / 2, body.getWorldCenter().y - 25 / SonicBoom.PPM);\n\t\tsetRegion(getFrame(delta));\n\t\tstateTimer += delta;\n\n\t\t// update ring losing\n\t\tif (loseRing && tempRing > 0) {\n\t\t\tgame.gameObjects.spawnRing(body.getWorldCenter().add(-8 / SonicBoom.PPM, 70 / SonicBoom.PPM),\n\t\t\t\t\tr.nextInt(5) - 2, 3);\n\t\t\ttempRing--;\n\n\t\t\tif (tempRing <= 0) {\n\t\t\t\tloseRing = false;\n\t\t\t}\n\n\t\t\tgame.manager.get(\"Sound/Lose Rings.wav\", Sound.class).play();\n\t\t}\n\n\t\t// hurting time update\n\t\tif (hurt) {\n\t\t\thurtTime -= delta;\n\n\t\t\tif (hurtTime <= 0) {\n\t\t\t\thurt = false;\n\t\t\t}\n\t\t}\n\n\t\t// after dead update\n\t\tif (dead) {\n\t\t\tdeadTime -= delta;\n\n\t\t\tif (deadTime <= 0) {\n\t\t\t\tgame.setUpdateCam(false);\n\t\t\t}\n\t\t}\n\n\t\t// update contactAngle\n\t\tVector2 p1 = contactPoint;\n\t\tVector2 p2 = body.getWorldCenter();\n\n\t\tcontactAngle = (float) (Math.atan2(p2.y - p1.y, p2.x - p1.x) * 180 / Math.PI) - 90;\n\n\t\t// update rotation\n\t\tif (onLoop) {\n\t\t\trotation = contactAngle;\n\t\t\tsetRotation(rotation);\n\n\t\t\tdeLoopTime = delta;\n\t\t} else if (!onLoop && deLoopTime > 0) {\n\t\t\tdeLoopTime -= delta;\n\t\t}\n\t\tif (rotation > 0) {\n\t\t\trotation = rotation < 9.81f ? 0 : rotation - 9.81f;\n\t\t}\n\t\tif (rotation < 0) {\n\t\t\trotation = rotation > -9.81f ? 0 : rotation + 9.81f;\n\t\t}\n\t\tsetRotation(rotation);\n\n\t\t// update wrapper body\n\t\twrapperBody.setTransform(body.getWorldCenter(), (float) Math.toRadians(rotation));\n\n\t}",
"public void update(){\n\t\tthis.game.atacarZombies(this.x, this.y, this.damage, 1, false); //Misma fila\n\t\tthis.game.atacarZombies(this.x-1, this.y, this.damage, 1, false); //Fila arriba\n\t\tthis.game.atacarZombies(this.x+1, this.y, this.damage, 1, false); //Fila abajo\n\t\tthis.turno++;\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 update(){\n\t\tx+=xspeed; \n\t\ty+=yspeed;\t\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 }",
"private void updateTime(){\n currentTime = System.currentTimeMillis();\n float tp = previousTime;\n previousTime = (float)(currentTime - startingTime);\n dt = previousTime - tp;\n fps = 1000f/dt;\n }",
"public void update(long frameNanoDelta);",
"public void tick(){\n if(healthPoints <= 0){\n sprite.setVisible(false);\n }\n if(isInvulnerable){\n invulnTimer++;\n }\n if(invulnTimer >= invulnTicks){\n setInvulnerable(false);\n invulnTimer = 0;\n }\n //System.out.println(stuckCounter);\n //System.out.println(isStuck);\n\n if(isStuck){\n stuckCounter++;\n }\n else{\n stuckCounter = 0;\n }\n\n x += dx;\n\n y += dy;\n sprite.setY((int) y);\n sprite.setX((int) x);\n }",
"public void update() {\n super.update();\n // Code specific to the ship gameObject\n action = ctrl.action();\n direction.rotate(action.turn * STEER_RATE * Constants.DT);\n velocity.addScaled(direction, (MAG_ACC * Constants.DT * action.thrust));\n position.addScaled(velocity, DRAG * Constants.DT);\n position.wrap(Constants.FRAME_WIDTH, Constants.FRAME_HEIGHT);\n\n // Checks if the user is pressing forwards\n if(action.thrust == 1){\n thrusting = true;\n } else{\n thrusting = false;\n }\n time -= 1;\n if(action.shoot && time <= 0){\n mkBullet();\n time = 30;\n }\n\n if(invincible)\n color = Color.blue;\n else\n color = Color.cyan;\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}",
"public void update() {\n\t\tImage background_buffer = createImage(stats.getWidth(),\n\t\t\t\tstats.getHeight());\n\t\tGraphics background_buffer_graphics = background_buffer.getGraphics();\n\t\t// updates the stats on screen\n\t\tbackground_buffer_graphics.drawString(\n\t\t\t\t\"Current Move: \" + (model.isWhiteToPlay() ? \"White\" : \"Black\"),\n\t\t\t\t5, 20);\n\t\tbackground_buffer_graphics.drawString(\"White Points: \"\n\t\t\t\t+ (((Game) model).getBoard().getWhiteScore()), 20, 125);\n\t\tbackground_buffer_graphics.drawString(\"Black Points: \"\n\t\t\t\t+ (((Game) model).getBoard().getBlackScore()), 20, 145);\n\n\t\tImage wc = null;\n\t\tImage bc = null;\n\t\t//\n\t\ttry {\n\t\t\twc = ImageIO.read(new File((\"images/white_piece.png\")));\n\t\t\tbc = ImageIO.read(new File((\"images/black_piece.png\")));\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (model.isWhiteToPlay()) {\n\t\t\tbackground_buffer_graphics.drawImage(wc, 25, 30, null, null);\n\n\t\t} else {\n\t\t\tbackground_buffer_graphics.drawImage(bc, 25, 30, null, null);\n\n\t\t}\n\n\t\tstats.getGraphics().drawImage(background_buffer, 0, 0, null);\n\n\t}",
"public void update()\n\t{\n\t\t// Place this GameCanvas at the proper location and size\n\t\tthis.setBounds(0, 0, game.getWindow().getWidth(), game.getWindow().getHeight());\n\t\t\n\t\tif (timeCount > game.getFps())\n\t\t\ttimeCount = 0;\n\t\t\n\t\ttimeCount++;\n\t}",
"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}",
"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 State update() {\n if(mRuntime.seconds()<=time) {\n arm.setPosition(pos);\n return this;\n }\n //(1000);\n\n return NextState;\n\n\n\n\n\n }",
"public void update(){\n if (bossMoveTime > 10){\n if(random(0,16) <= 8){\n dir = 1;\n }else{\n dir = -1;\n }\n velX *= dir;\n bossMoveTime = 0;\n }\n posY *= 0.8f;\n posX += velX;\n posY += velY;\n angle += 0.04f;\n bossMoveTime++;\n }",
"public void update()\n {\n // always roatating time by 7 for fixed point calculation\n x = (velocity*cos(theta) *time) >> 21;\n int yFirstPart = (int)(velocity*sin(theta)*time) >> 21;\n int ySecondPart = (int)((g*time*time) >> 15);\n y = yFirstPart - ySecondPart;\n y =initialY - y;\n x= x + initialX;\n time+= updateSpeed;\n if(lastY == -1)\n {\n lastY = y;\n }else{\n int direction = lastY - y;\n if(lastDirection == -1)\n {\n lastDirection = direction;\n }else{\n if(lastDirection != 0 && direction != 0)\n {\n \n int signOfDirection = lastDirection / Math.abs(lastDirection);\n int signOfLastDirection = direction / Math.abs(direction);\n if(signOfDirection != signOfLastDirection)\n {\n if(!reachedTop)\n {\n onTop();\n reachedTop = true;\n }\n \n setIsOnHalf(true);\n }\n }\n lastY = y;\n }\n \n }\n }",
"public void update() {\n if (next) {\n if (!loop) {\n if (currentFrame != numFrames-1) {\n currentFrame+=1;\n }\n }\n else {\n currentFrame+=1;\n currentFrame%=numFrames;\n }\n }\n else {\n if (!loop) {\n if (currentFrame != 0) {\n currentFrame-=1;\n }\n }\n else {\n currentFrame -=1;\n if (currentFrame == -1) currentFrame = numFrames - 1;\n } \n }\n }",
"public void update(float dt){\n currentFrameTime += dt;\n if (currentFrameTime > maxFrameTime) {\n frame++;\n currentFrameTime = 0;\n }\n\n if (frame >= frameCount) {\n frame = 0;\n }\n }",
"@Override\n\tpublic void update() {\n\t\tticks++;\n\t\tswitch (state) {\n\t\tcase MENU:\n\t\tcase INTRO:\n\t\t\tupdateBackground();\n\t\t\tbreak;\n\n\t\tcase PLAYING:\n\t\t\tbreak;\n\t\tcase GAMEOVER:\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\n\t\t}\n\n\t\tWorld.update();\n\t\tScreen.update();\n\n\t}",
"public void render() {\n GameApp.getSpritebatch().draw(sprite, position.x, position.y, GridSquare.SIZE, GridSquare.SIZE);\n if (active) {\n if (currTime + attack.getAttackDelay() < System.currentTimeMillis() && attackTargets()) {\n\n currTime = System.currentTimeMillis();\n }\n attack.render();\n }\n }",
"private void updateTime() {\n timer.update();\n frametime = timer.getTimePerFrame();\n }",
"public void update()\n\t{\n\t\tif(currentState == moving)\n\t\t{\n\t\t\tx += xSpeed;\n\t\t\ty += ySpeed;\n\t\t\t\n\t\t\tif(x < 0 || x > world.getSIMULATION_WIDTH() - individualSize)\n\t\t\t\trandomizeDirection();\n\t\t\tif(y < 0 || y > world.getSIMULATION_HEIGHT() - individualSize)\n\t\t\t\trandomizeDirection();\n\t\t\t\n\t\t\tif(x < 0)\n\t\t\t\tx = 0;\n\t\t\tif(x > world.getSIMULATION_WIDTH() - individualSize)\n\t\t\t\tx = world.getSIMULATION_WIDTH() - individualSize;\n\t\t\t\n\t\t\tif(y < 0)\n\t\t\t\ty = 0;\n\t\t\tif(y > world.getSIMULATION_HEIGHT() - individualSize)\n\t\t\t\ty = world.getSIMULATION_HEIGHT() - individualSize;\n\t\t}\n\t\tfor(PlayPauseTimer timer: timerList)\n\t\t\ttimer.update();\n\t\tworld.locationUpdate(this);\n\t}",
"@Override\n\tpublic void update() {\n\t\tposX -= ninja.getSpeedX();\n\t\t\n\t}",
"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}",
"@Override\n public void draw(Graphics g){\n \n //Here we draw a portion of the sprite sheet, placing it at x and y on\n //the screen and drawing a portion of the sprite sheet defined\n //by the current frame\n g.drawImage(image, \n x, y, (x + width), (y + height),\n (currentFrame * width), 0, (currentFrame * width + width), height,\n null);\n \n //this is our logic to step through frames. We count frames until the\n //frame delay is up and then move to the next frame\n delayCount++;\n if (delayCount == frameDelay){\n currentFrame++;\n delayCount = 0;\n }\n \n if (currentFrame == frames) {\n currentFrame = 0;\n }\n }",
"public void update(){\n if(player.getPlaying()) {\n // update player animation.\n player.update();\n // update background animation.\n bg.update();\n // checks if skater has finished falling animation to end the game.\n if (player.animate instanceof FallAnimate && player.animate.getDone()) {\n player.setPlaying(false);\n player.setFall(false);\n System.out.println(\"End \" + player.getPlaying());\n }\n // checks if player has reached required points.\n if(player.getScore() > TARGETSCORE){\n player.setPlaying(false);\n levelCompleted = true;\n levelReset = System.nanoTime();\n }\n // increment jumpcounter while crouched.\n if (player.animate instanceof CrouchingAnimate && (jumpCounter <= 25)) {\n jumpCounter++;\n }\n // Creating Bananas:\n long bananaElapsed = (System.nanoTime() - bananaStartTime) / 1000000;\n if(bananaElapsed > 10500 && MainActivity.difficulty != 0){\n bananas.add(new Banana(BitmapFactory.decodeResource(getResources(),\n R.drawable.bigbanana), WIDTH + 10, (int) (HEIGHT * 0.85), 40, 40, 1));\n bananaStartTime = System.nanoTime();\n }\n //collision detection:\n for (int i = 0; i < bananas.size(); i++) {\n bananas.get(i).update();\n if (collision(bananas.get(i), player)) {\n bananas.remove(i);\n player.setFall(true);\n player.setPlaying(false);\n break;\n }\n // removing bananas when off screen\n if (bananas.get(i).getX() < -100) {\n bananas.remove(i);\n break;\n }\n }\n // Creating Cones:\n long coneElapsed = (System.nanoTime() - coneStartTime) / 1000000;\n if (coneElapsed > 5000) {\n cones.add(new TallBricks(BitmapFactory.decodeResource(getResources(),\n R.drawable.tallbricks), WIDTH + 10, (int) (HEIGHT * 0.59), 100, 161, 1));\n coneStartTime = System.nanoTime();\n }\n // update and check collisions.\n for (int i = 0; i < cones.size(); i++) {\n\n cones.get(i).update();\n if (collision(cones.get(i), player) && MainActivity.difficulty == 0) {\n cones.remove(i);\n player.forceSetScore(-500);\n break;\n }\n\n if (collision(cones.get(i), player) && MainActivity.difficulty != 0) {\n cones.remove(i);\n player.setFall(true);\n break;\n }\n // removing cones when off screen\n if (cones.get(i).getX() < -100) {\n cones.remove(i);\n break;\n }\n\n if((cones.get(i).getX() < player.getX() -15) ){\n cones.remove(i);\n player.setPendingPoints(1000);\n break;\n }\n }\n }\n else if(player.getPlaying() == false && levelCompleted){\n long resetElapsed = (System.nanoTime()-levelReset)/1000000;\n if(resetElapsed > 4000) {\n Intent resultIntent = new Intent();\n resultIntent.putExtra(\"result\",true);\n ((Activity)context).setResult(Activity.RESULT_OK,resultIntent);\n ((Activity)context).finish();\n }\n }\n else if(player.getPlaying() == false && !levelCompleted){\n if(!reset){\n newGameCreated = false;\n startReset = System.nanoTime();\n reset = true;\n }\n\n long resetElapsed = (System.nanoTime()-startReset)/1000000;\n\n if(resetElapsed > 2500 && !newGameCreated){\n newGame();\n }\n else if(resetElapsed < 2500 && started){\n player.update();\n }\n }\n }",
"public void update() \n\t{\n\t\t// Increment if there are more than 1 frames\n\t\tif(frames.size() > 1) {\n\t\t\t\tcurrentFrameIndex++;\n\t\t}\n\t\t\n\t\t// If we've reached the end of the list, then start from\n\t\t// the beginning again\n\t\tif(currentFrameIndex >= frames.size()) {\n\t\t\t\tcurrentFrameIndex = 0;\n\t\t}\n\t}",
"public void update(float deltaTime) {\n frames++;\n float angle = body.getAngle();\n\n velocity2D.set(MathUtils.cos(angle) * velocity,\n MathUtils.sin(angle) * velocity);\n\n Vector2 wiggleOffset = new Vector2(0, 0);\n if (wiggling) {\n float rotatedAngle = angle + MathUtils.PI / 2.f;\n float offset = wiggleAmplitude * MathUtils.sin(wiggleFrequency * frames / 60f);\n float xWiggle = MathUtils.cos(rotatedAngle)*offset;\n float yWiggle = MathUtils.sin(rotatedAngle)*offset;\n wiggleOffset.set(xWiggle, yWiggle);\n velocity2D.add(wiggleOffset);\n\n fixPointOffset.set(yWiggle, -xWiggle);\n }\n body.setLinearVelocity(velocity2D);\n\n sprite.setRegion(animation.getKeyFrame(frames/80f, true));\n alignSpriteToBody();\n //Vector2 lampPos = getLampPosition();\n //lampSprite.setPosition(lampPos.x, lampPos.y);\n\n //lamp.setPosition(lampPos.x, lampPos.y);\n //rayHandler.setCombinedMatrix(camera.combined);\n //rayHandler.updateAndRender();\n //rayHandler.update();\n //rayHandler.render();\n\n stamina -= 0.0005;\n if (stamina <= 0) {\n stamina = 1;\n //die();\n }\n }",
"@Override\r\n\tpublic void Update() {\n\t\tsuper.Update();\r\n\t\t\r\n\t\tif(mTime != Definition.FOREVER && mTime < 0)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tfor(int i=0;i<mOwner.mSpriteList.size();i++)\r\n\t\t{\r\n\t\t\tmOwner.mSpriteList.get(i).setColor(23f/255, 117f/255, 148f/255);\r\n\t\t}\r\n\t\t\r\n\t\tMotionStrategy move = new SpeedUp(mSlowRate, -1);\r\n\t\tmOwner.getMoveWay().add(move);\r\n\t}",
"private void update(int frameNo)\n {\n //This function is to be used for LRU and MRU\n }",
"@Override\n public void tick() {\n setPosition(getPosition().add(getSpeed())); \n }",
"public void sprite() {\n\t\tspr.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = spr;\n\t}",
"public void updateSprites() {\n this.model.getSprites().values().forEach(x -> x.setPosition(this.x, this.y));\n }",
"private void updateSprites() {\n\t\tpaddle1.setX(paddle1X);\r\n\t\tpaddle1.setY(paddle1Y);\r\n\r\n\t\tpaddle2.setX(paddle2X);\r\n\t\tpaddle2.setY(paddle2Y);\r\n\r\n\t\tball.setX(ballX);\r\n\t\tball.setY(ballY);\r\n\r\n\t\tscore.setVisible(paused);\r\n\t}",
"@Override\r\n public void update(long fps,\r\n Transform t,\r\n Transform playerTransform) {\n }",
"public void update(float dt){\n\t\tresultSprite.update(dt);\n\t\tnewRound.update(dt);\n\t\tbackMenu.update(dt);\n\t}",
"public void update() {\n\n\t\tif (speedX < 0) {\n\t\t\tcenterX += speedX;\n\t\t}\n\t\tif (speedX == 0 || speedX < 0) {\n\t\t\tbg1.setSpeedX(0);\n\t\t\tbg2.setSpeedX(0);\n\t\t}\n\t\tif (centerX <= 200 && speedX > 0) {\n\t\t\tcenterX += speedX;\n\t\t}\n\t\tif (speedX > 0 && centerX > 200) {\n\t\t\tscore+=speedX;\n\t\t\tbg1.setSpeedX(-moveSpeed / 5);\n\t\t\tbg2.setSpeedX(-moveSpeed / 5);\n\t\t}\n\n\t\t// Updates Y Position\n\t\tcenterY += speedY;\n\n\t\t// Handles Jumping\n\n\t\tspeedY += 1;\n\n\t\tif (speedY > 3) {\n\t\t\tjumped = true;\n\t\t}\n\n\t\t// Prevents going beyond X coordinate of 0\n\t\tif (centerX + speedX <= 60) {\n\t\t\tcenterX = 61;\n\t\t}\n\t\t//use characteristics of the new morph\n\t\tif(getMorph().equals(\"square\")){\n\t\t\tsquare();\n\t\t}if(getMorph().equals(\"circle\")){\n\t\t\tcircle();\n\t\t}if(getMorph().equals(\"balloon\")){\n\t\t\tballoon();\n\t\t}\n\t}",
"@Override\n public void draw(SpriteBatch batch) {\n stateTime += Gdx.graphics.getDeltaTime();\n\n if (SinglePGameModel.getInstance().getPlayer().isWalking())\n sprite.setRegion(walkingAnimation.getKeyFrame(stateTime, true));\n else\n sprite.setRegion(jumpingAnimation);\n\n sprite.draw(batch);\n }",
"private void tick() {\n\n if (StateManager.getState() != null) {\n StateManager.getState().tick();\n }\n this.backgroundFrames--;\n if (this.backgroundFrames == 0) {\n this.backgroundFrames = Const.TOTAL_BACKGROUND_FRAMES;\n }\n//Check all changed variables for the player\n player.tick();\n long elapsed = (System.nanoTime() - time) / (Const.DRAWING_DELAY - (4000 * Enemy.getDifficulty()));\n//Check if enough time is passed to add new enemy or if spawnSpot is available\n if (elapsed > (this.delay - Enemy.getDifficulty() * 300)&& Road.isSpotAvailable()) {\n enemies.add(new Enemy());\n time = System.nanoTime();\n }\n//Loop for checking all changed variables for the enemies and check if they intersects with the player\n for (int j = 0; j < enemies.size(); j++) {\n enemies.get(j).tick();\n if(enemies.get(j).getY() > Const.ROAD_BOTTOM_BORDER + 200){\n Road.getOccupiedSpawnPoints()[Const.SPAWN_POINTS.indexOf(enemies.get(j).getX())] = false;\n player.setScore(player.getScore() + 50);\n enemies.remove(j);\n continue;\n }\n enemyBoundingBox = enemies.get(j).getEnemyRectangle();\n if (player.getBoundingBox().intersects(enemyBoundingBox)) {\n reset();\n if(player.getLives() == 0){\n gameOver();\n }\n break;\n }\n }\n }",
"@Override\n public void preUpdate(){\n super.preUpdate();\n if(this.isMoving){\n ArrayList<Rect> spriteSequence = ImageManager.inst().getImg(getImgId()).getDirSequence(curDirection);\n curSpriteIndex = (curSpriteIndex + 1) % spriteSequence.size();\n\n Vector2D newPos = this.getSpritePos().applyDir(this.getCurDirection(), this.getMoveSpeed());\n this.setSpritePos(newPos);\n CollideDetector.setDirtyFlag(true);\n }\n }",
"public void tick(){\n camera.tick(player);\n handler.tick();\n }",
"@Override\n public void update()\n {\n if(!Rect.intersects(spriteBounds, gameRegion) || wasTouched)\n {\n destroy();\n }\n else\n {\n spriteBounds.offset(0, speed);\n }\n }",
"public void update(float deltaTime) {\n if (yCoordinate > gameActivity.getScreenHeight()) //if enemy ship img_left_button screen\n {\n Random placeGenerator = new Random();\n //putting respawned enemy ship in a random X spot\n xCoordinate = placeGenerator.nextInt(gameActivity.getScreenWidth() - getRawEnemyShip().getWidth());\n yCoordinate = 0;\n\n } else {\n //here i use deltaTime\n //the longer it takes to do the updates, the more\n // i will multiple the distance the enemyShip has\n //to move\n //see the code in gameView class\n yCoordinate += 3 * (gameActivity.getScreenHeight() / 14) * deltaTime;\n }\n\n // Refresh enemyShipRect location\n enemyShipRect.left = getxCoordinate();\n enemyShipRect.top = getyCoordinate();\n enemyShipRect.right = getxCoordinate() + enemyShip.getWidth();\n enemyShipRect.bottom = (getyCoordinate() + enemyShip.getHeight());\n }",
"public synchronized void tick(TiledMapTileLayer background) {\n\t\tplay.tick();\n\t\t\n\t\n\t\tswitch(timeState) {\n\t\tcase MidNight:\n\t\t\t\n\t\t\tRGB = 0.1f;\n\t\t\tbreak;\n\t\tcase Morning:\n\t\t\tRGB = 0.35f;\n\t\t\tbreak;\n\t\tcase Noon:\n\t\t\tRGB = 0.5f;\n\t\t\tbreak;\n\t\tcase Evening:\n\t\t\tRGB = 0.35f;\n\t\t\tbreak;\n\t\tcase Night:\n\t\t\tRGB = 0.2f;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif(play.getX() + play.getWidth() < camWidth/2 ) {\n\t\t\tcamera.position.x = camWidth/2;\n\t\t}else if(play.getX()+play.getWidth()>(background.getWidth()*background.getTileWidth())-camWidth/2){\n\t\t\tcamera.position.x = (background.getWidth()*background.getTileWidth())-camWidth/2;\n\t\t}else {\n\t\t\tcamera.position.x = play.getX() + play.getWidth();\n\t\t}if(play.getY() + play.getHeight() <= camHeight/2) { \n\t\t\tcamera.position.y = camHeight/2;\n\t\t}else if(play.getY()+play.getHeight() > (background.getHeight() * background.getTileHeight()) - camHeight/2) {\n\t\t\tcamera.position.y = (background.getHeight() * background.getTileHeight()) - camHeight/2;\n\t\t}else{\n\t\t\tcamera.position.y = play.getY()+play.getHeight();\n\t\t}\n\t\t\n\t}",
"public void update() {\n if (this.active) {\n GameObject.processing.image(this.image, this.xPosition, this.yPosition);\n }\n }",
"public abstract void update(float time);",
"private void update() {\n for (Background bg : backgrounds) {\n bg.update(fps);\n }\n\n }",
"void updatePosition() {\n\t\t\n\t\tcoords.x = body.getPosition().x*Simulation.meterToPixel;\n\t\tcoords.y = body.getPosition().y*Simulation.meterToPixel;\n\t\tspeed.x = body.m_linearVelocity.x;\n\t\tspeed.y = body.m_linearVelocity.y;\n\t}",
"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 }",
"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 draw(SpriteBatch batch) {\n\n stateTime += Gdx.graphics.getDeltaTime();\n if(hurtTime > 0) hurtTime -= Gdx.graphics.getDeltaTime();\n\n if(direction != EntityModel.AnimDirection.NONE) {\n sprite.setRegion((TextureRegion) animations.get(direction.ordinal()).getKeyFrame(stateTime, true));\n\n } else sprite.setRegion(idleSprites.get(previousDirection.ordinal()));\n\n sprite.draw(batch);\n }",
"public void update(float f) {\n Timer.this.clipGroup.setClipArea( -(Timer.this.TimeBar.getWidth() * f),0, Timer.this.TimeBar.getWidth(), Timer.this.TimeBar.getHeight());\n ef.setPosition(clipGroup.getX()+(TimeBar.getWidth()*0.99f)-TimeBar.getWidth()*f,frmTime.getY()+frmTime.getHeight()*0.5f);\n resDura = duration-(int)(duration*f);\n checkStar(ef.getX());\n// System.out.println(\"resTime: \"+((int)(duration*f)));\n if (f == 1.0f) {\n Timer.this.onComplete.run();\n ef.free();\n }\n }",
"public void update( ) {\n\t\tdraw( );\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\r\n\tpublic void update(float dt) {\n\r\n\t}",
"protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}",
"public void onUpdate()\n {\n this.prevPosX = this.posX;\n this.prevPosY = this.posY;\n this.prevPosZ = this.posZ;\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n this.onGround = false;\n\n if (this.wallPos != null)\n {\n this.xPosition = this.wallPos[0];\n this.yPosition = this.wallPos[1];\n this.zPosition = this.wallPos[2];\n\n if (!this.onValidSurface() && !this.isDead)\n {\n this.entityDropItem(this.mapStack, 0.0F);\n this.setDead();\n }\n }\n\n ++this.updateCount;\n\n if (this.updateCount > 400)\n {\n this.updateCount = 0;\n mod_HangableMaps.instance.sendMapIDPacket(this);\n }\n }",
"@Override\r\n public void update() {\r\n super.update();\r\n hero.checkForTileCollision(getXOverlap(hero.oldx,hero.oldx+width,hero.x,hero.x+width), getYOverlap(hero.oldy,hero.oldy+hero.height,hero.y, hero.y+hero.height));\r\n int i = 0;\r\n\r\n while (turningPoints[i]!= null)\r\n {\r\n if (intersects(turningPoints[i].x,turningPoints[i].y, turningPoints[i].width,turningPoints[i].height))\r\n {\r\n vx = -vx;\r\n vy = -vy;\r\n }\r\n i++;\r\n }\r\n }",
"@Override\n public void draw(Batch batch, float parentAlpha) {\n\n if(vidas == 0){\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-12,16,16);\n sprite.draw(batch);\n\n }else{\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-7,16,16);\n sprite.setPosition(body.getPosition().x - 9f, body.getPosition().y - 9);\n sprite.draw(batch);\n patrullar();\n }\n\n\n }",
"@Override\n\tpublic void update(float dt) {\n\t\t\n\t}",
"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 public void update(EntityModel model) {\n super.update(model);\n\n ((BulletModel) model).increaseStateTime(Gdx.graphics.getDeltaTime());\n float stateTime = ((BulletModel) model).getStateTime();\n\n sprite.setRegion(Animation.getKeyFrame(stateTime, false));\n\n sprite.setScale(SCALE);\n\n sprite.rotate90(true);\n }",
"@Override\n\tpublic void update() {\n\t\t\n\t\tif(!this.explShowing)\n\t\t{\n\t\t\tx+= dx;\n\t\t\ty+= dy;\n\t\n\t\t\tif(x < 0)\n\t\t\t{\n\t\t\t\tx = 0;\n\t\t\t\tdx = dx *-1;\n\t\t\t}\n\t\t\telse\n\t\t\tif(x + w > MainGame.getInstance().X_WORLD_END)\n\t\t\t{\n\t\t\t\tx = MainGame.getInstance().X_WORLD_END - w ;\n\t\t\t\tdx = dx *-1;\t\n\t\t\t}\n\t\n\t\t\tif(y < 0)\n\t\t\t{\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t\telse\n\t\t\tif(y + h > MainGame.getInstance().Y_WORLD_END)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tthis.reset();\n\t\t\t}\n\t\t}\n\t\t\n\t\ts.update();\n\t\n\t\tif(this.explShowing)\n\t\t{\n\t\t\tif(expl.isHasFinished())\n\t\t\t{\n\t\t\t\texplShowing = false;\n\t\t\t\ts = this.normalImage;\n\t\t\t\tthis.x = this.xStart;\n\t\t\t\tthis.y = this.yStart;\n\t\t\t\ts.setX(this.xStart);\n\t\t\t\ts.setY(this.yStart);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//s.setX(x);\n\t\t//s.setY(y);\n\t\t\n\t\tthis.rect.setFrame(getX(),getY(),getW(),getH());\t\n\t}",
"public void tick() {\n\r\n\t\tdouble angle = Math.atan2(getY()-y, getX()-x);\r\n\t\tif(seeking||Math.sqrt(((getX()-x)/1000)*((getX()-x)/1000)+((getY()-y)/1000)*((getY()-y)/1000))*1000>range[stage]){\r\n\r\n\t\t\tx += (int)(speed *Math.cos(angle));\r\n\t\t\ty += (int)(speed *Math.sin(angle));\t\t\r\n\t\t}else if(stage==0){\r\n\t\t\tstage=1;\r\n\t\t}\r\n\t\telse seeking = true;\r\n\t\tif(health<=0)\r\n\t\t{\r\n\t\t\tHandler.removeObject(this);\r\n\t\t\trage = rage + 1;\r\n\r\n\t\t}\r\n\t}",
"public void update() {\n if (!outOfBounds()) {\n super.move(dirVec.mul(ShadowDefend.getTimescale() * speed));\n }\n super.update();\n }",
"public void render(SpriteBatch sb) {\n stateTime += Gdx.graphics.getDeltaTime();\n // Get current frame of animation for the current stateTime\n TextureRegion tr;\n if (isMovingLeft) tr = model.animations.get(\"left\").getKeyFrame(stateTime, true);\n else if (isMovingRight) tr = model.animations.get(\"right\").getKeyFrame(stateTime, true);\n else if (isMovingUp) tr = model.animations.get(\"up\").getKeyFrame(stateTime, true);\n else if (isMovingDown) tr = model.animations.get(\"down\").getKeyFrame(stateTime, true);\n else tr = model.animations.get(direction.name().toLowerCase()).getKeyFrame(2);\n sb.draw(tr, x, y, width, height);\n }",
"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 }",
"@Override\n public void update(float dt) {\n for (Background background : backgrounds) {\n background.update(dt);\n }\n\n if(backgrounds[firstBackgroundIndex].getPosition().x < -drawingWidth){\n reposition();\n }\n }",
"public void update() {\n if (isActive()) {\n updatePosition(dx, dy);\n }\n }",
"private void render()\n\t{\n\t\ttheta = (float) (velocity.heading() + Math.toRadians(90.0));\n\n\t\t// se baser sur le temps écoulé depuis le lancement\n\t\tf = parent.frameCount / 4;\n\t\tint fi = f + 1;\n\t\tfloat x = fi % DIM * W;\n\t\tfloat y = fi / DIM % DIM * H;\n\n\t\tparent.pushMatrix();\n\t\tparent.translate(location.x, location.y);\n\t\tparent.rotate(theta);\n\t\tparent.beginShape();\n\t\tparent.texture(spritesheet);\n\t\tparent.vertex(0, 0, x, y);\n\t\tparent.vertex(100, 0, x + W, y);\n\t\tparent.vertex(100, 100, x + W, y + H);\n\t\tparent.vertex(0, 100, x, y + H);\n\t\tparent.endShape();\n\t\tparent.popMatrix();\n\t}",
"@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 static void update() \r\n {\r\n lastTime = currentTime; \r\n currentTime = getTime(); \r\n }",
"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}",
"@Override\n public void update() {\n adjustRenderHitbox();\n if (renderHurtboxes) {\n renderHurtbox.setRect(player.getHurtbox().x / 1920 * gameWidth, player.getHurtbox().y / 1080 * gameHeight, player.getHurtbox().width / 1920 * gameWidth, player.getHurtbox().height / 1080 * gameHeight);\n }\n updateAnimationLoop();\n }",
"private void updateFrame(@NotNull final BaseInterpolationData data, @NotNull final ParticleData particleData) {\n\n final ParticleEmitterNode emitterNode = particleData.getEmitterNode();\n\n if (frameSequence == null) {\n\n particleData.spriteCol++;\n\n if (particleData.spriteCol == emitterNode.getSpriteColCount()) {\n particleData.spriteCol = 0;\n particleData.spriteRow++;\n\n if (particleData.spriteRow == emitterNode.getSpriteRowCount()) {\n particleData.spriteRow = 0;\n }\n }\n\n } else {\n\n data.index++;\n\n if (data.index == frameSequence.length) {\n data.index = 0;\n }\n\n final int frame = frameSequence[data.index];\n\n particleData.spriteRow = (int) FastMath.floor(frame / emitterNode.getSpriteRowCount()) - 2;\n particleData.spriteCol = frame % emitterNode.getSpriteColCount();\n }\n\n data.interval -= targetInterval;\n }",
"public void update(float deltaTime) {\n if (creationPoint.y != (int)(GameView.instance.groundLevel - height*3/4) || creationPoint.x != x+width/2){\n creationPoint.x = x+width/2-width/4;\n creationPoint.y = (int)(GameView.instance.groundLevel - height/2)+height/8;\n }\n\n\n if(isStanding) {\n\n /*System.out.println(creationPoint.x);\n System.out.println(GameView.instance.player.position.x);\n System.out.println(GameView.instance.player.position.x-creationPoint.x);\n System.out.println(GameView.instance.cameraSize*attackRange);*/\n\n tax();\n\n\n //=======================================================================================//\n\n //Buildings\n\n //=======================================================================================//\n\n\n grow();\n\n\n // = ======== == ==\n // = = == == ==\n // ===== == ====\n // = = == == ===\n\n if (inRange() && !surrender) {\n countdown+=GameView.instance.fixedDeltaTime;\n //System.out.println(countdown);\n float shootSpeed=4-lv;\n if (countdown > 1000*shootSpeed) {\n\n if (countdown > 1200*shootSpeed && attack == 0) {\n Attack();\n\n attack += 1;\n }\n\n if (countdown > 1400*shootSpeed && attack == 1) {\n Attack();\n\n attack += 1;\n }\n\n if (countdown > 1600*shootSpeed && attack == 2) {\n Attack();\n\n attack += 1;\n }\n\n if (countdown >= 1800*shootSpeed) {\n countdown = 0;\n attack = 0;\n }\n }\n }\n if ((Scene.instance.timeOfDay) / (Scene.instance.dayLength) > 0.6) {\n spawnedNPC = false;\n }\n if(!spawnedNPC) {\n //spawning thief\n if ((townFear > 20 && lv != 0 && (currentGold < maxGold / 2)) || (goldRate < 200 && lv != 0) && Scene.instance.day > 2) {\n GameView.instance.npc_pool.spawnThiefs(x, (int) GameView.instance.groundLevel, 1, this);\n }\n if(!surrender) {\n //spawning dragonslayer\n if (townFear > 30 && lv != 0) {\n GameView.instance.npc_pool.spawnDragonLayers(x, (int) GameView.instance.groundLevel, this);\n }\n\n //spawning wizard\n if (townFear > 35 && lv == 2 && !summonedWizard) {\n GameView.instance.npc_pool.spawnFarmers(x, (int) GameView.instance.groundLevel, this);\n summonedWizard = true;\n }\n }\n spawnedNPC = true;\n }\n\n if(!surrender) {\n if (townFear > surrenderFear) {\n surrender = true;\n flag.setSurrender(surrender);\n SoundEffects.instance.play(SoundEffects.TRIBUTE);\n }\n }\n else {\n if(townFear < surrenderFear/2) {\n surrender = false;\n flag.setSurrender(surrender);\n\n }\n }\n\n\n\n Flagposition(deltaTime);\n }\n else {\n buildingImage = SpriteManager.instance.getBuildingSprite(\"FortressRuin\");\n\n if(beenEmptied == false){\n GoldPool.instance.spawnGold(collider.centerX(), collider.centerY(),Math.min(currentGold,100*(lv+1)) );\n beenEmptied = true;\n }\n townFear = 0;\n }\n\n //==== ===== ===== = == ==== ============================\n //= = == = = = = == = = ============================\n //==== == ===== ===== == ==== ============================\n //= == ===== = = = == = == ============================\n repair(deltaTime);\n\n for(int i = 0; i < currentBuildingsLeft.size(); i++){\n currentBuildingsLeft.get(i).update(deltaTime);\n }\n\n for(int i = 0; i < currentBuildingsRight.size(); i++){\n currentBuildingsRight.get(i).update(deltaTime);\n }\n super.update(deltaTime);\n\n }",
"public void update(){\n if(newPlayer.getRunning()) {\n\n if (botborder.isEmpty())\n {\n newPlayer.setRunning(false);\n return;\n }\n if (topborder.isEmpty())\n {\n newPlayer.setRunning(false);\n return;\n }\n\n background.update();\n newPlayer.update();\n\n\n //A threshold that the border can have based on the score\n maxBorderHeight = 30+newPlayer.getScore()/difficulty;\n if (maxBorderHeight > height/4){\n maxBorderHeight = height/4;\n minBorderHeight = 5+newPlayer.getScore()/difficulty;\n }\n\n for (int i = 0; i < topborder.size(); i++){\n if (collision(topborder.get(i), newPlayer)){\n newPlayer.setRunning(false);\n }\n }\n for (int i = 0; i < botborder.size(); i++){\n if (collision(botborder.get(i), newPlayer)){\n newPlayer.setRunning(false);\n }\n }\n\n this.updateTopBorder();\n //Create the borders\n this.updateBotBorder();\n\n //Adds smoke from spaceship from the timer\n long timeElapsed = (System.nanoTime() - outTimer)/1000000;\n if(timeElapsed > 120){\n effect.add(new Effects(newPlayer.getX(), newPlayer.getY()+30)); //Balls will appear out of backside of spaceship.\n outTimer = System.nanoTime();\n }\n for (int i = 0; i < effect.size(); i++){\n //Go through every ball and then update\n effect.get(i).update();\n if (effect.get(i).getX()<-10){\n effect.remove(i); //Removes the balls that are off the screen\n }\n }\n\n //Adds enemies in, first one in middle, rest are random\n long enemyElapsed = (System.nanoTime()- enemyStart)/1000000;\n //Higher the score is, the less delay there is\n if (enemyElapsed> (1500 - newPlayer.getScore()/4)){\n\n if (enemy.size() == 0){\n enemy.add(new Enemy(BitmapFactory.decodeResource(getResources(),R.drawable.enemy1), width+10, height + 50,25, 30, 30, 1));\n }\n else {\n enemy.add(new Enemy(BitmapFactory.decodeResource(getResources(),R.drawable.enemy1), width + 10, (int) (rng.nextDouble()*(height-(maxBorderHeight*2))+maxBorderHeight),25,30, newPlayer.getScore(), 1));\n }\n //Reset Timer\n enemyStart = System.nanoTime();\n\n }\n\n long shipElapsed = (System.nanoTime()-secondaryTimer)/1000000;\n\n\n if (newPlayer.getScore() == 150){\n level = 2;\n }\n\n //Randomised spot for secondary enemy\n if (newPlayer.getScore()%150==0) {\n if (newEnemy.size() == 0) {\n newEnemy.add(new secondaryEnemy(BitmapFactory.decodeResource(getResources(), R.drawable.enemy2), width + 5, (int) (rng.nextDouble() * (height - (maxBorderHeight * 2)) + maxBorderHeight), 32, 26, 5, 1));\n newEnemy.add(new secondaryEnemy(BitmapFactory.decodeResource(getResources(), R.drawable.enemy2), width + 5, (int) (rng.nextDouble() * (height - (maxBorderHeight * 2)) + maxBorderHeight), 32, 26, 5, 1));\n }\n\n secondaryTimer = System.nanoTime();\n }\n\n long thirdElapsed = (System.nanoTime()- tertiaryTimer)/1000000;\n\n if (newPlayer.getScore() == 300){\n level = 3;\n }\n if (level == 3) {\n if (enemyElapsed> (1500 - newPlayer.getScore()/4))\n\n //CHANGE THIS YOU PLEB!!!!\n if (thirdEnemy.size() == 0) {\n thirdEnemy.add(new thirdShip(BitmapFactory.decodeResource(getResources(), R.drawable.longship), width + 10, (int) (rng.nextDouble() * (height - (maxBorderHeight * 2)) + maxBorderHeight), 31, 49, 45, 1));\n } else {\n thirdEnemy.add(new thirdShip(BitmapFactory.decodeResource(getResources(), R.drawable.longship), width + 10, (int) (rng.nextDouble() * (height - (maxBorderHeight * 2)) + maxBorderHeight), 31, 49, newPlayer.getScore()/4, 1));\n }\n\n //Reset Timer\n tertiaryTimer = System.nanoTime();\n }\n\n //Go through every enemy and collision will check if two game objects are colliding.\n for (int i = 0; i < enemy.size(); i++){\n enemy.get(i).update();\n if(collision(enemy.get(i), newPlayer)){\n enemy.remove(i);\n newPlayer.setRunning(false);\n break;\n }\n if (enemy.get(i).getX()<-100){\n enemy.remove(i);\n break;\n }\n }\n\n for (int i = 0; i < newEnemy.size(); i++) {\n newEnemy.get(i).update();\n if (collision(newEnemy.get(i), newPlayer)) {\n newEnemy.remove(i);\n newPlayer.setRunning(false);\n break;\n }\n if (newEnemy.get(i).getX() < -100) {\n newEnemy.remove(i);\n break;\n }\n }\n\n for (int i = 0; i < thirdEnemy.size(); i++) {\n thirdEnemy.get(i).update();\n if (collision(thirdEnemy.get(i), newPlayer)) {\n thirdEnemy.remove(i);\n newPlayer.setRunning(false);\n break;\n }\n if (thirdEnemy.get(i).getX() < -100) {\n thirdEnemy.remove(i);\n break;\n }\n }\n\n }\n else {\n //Reset the acceleration of the player, if not reset then the start death animation will occur and everything will reset\n newPlayer.resetAcceleration();\n if (!reset){\n gamenew = false;\n startDeath = System.nanoTime();\n reset = true;\n disappear = true;\n death = new deathAnimation(BitmapFactory.decodeResource(getResources(),R.drawable.damage), newPlayer.getX(),newPlayer.getY()-30,329,137,1);\n level = 1;\n }\n death.update();\n\n long timeElapsed = (System.nanoTime()-startDeath)/1000000;\n\n //If time has passed and there is no new game yet, then create a new game.\n if (timeElapsed > 2500 && !gamenew){\n newGame();\n }\n\n }\n }",
"public void tick() {\n\t\tmFrameCount++;\n\t\t\n\t\tif (mStopwatch.getElapsedTime() > 1000) {\n\t\t\tmFramesPerSecond = mFrameCount;\n\t\t\tmFrameCount = 0;\n\t\t\t\n\t\t\tmStopwatch.restart();\n\t\t}\n\t}",
"public abstract void update(float deltaTime);",
"public abstract void update(float deltaTime);"
] | [
"0.76569957",
"0.7622563",
"0.7322635",
"0.72036314",
"0.71564484",
"0.70850056",
"0.7039907",
"0.70009094",
"0.6959935",
"0.69314975",
"0.6872378",
"0.6813356",
"0.67761993",
"0.6766921",
"0.67569846",
"0.67489153",
"0.6725608",
"0.6720523",
"0.6720459",
"0.67022264",
"0.66988903",
"0.6686322",
"0.665136",
"0.664628",
"0.66461694",
"0.66383797",
"0.6636918",
"0.66176236",
"0.6613594",
"0.66132396",
"0.66109896",
"0.6596541",
"0.65752184",
"0.65637153",
"0.656041",
"0.6547775",
"0.65399975",
"0.6523338",
"0.6505572",
"0.6493223",
"0.6493135",
"0.6485827",
"0.6480773",
"0.64709014",
"0.64355564",
"0.6429106",
"0.64274937",
"0.6420717",
"0.64201045",
"0.6419628",
"0.64138514",
"0.63809264",
"0.6380343",
"0.6367841",
"0.6366924",
"0.63624",
"0.6359346",
"0.6355178",
"0.6349839",
"0.6347958",
"0.6329405",
"0.63283205",
"0.6325438",
"0.63240945",
"0.63209677",
"0.63172513",
"0.63146657",
"0.63099015",
"0.6291295",
"0.62581754",
"0.62580353",
"0.62556756",
"0.62526053",
"0.62326515",
"0.6229347",
"0.62284285",
"0.6217864",
"0.6211308",
"0.6210675",
"0.6206631",
"0.6205134",
"0.61934245",
"0.6189292",
"0.6188869",
"0.6180865",
"0.6164122",
"0.6161999",
"0.61547303",
"0.6147812",
"0.6147748",
"0.61425847",
"0.613786",
"0.61321026",
"0.61242074",
"0.61217505",
"0.61152345",
"0.6114508",
"0.6111602",
"0.61099184",
"0.6109557",
"0.6109557"
] | 0.0 | -1 |
This method check if the this sprite(frog) has intersected with other object | public void CheckIntersect(boolean intersectCar, boolean intersectWater, long now) {
if(intersectCar)
frogDeath(now, "car");
if(intersectWater)
frogDeath(now, "water");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isIntersecting(GameObject other){\n if(other.isSolid()&&this.solid){\n return RectF.intersects(other.getHitBox(),this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }\n return false;\n }",
"public boolean intersects(BaseGameObject other) {\r\n return (other.getPosx() - this.getPosx())\r\n * (other.getPosx() - this.getPosx())\r\n + (other.getPosy() - this.getPosy())\r\n * (other.getPosy() - this.getPosy())\r\n < (other.bound + this.bound) * (other.bound + this.bound);\r\n }",
"public boolean collidesWith(GameObject other) {\n me.setBounds((int) x, (int) y, sprite.getWidth(), sprite.getHeight());\n him.setBounds((int) other.x, (int) other.y, other.sprite.getWidth(), other.sprite.getHeight());\n\n return me.intersects(him);\n }",
"public boolean collidesWith(SpriteBase otherSprite) {\r\n boolean toReturn = false;\r\n\r\n if (distTo(otherSprite.x, x) < collideSize && distTo(otherSprite.y,y) < collideSize){\r\n toReturn = true;\r\n }\r\n\r\n return (toReturn);\r\n }",
"@Override\n public boolean isTouching(Sprite other)\n {\n return Rect.intersects(other.spriteBounds, this.spriteBounds);\n }",
"public boolean contactsSprite(Sprite other) {\r\n\t\treturn bb.intersects(other.getBoundingBox());\r\n\t}",
"public boolean isIntersecting(RectF other){\n return RectF.intersects(other,this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }",
"public abstract boolean collisionWith(CollisionObject obj);",
"@Override\n public <T extends VectorSprite> boolean collide(T object1, GraphicsObject object2) {\n double xDistance, yDistance;\n\n xDistance = this.getHitCenterX() + object1.getRadius() / 2 - Math.max(object2.getxPos(), Math.min(this.getHitCenterX() + object1.getRadius() / 2, object2.getxPos() + object2.getWidth()));\n yDistance = this.getHitCenterY() + object1.getRadius() / 2 - Math.max(object2.getyPos(), Math.min(this.getHitCenterY() + object1.getRadius() / 2, object2.getyPos() + object2.getHeight()));\n\n return (xDistance * xDistance + yDistance * yDistance) < (object1.getRadius() / 2 * object1.getRadius() / 2);\n }",
"@Override\n public boolean isCollided(gameObject obj){\n return Rect.intersects(obj.getastRect(), getRectplayer1())||\n Rect.intersects(obj.getastRect(), getRectplayer2()) ||\n Rect.intersects(obj.getastRect(), getRectplayer3()) ||\n Rect.intersects(obj.getastRect(), getRectplayer4());\n }",
"@Override\n public void checkCollision( Sprite obj )\n {\n \n }",
"public boolean collidesWith(ICollider other);",
"public boolean intersects(OnScreenObject other) {\r\n if (other == null) {\r\n return false;\r\n }\r\n Rectangle r1 = getRectangle();\r\n Rectangle r2 = other.getRectangle();\r\n\r\n return r1.intersects(r2);\r\n }",
"@Override\n public void checkCollision( Sprite obj )\n {\n\n }",
"public abstract boolean overlap(Catcher catcher, FallingObject object);",
"boolean insideSprite(Sprite s){\n if (s._hitbox.length == 1) {\n if (_hitbox.length == 1) {\n return PVector.dist(s._getCenter(),this._getCenter()) <\n s._hitbox[0].x - this._hitbox[0].x;\n }\n return _insideCirc(_getPoints(), s._getCenter(), s._hitbox[0].x);\n }\n if (s._hitbox.length == 1) {\n // TODO: check if center is in middle but NOT touching any side\n // (will want to adapt existing _circPoly to separate side-touching\n // code into individual method)\n return false;\n }\n return _insidePts(this._getPoints(), s._getPoints());\n }",
"private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }",
"private boolean collision1() {\n return game.racket1.getBounds1().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }",
"public boolean isColliding(){\n for(int i = 0; i < eng.getIDManager().getObjectsWithID(\"GameObject\").size(); i++){\n GameObject temp = eng.getIDManager().getObjectsWithID(\"GameObject\").get(i);\n \n if(temp.getHitBox().getBounds().intersects(rect.getBounds()) &&\n temp.getHitBox() != this){\n currentCollidingObject = temp;\n return true;\n }\n }\n \n return false;\n }",
"public boolean collision(Objet o) {\r\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic boolean collidesWith(GameObject otherObject) {\n\t\tboolean result = false;\n\t\tdouble thisCenterX = this.getX();\n\t\tdouble thisCenterY = this.getY();\n\n\t\tdouble otherCenterX = (otherObject).getX();\n\t\tdouble otherCenterY = (otherObject).getY();\n\n\t\tdouble dx = thisCenterX - otherCenterX;\n\t\tdouble dy = thisCenterY - otherCenterY;\n\n\t\tdouble distBetweenCentersSqr = (dx * dx + dy * dy);\n\n\t\tint thisRadius= this.getSize() / 2;\n\t\t\n\t\tint otherRadius;\n\t\t\n\t\tif(otherObject instanceof Base) {\n\t\t\totherRadius= (otherObject).getSize();\n\t\t}else {\n\t\t\totherRadius= (otherObject).getSize() / 2;\n\t\t}\n\n\t\tint radiiSqr= (thisRadius * thisRadius + 2 * thisRadius * otherRadius + otherRadius * otherRadius);\n\n\t\tif (distBetweenCentersSqr <= radiiSqr) { result = true ; }\n\n\t\treturn result;\n\t}",
"@Override\r\n\tpublic boolean collides (Entity other)\r\n\t{\r\n\t\tif (other == owner || other instanceof Missile)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn super.collides(other);\r\n\t}",
"private boolean collides(GameObject gameObject1) {\n return collides(gameObject1, 0.5);\n }",
"public boolean hasCollidedWith(InteractiveObject obj){\n\t\tif (obj == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn (leftCollision(obj) || rightCollision(obj));\n\t\t}\n\t}",
"private boolean collision2() {\n return game.racket2.getBounds2().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }",
"public boolean intersecta(Base obj) {\n return getPerimetro().intersects(obj.getPerimetro());\n }",
"public boolean collision(Object a, Object b) {\n if (Rect.intersects(a.getRect(), b.getRect())) { //if the two objects hitboxes colide\n return true;\n }\n return false;\n }",
"void checkCollision(Entity other);",
"public boolean isOver(VisibleThing other) {\n // checks each of the false conditions for the other's image not being over our current image\n // returns false if each of these conditions fails, true otherwise\n\n if (other == null) {\n return false;\n }\n if ((other.x > (this.x + this.image.width))) {\n return false;\n }\n\n if ((other.x + other.image.width) < this.x) {\n return false;\n }\n\n if (other.y > (this.y + this.image.height)) {\n return false;\n }\n\n if ((other.y + other.image.height) < this.y) {\n return false;\n }\n\n return true;\n\n\n }",
"public boolean isCollition(Sprite sprite2) {\n if (this.x < sprite2.getX() + sprite2.getAncho() &&\n this.x + this.ancho > sprite2.getX() &&\n this.y + this.alto > sprite2.getY() &&\n this.y < sprite2.getY() + sprite2.getAlto()) {\n return true;\n\n } else {\n return false;\n }\n\n }",
"public void collideWith(Rigidbody obj) {\n\t\t\r\n\t}",
"@Override\n\tpublic boolean hasCollide(Entity e) {\n\t\treturn rect.intersects(e.getRectangle());\n\t}",
"public abstract void collide(InteractiveObject obj);",
"public void collision(){\r\n\t\tif(currX < 0 || currX > 1000-width || currY < 0 || currY > 700-height){\r\n\t\t\tinGame=false;\r\n\t\t}\r\n\t\t/*\r\n\t\tI start at 1 because tail[0] will constantly be taking the position\r\n\t\tof the snake's head, so if i start at 0, the game would end immediately.\r\n\t\t*/\r\n\t\tfor(int i=1; i < numOranges; i++){\r\n\t\t\tRectangle currOrangeRect = new Rectangle(tail[i].getXcoords(), tail[i].getYcoords(), OrangeModel.getWidth(), OrangeModel.getHeight());\r\n\t\t\tif(new Rectangle(currX, currY, width, height).intersects(currOrangeRect)){\r\n\t\t\t\tinGame=false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"boolean touchingSprite(Sprite s) {\n if (s._hitbox.length == 1) {\n if (_hitbox.length == 1) {\n return PVector.dist(this._getCenter(), s._getCenter()) <= \n this._hitbox[0].x + s._hitbox[0].x;\n }\n return _circPoly(s._getCenter(), s._hitbox[0].x, this._getPoints());\n }\n if (_hitbox.length == 1) {\n return _circPoly(this._getCenter(), this._hitbox[0].x, s._getPoints());\n }\n \n PVector[] s1Points = s._getPoints();\n PVector[] s2Points = this._getPoints();\n \n for(int i = 0; i < s1Points.length; i++) {\n PVector a = s1Points[i], b = s1Points[(i+1)%s1Points.length];\n for(int j = 0; j < s2Points.length; j++) {\n PVector c = s2Points[j], d = s2Points[(j+1)%s2Points.length];\n \n // sprites touch if ab crosses cd\n if(_clockwise(a, c, d) != _clockwise(b, c, d) && // a & b on different sides of cd, and\n _clockwise(a, b, c) != _clockwise(a, b, d)) { // c & d on different sides of ab\n return true;\n }\n }\n }\n \n return _insidePts(s1Points,s2Points) || _insidePts(s2Points,s1Points);\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 }",
"@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}",
"private void checkForCollisionWithSelf() {\r\n if (isInSnake(snake[0].row,snake[0].column,true)) {\r\n gameOver();\r\n }\r\n }",
"public boolean intersects(Obstacle v){\n \treturn box.intersects(v.getBox()); \t\r\n }",
"public boolean intersects(BoundingBox other) {\r\n\t\treturn !(other.left > getRight()\r\n\t\t\t || other.getRight() < left\r\n\t\t\t || other.top > getBottom()\r\n\t\t\t || other.getBottom() < top);\r\n\t}",
"public void checkCollision(Actor a) {\r\n\t\tif (a.equals(this))\r\n\t\t\treturn;\r\n\r\n\t\tPolygon otherPoly = a.basePoly;\r\n\t\tint distance = 1;\r\n\r\n\t\tif (otherPoly != null && basePoly != null) {\r\n\t\t\t// Calculate distance using the formula x^2 + y^2 = z^2\r\n\t\t\tint x = otherPoly.getBounds().x - basePoly.getBounds().x;\r\n\t\t\tint y = otherPoly.getBounds().y - basePoly.getBounds().y;\r\n\t\t\tdistance = (int) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\r\n\t\t}\r\n\t\tif (distance > 150 || a instanceof Particle)\r\n\t\t\treturn;\r\n\r\n\t\tfor (int i = 0; i < basePoly.npoints; i++) {\r\n\t\t\tif (otherPoly.contains(new Point(basePoly.xpoints[i],\r\n\t\t\t\t\tbasePoly.ypoints[i]))) {\r\n\t\t\t\tonCollision(a);\r\n\t\t\t\ta.onCollision(a);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean hasCollided(GameObject object1, GameObject object2){\n Position pos1 = object1.getPos();\n Position pos2 = object2.getPos();\n int object1Width = object1.getWidth();\n int object2Width = object2.getWidth();\n if(object1Width < 0){\n pos1.setX(pos1.getX()+object1Width);\n object1Width = Math.abs(object1Width);\n }\n if(object2Width < 0){\n pos2.setX(pos2.getX()+object2Width);\n object2Width = Math.abs(object2Width);\n }\n\n return(!(pos1.getX()+object1Width<pos2.getX()\n //Checks if the object is on either side of the other. If it is not, it is inside.\n || pos1.getY()>pos2.getY()+object2.getHeight()\n || pos1.getY() + object1.getHeight()<pos2.getY()\n || pos1.getX()>pos2.getX()+object2Width));\n }",
"public boolean intersects(Shape other) {\n boolean result = false;\n ArrayList<Vector3D> points = getPoints();\n for (Vector3D point : points) {\n if (other.contains(point)) {\n if (other.contains(point)) {\n if (other.contains(point)) {\n System.out.println(this.part.name + \" contains \" + other.part.name + \" : \" + point);\n\n result = true;\n }\n }\n }\n }\n\n points = other.getPoints();\n for (Vector3D point : points) {\n if (this.contains(point)) {\n if (this.contains(point)) {\n if (this.contains(point)) {\n System.out.println(this.part.name + \" contains \" + other.part.name + \" : \" + point);\n\n result = true;\n }\n }\n }\n }\n\n return result;\n }",
"public boolean collides (){\n if(shipX<=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=40 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n else if(shipX<=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=60 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n return false;\n }",
"public void isIntersects(WorldObject worldObject) {\n Area areaFromThisObject = new Area(this.getShape());\n Area areaFromWorldObject = new Area(worldObject.getShape());\n areaFromThisObject.intersect(areaFromWorldObject);\n this.collided = !areaFromThisObject.isEmpty();\n }",
"public boolean isWithinObject(int x, int y)\n {\n if( x > coX-Xsize/2 &&\n x < coX+Xsize/2 &&\n y > coY-Ysize/2 &&\n y < coY+Ysize/2 )\n return true;\n else\n return false;\n }",
"public boolean collides(Rectangle player) {\r\n return player.overlaps(boundsTop) || player.overlaps(boundsBot);\r\n }",
"boolean intersects( Geometry gmo );",
"private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}",
"public boolean hitObject(BasicObject obj){\n if(abs(obj.posX - posX) < obj.wid/ 2 && abs(obj.posY - posY) < obj.hei/ 2){\n return true;\n }\n else{\n return false;\n }\n }",
"public abstract boolean collide(int x, int y, int z, int dim, Entity entity);",
"private void collision(GameObjectContainer<GameObject> object) {\n \tGameObject renderObject = null;\r\n\t\tfor (int i = 0; i < object.getSize(); i++) {\r\n\t\t\trenderObject = object.iterator().next();\r\n\r\n\t\t\tif (renderObject.getType() == \"BLOCK\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"intersected\");\r\n\t\t\t\t\tthis.setTranslateY(renderObject.getTranslateY() - renderObject.getHeight());\r\n\t\t\t\t\tfalling = false;\r\n\t\t\t\t\tjump = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfalling = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (renderObject.getType() == \"NURSE\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"nurse\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}else {\r\n\t\t\t\tfalling = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n }",
"protected boolean isColliding() {\n\t\treturn phxService.isColliding(this);\n\t}",
"public boolean isCollision(Ball ob) { // Kollisionsabfrage\r\n\t\t\r\n\t\tdX = posX - ob.getPosX();\r\n\t\tdY = posY - ob.getPosY();\r\n\t\tfloat vector = dX * dX + dY * dY;\r\n\t\tfloat hypo = radius * radius * 4;\r\n\t\tif (hypo >= vector) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"protected boolean intersects(Circle2D other) {\n\t\treturn intersects(other.x, other.y, other.diameter);\n\t}",
"public boolean checkHit(Rectangle r){\n\t\t\tif (exists){\n\t\t\t\tif(this.intersects(r) || this.contains(r)){\n\t\t\t\t\thealth -= 1; //reduces the curret health\n\t\t\t\t\tif (health == 0) {\n\t\t\t\t\t\texists = false;\n\t\t\t\t\t\tstartboomtimer = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tstartredtimer = true; //starts the red animation\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse return false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public boolean overlapsWith()\r\n\t{\r\n\t\tboolean alive = false;\r\n\t\tfor (Platforms platform : platforms)\r\n\t\t{\r\n\t\t\tif (getAvatar().getX() == platform.getX() && getAvatar().getY() == platform.getY())\r\n\t\t\t{\r\n\t\t\t\talive = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn alive;\r\n\t}",
"void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }",
"public boolean areIntersecting() {\n return intersection != null;\n }",
"private boolean detectCollisions(GameState mGaemState,ArrayList<GameObject> objects,SoundEngine se,ParticleSystem ps){\n boolean playerHit = false;\n for (GameObject go1:objects){\n if (go1.checkActive()){\n //the 1st object is active\n //so worth checking\n\n for (GameObject go2:objects){\n if (go2.checkActive()){\n //the 2nd object is active\n //so worth checking\n if (RectF.intersects(go1.getTransform().getCollider(),go2.getTransform().getCollider())){\n\n //switch goes here\n //there has been a collision\n //but does it matter?\n switch (go1.getTag() + \" with \" + go2.getTag()){\n case \"Player with Alien Laser\":\n playerHit = true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player with Alien\":\n playerHit =true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player Laser with Alien\":\n mGaemState.increaseScore();\n //respawn the alien\n ps.emitParticles(new PointF(go2.getTransform().getLocation().x,go2.getTransform().getLocation().y));\n go2.setInactive();\n go2.spawn(objects.get(Level.PLAYER_INDEX).getTransform());\n go1.setInactive();\n se.playAlienExplode();\n\n break;\n\n default:\n break;\n }\n\n }\n }\n }\n }\n }\n return playerHit;\n }",
"public boolean isInSpriteBoundingBox(double x, double y) {\n\t\tfor (Sprite s:objects) {\n\t\t\tif (s.getBoundingBox().intersects(new Point(x, y)))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean intersects(Entity other) {\n return other.getBoundary().intersects(this.getBoundary());\n }",
"public abstract void collideWith(Entity entity);",
"private boolean isColliding(Node node1, Node node2){\n\t\tfinal int offset = 2;\n\t\tBounds bounds1 = node1.getBoundsInParent();\n\t\tBounds bounds2 = node2.getBoundsInParent();\n\t\tbounds1 = new BoundingBox(bounds1.getMinX() + offset, bounds1.getMinY() + offset,\n\t\t\t\tbounds1.getWidth() - offset * 2, bounds1.getHeight() - offset * 2);\n\t\tbounds2 = new BoundingBox(bounds2.getMinX() + offset, bounds2.getMinY() + offset,\n\t\t\t\tbounds2.getWidth() - offset * 2, bounds2.getHeight() - offset * 2);\n\t\treturn bounds1.intersects(bounds2);\n\t}",
"public void checkCollisions(int xH, int yH) {\n Rectangle r1 = new Rectangle(xH, yH, 50, 50);\n Rectangle r2 = new Rectangle(zombie.x, zombie.y, 50, 50);\n if (r1.intersects(r2)) {\n zombieWins = true; \n }\n }",
"public boolean collidePoint(float mX, float mY){\n return super.shape.contains(mX,mY);\n }",
"private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"public boolean collision(GameObject initial, GameObject secondary){\n\n if (Rect.intersects(initial.getHitbox(),secondary.getHitbox())){\n MediaPlayer myplayer = MediaPlayer.create(getContext(), R.raw.robloxdeath);\n myplayer.start();\n return true;\n }\n return false;\n\n }",
"@Override\r\n\tpublic boolean collidesWith(ICollider obj) {\r\n\t\tGameObject go = (GameObject) obj;\r\n\t\t// find the centers\r\n\t\tdouble thisCenterX = this.getPointX();\r\n\t\tdouble thisCenterY = this.getPointY();\r\n\r\n\t\tdouble otherCenterX = 0;\r\n\t\tdouble otherCenterY = 0;\r\n\t\tif (go instanceof Asteroid) {\r\n\t\t\totherCenterX = go.getPointX() + go.getObjectSize() / 2;\r\n\t\t\totherCenterY = go.getPointY() + go.getObjectSize() / 2;\r\n\t\t} else if (go instanceof NonPlayerShip) {\r\n\t\t\totherCenterX = go.getPointX();\r\n\t\t\totherCenterY = go.getPointY();\r\n\t\t} else if (go instanceof PlayerShip) {\r\n\t\t\totherCenterX = go.getPointX();\r\n\t\t\totherCenterY = go.getPointY() - 11.667;\r\n\t\t} else if (go instanceof Missile) {\r\n\t\t\totherCenterX = go.getPointX();\r\n\t\t\totherCenterY = go.getPointY();\r\n\t\t}else if(go instanceof Curve) {\r\n\t\t\totherCenterX=((Curve) go).getCurveCenterX();\r\n\t\t\totherCenterY=((Curve) go).getCurveCenterY();\r\n\t\t}\r\n\r\n\t\t// find distance between centers\r\n\t\tdouble dx = thisCenterX - otherCenterX;\r\n\t\tdouble dy = thisCenterY - otherCenterY;\r\n\t\tdouble disBetCentSqr = dx * dx + dy * dy;\r\n\r\n\t\t// find square of sum of radii\r\n\t\tdouble thisRadius = getObjectSize() * 4;\r\n\t\tdouble otherRadius = 0;\r\n\t\tif (go instanceof Asteroid) {\r\n\t\t\totherRadius = go.getObjectSize() / 2;\r\n\t\t} else if (go instanceof NonPlayerShip) {\r\n\t\t\totherRadius = go.getObjectSize() * 4;\r\n\t\t} else if (go instanceof PlayerShip) {\r\n\t\t\totherRadius = 41.667;\r\n\t\t} else if (go instanceof SpaceStation) {\r\n\t\t\totherRadius = 30;\r\n\t\t} else if (go instanceof Missile) {\r\n\t\t\tMissile m=(Missile)go;\r\n\t\t\tif(m.getMissileFlag()==0) {\r\n\t\t\t\totherRadius=21;\r\n\t\t\t}else {\r\n\t\t\t\totherRadius=10;\r\n\t\t\t}\r\n\t\t}else if(go instanceof Curve) {\r\n\t\t\totherRadius=((Curve) go).getCurveRadius();\r\n\t\t}\r\n\t\tdouble radiiSqr = thisRadius * thisRadius + 2 * thisRadius * otherRadius + otherRadius * otherRadius;\r\n\r\n\t\tif (disBetCentSqr <= radiiSqr) {\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}",
"@Override\n public boolean canMove(double x, double y) {\n double xRec=rectangle.getX();\n double yRec=rectangle.getY();\n rectangle.setLocation((int)(xRec+x*1),(int)(yRec+y*1));\n\n List<Rectangle> staticRectangles= board.getStaticRectangles();\n List<Creature> creatures=board.getCreatures();\n Iterator<Rectangle> itr1=staticRectangles.iterator();\n\n while(itr1.hasNext()){\n Rectangle tmpRectangle =itr1.next();\n if(rectangle.intersects(tmpRectangle)) {\n return false;\n }\n }\n Iterator<Creature> itr2=creatures.iterator();\n while(itr2.hasNext()){\n Creature creature=itr2.next();\n if(creature==this){\n continue;\n }\n else{\n if(rectangle.intersects(creature.getRectangle()))\n return false;\n }\n\n }\n\n return true;\n }",
"public void detectCollisions(){\n\t\tfor(int i = 0; i < pScene.getNumOf(); i++){\n\t\t\tEntity a = pScene.getObject(i);\n\t\t\tif (!a.isAlive())\n\t\t\t\tcontinue;\n\t\t\tfor(int j = i + 1; j < pScene.getNumOf(); j++){\n\t\t\t\tEntity b = pScene.getObject(j);\n\t\t\t\tif(a.intersects(b)&&(!(a.getStatic()&&b.getStatic()))){\n\t\t\t\t\tsManifolds.add(new Manifold(a,b)); // For regular objects\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void checkCollision(Box box){\r\n if(collidingEntity2!=null && collidingEntity2!=box){\r\n return;\r\n }\r\n FloatRect x = box.getRect ();\r\n\r\n if (rect1==null || x==null){\r\n return;\r\n }\r\n\r\n FloatRect ins = rect1.intersection (x);\r\n\r\n if(ins!=null) {\r\n this.collidingEntity2= box;\r\n collide=true;\r\n checkTopCollision (x);\r\n if(collidedTop==false) {\r\n checkRightCollision (x);\r\n checkLeftCollision (x);\r\n }\r\n } else {\r\n noCollision ();\r\n }\r\n }",
"private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY());\r\n\t\tGObject bottomRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tif(topLeft == player || bottomLeft == player || topRight == player || bottomRight == player) {\r\n\t\t\tremove(fireball1);\r\n\t\t\tfireball1 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}",
"public void checkCollision() {}",
"public boolean intersect(Unit collidee) {\n if (collidee instanceof Qix) {\n Qix qix = (Qix) collidee;\n return qix.intersect(this);\n }\n Rectangle colliderR = this.toRectangle();\n // subtract one from width&height to make collisions look more real\n Rectangle collideeR = collidee.toRectangle();\n\n if (colliderR.intersects(collideeR)) {\n\n LOGGER.log(Level.WARNING, this.toString() + \" collided with \" + collidee.toString() + \" at (\" + this.getX()\n + \",\" + this.getY() + \")\", this.getClass());\n\n return true;\n }\n return false;\n }",
"public boolean colidesWith(Weapon w){\n\t\tthis.setBounds((int) x, (int)y, Tile.size, Tile.size);\n\t\tRectangle weapon = new Rectangle();\n\t\tweapon.setBounds((int)w.getX(), (int)w.getX(), (int)w.getWidth(), (int)w.getHeight());\n\t\treturn this.intersects(weapon);\n\t}",
"public boolean overlap(Circle other) {\r\n\t\t// implementation not shown\r\n\t}",
"protected void onCollision(Actor other) {\r\n\r\n\t}",
"public boolean collidesWith(double x, double y) {\n\t\tdouble leftBound = owner.getX() + this.offsetX - (width/2);\n\t\tdouble upBound = owner.getY() + this.offsetY - (height/2);\n\t\treturn x <= leftBound + width && x >= leftBound && y <= upBound + height && y >= upBound;\n\t}",
"public abstract boolean hit(Rectangle2D r);",
"public boolean isColliding(String id){\n\n \n for(int i = 0; i < eng.getIDManager().getObjectsWithID(id).size(); i++){\n GameObject temp = eng.getIDManager().getObjectsWithID(id).get(i);\n if(temp.getHitBox().getBounds().intersects(rect.getBounds()) && temp.getHitBox() != this){\n currentCollidingObject = temp;\n return true;\n }\n }\n \n return false;\n }",
"public boolean intersecta(ObjetoMapa o) {\n\t\tRectangle r1 = getRectangulo();\n\t\tRectangle r2 = o.getRectangulo();\n\t\t\n\t\treturn r1.intersects(r2);\n\t}",
"public void checkCollision() {\n\t\tfor(SolidObject i : solidObjects) {\r\n\t\t\tif(getBounds().intersects(i.getBounds())) {\r\n\t\t\t\t//Increments the KillCount\r\n\t\t\t\tif(i.onAttack(damage, flipped)) {\r\n\t\t\t\t\tkillCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean collides(Ball ball) //collision detection\n {\n if( ( position.y+height ) > ball.getPosY()-8 )\n {\n if( position.y+10 < ( ball.getPosY()-8 ) )\n {\n if(\n !((\n (ball.getPosX()-12 < ( position.x)+width ) &&\n (ball.getPosX()+12 < (position.x+width) ) &&\n (ball.getPosX()-12 < position.x ) &&\n (ball.getPosX()+12 < position.x )\n )||\n (\n (ball.getPosX()-12 > ( position.x+width )) &&\n (ball.getPosX()+12 > (position.x+width) ) &&\n (ball.getPosX()-12 > ( position.x )) &&\n (ball.getPosX()+12 > position.x )\n ))\n ){return true;}\n }\n\n }\n\n return false;\n\n /*\n if(position.y > (ball.getPosY() - 77 ) ) //should be ball.getheight\n {\n\n return Intersector.overlaps(ball.getCircle(), rect);\n }\n */\n\n }",
"public boolean collides(Ball b)\n\t{\n\t\tdouble dx = b.xPosition - xPosition;\n\t\tdouble dy = b.yPosition - yPosition;\n\t\tdouble distance = Math.sqrt(dx*dx+dy*dy);\n\n\t\treturn distance < size/2 + b.size/2;\n\t}",
"@Override\n\tpublic boolean intersects(Rectangle2D arg0) {\n\t\treturn false;\n\t}",
"private boolean leftCollision(InteractiveObject obj){\n\t\treturn leftUpCollision(obj) || leftDownCollision(obj);\n\t}",
"public void checkTopCollision(FloatRect x){\r\n if((int)rect1.top<= (int)x.top-x.height ){\r\n collide=true;\r\n collidedTop=true;\r\n }\r\n }",
"private boolean isObjectABrick(GObject collider) {\n return collider != null;\n }",
"public boolean collidepoint(float mX, float mY){\n return super.shape.contains(mX, mY);\n //return isPressed;\n }",
"private boolean collide(Ship ship, Ship[] ships) {\n for (Ship s : ships) {\n if (collide(s, ship)) return true;\n }\n return false;\n }",
"public boolean collides(MovingEntity s) {\n\t\tif (_shape != null && s.getShape() != null) \n\t\t\treturn _shape.collides(s.getShape());\n\t\treturn false;\n\t}",
"private void checkCollision(Graphics g) {\n\t\t// collision detection for the tanks\n\t\tGraphics2D g2d = (Graphics2D) g.create();\n\t\tRectangle heroRectangle = hero.getBounds();\n\t\tRectangle hero2Rectangle = computer.getBounds();\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\t// hero1 --------------------\n\t\tAffineTransform at = g2d.getTransform();\n\t\tg2d.setTransform(at);\n\t\tat.rotate(Math.toRadians(hero.getAngle()), hero.getX() + hero.getImageWidth() / 2,\n\t\t\t\thero.getY() + hero.getImageHeight() / 2);\n\t\tGeneralPath heroPath = new GeneralPath();\n\t\theroPath.append(heroRectangle.getPathIterator(at), true);\n\t\tArea heroArea = new Area(heroPath);\n\n\t\t// hero2 ------------------------------\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tat.rotate(Math.toRadians(computer.getAngle()), computer.getX() + computer.getImageWidth() / 2,\n\t\t\t\tcomputer.getY() + computer.getImageHeight() / 2);\n\t\tGeneralPath hero2Path = new GeneralPath();\n\t\thero2Path.append(hero2Rectangle.getPathIterator(at), true);\n\t\tArea hero2Area = new Area(hero2Path);\n\n\t\t// tank1 -- tank2 collision\n\t\thero2Area.intersect(heroArea);\n\t\tif (!hero2Area.isEmpty()) {\n\t\t\tplay(\"tank-tank.wav\");\n\t\t\tposxt2 = computer.getX();\n\t\t\tposyt2 = computer.getY();\n\t\t\tposyt1 = hero.getY();\n\t\t\tposxt1 = hero.getX();\n\t\t\t\n\t\t\texplodet2 = true;\n\t\t\texplodet1 = true;\n\t\t\tg2d.setColor(Color.RED);\n\t\t\tg2d.fill(heroArea);\n\t\t\tcomputer.spawnGenerator();\n\t\t\twhile (getValidRespawnPosition((int) computer.getX(), (int) computer.getY(), computer.getImageWidth(),\n\t\t\t\t\tcomputer.getImageHeight())) {\n\t\t\t\tcomputer.spawnGenerator();\n\t\t\t}\n\n\t\t\thero.spawnGenerator();\n\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\thero.spawnGenerator();\n\t\t\t}\n\t\t}\n\n\t\t// tank2 -- tank1 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m = heroMissiles.get(i);\n\t\t\tRectangle tank1BulletRect = m.getBounds();\n\t\t\tGeneralPath tank1BulletPath = new GeneralPath();\n\t\t\ttank1BulletPath.append(tank1BulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tank1BulletArea = new Area(tank1BulletPath);\n\t\t\thero2Area.intersect(tank1BulletArea);\n\t\t\tif (!hero2Area.isEmpty()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposxt2 = computer.getX();\n\t\t\t\tposyt2 = computer.getY();\n\t\t\t\texplodet2 = true;\n\t\t\t\tif (computer.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp1score++;\n\t\t\t\t\tcomputer.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) computer.getX(), (int) computer.getY(),\n\t\t\t\t\t\t\tcomputer.getImageWidth(), computer.getImageHeight())) {\n\t\t\t\t\t\tcomputer.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\theroMissiles.remove(i);\n\t\t\t\tcomputer.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// tank1 -- tank1 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tRectangle tankBulletRect = m1.getBounds();\n\t\t\tGeneralPath tankBulletPath = new GeneralPath();\n\t\t\ttankBulletPath.append(tankBulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tankBulletArea = new Area(tankBulletPath);\n\t\t\theroArea.intersect(tankBulletArea);\n\t\t\tif (!heroArea.isEmpty() && m1.isReflected()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposyt1 = hero.getY();\n\t\t\t\tposxt1 = hero.getX();\n\t\t\t\texplodet1 = true;\n\t\t\t\tif (hero.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp2score++;\n\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\theroMissiles.remove(i);\n\t\t\t\thero.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\n\t\t// tank1 -- tank2 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tRectangle tank2BulletRect = m1.getBounds();\n\t\t\tGeneralPath tank2BulletPath = new GeneralPath();\n\t\t\ttank2BulletPath.append(tank2BulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tank2BulletArea = new Area(tank2BulletPath);\n\t\t\theroArea.intersect(tank2BulletArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposyt1 = hero.getY();\n\t\t\t\tposxt1 = hero.getX();\n\t\t\t\texplodet1 = true;\n\t\t\t\tif (hero.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp2score++;\n\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thero2Missile.remove(i);\n\t\t\t\thero.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\n\t\t// tank1 -- powerup collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < powerupArray.size(); i++) {\n\t\t\tRectangle powerupRectangle = (powerupArray.get(i)).getBounds();\n\t\t\tGeneralPath powerupPath = new GeneralPath();\n\t\t\tpowerupPath.append(powerupRectangle.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea powerupArea = new Area(powerupPath);\n\t\t\theroArea.intersect(powerupArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\tplay(\"powerup.wav\");\n\t\t\t\tif ((powerupArray.get(i)).getPowerupType() == 5) {\n\t\t\t\t\thero.setIndex(1);\n\t\t\t\t}\n\t\t\t\tint powerupType = (powerupArray.get(i)).getPowerupType();\n\t\t\t\thero.setCurrentPowerup(powerupType);\n\t\t\t\tpowerupArray.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t// tank2 -- powerup collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < powerupArray.size(); i++) {\n\t\t\tRectangle powerupRectangle = (powerupArray.get(i)).getBounds();\n\t\t\tGeneralPath powerupPath = new GeneralPath();\n\t\t\tpowerupPath.append(powerupRectangle.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea powerupArea = new Area(powerupPath);\n\t\t\thero2Area.intersect(powerupArea);\n\t\t\tif (!hero2Area.isEmpty()) {\n\t\t\t\tplay(\"powerup.wav\");\n\t\t\t\tint powerupType = (powerupArray.get(i)).getPowerupType();\n\t\t\t\tcomputer.setCurrentPowerup(powerupType);\n\t\t\t\tpowerupArray.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t// tank 1 and wall collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (Wall w : wallArray) {\n\t\t\tRectangle wallRect = w.getBounds();\n\t\t\tGeneralPath wallPath = new GeneralPath();\n\t\t\twallPath.append(wallRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea wallArea = new Area(wallPath);\n\t\t\theroArea.intersect(wallArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\thero.setX(hero.getPrevX());\n\t\t\t\thero.setY(hero.getPrevY());\n\t\t\t}\n\t\t}\n\t}",
"private void checkCollisions() {\n float x = pacman.getPos().x;\n float y = pacman.getPos().y;\n\n GameEntity e;\n for (Iterator<GameEntity> i = entities.iterator(); i.hasNext(); ) {\n e = i.next();\n // auf kollision mit spielfigur pruefen\n if (Math.sqrt((x - e.getPos().x) * (x - e.getPos().x) + (y - e.getPos().y) * (y - e.getPos().y)) < 0.5f)\n if (e.collide(this, pacman))\n i.remove();\n }\n }",
"private void checkPlayerCollisions() {\r\n\t\tGObject left = getElementAt(player.getX() - 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tGObject right = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tif(dragon1 != null && (left == dragon1 || right == dragon1)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t\tif(dragon2 != null && (left == dragon2 || right == dragon2)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}",
"private void handleCollisions(Sprite sprite1, Sprite sprite2){\n\t\tif(!sprite1.isActive() || !sprite2.isActive()) return;\n\n\t\tif(sprite1.equals(sprite2)){\n\t\t\treturn;\n\t\t}\n\n\t\tBounds boundsSprite1 = renderSprite(sprite1).getChildren().get(0).getBoundsInParent();\n\t\tBounds boundsSprite2 = (renderSprite(sprite2).getChildren().get(0).getBoundsInParent());\n\n\t\tif(boundsSprite1.intersects(boundsSprite2)) {\n\t\t\tcollisionHandler.handleCollide(sprite1, sprite2);\n\t\t}\n\n\t}",
"public boolean isHit(Collideable otherCol){\n return this.collideable.getHitX() - otherCol.getHitX() < 50\n && this.collideable.getHitX() - otherCol.getHitX() > -50\n && this.collideable.getHitY() - otherCol.getHitY() > -30\n && this.collideable.getHitY() - otherCol.getHitY() < 30;\n }",
"private boolean isNotColliding(double x, double y, double z, double p_179926_7_) {\n\t\t\tdouble d0 = (x - this.parentEntity.posX) / p_179926_7_;\n\t\t\tdouble d1 = (y - this.parentEntity.posY) / p_179926_7_;\n\t\t\tdouble d2 = (z - this.parentEntity.posZ) / p_179926_7_;\n\t\t\tAxisAlignedBB axisalignedbb = this.parentEntity.getEntityBoundingBox();\n\n\t\t\tfor (int i = 1; (double)i < p_179926_7_; ++i) {\n\t\t\t\taxisalignedbb = axisalignedbb.offset(d0, d1, d2);\n\n\t\t\t\tif (!this.parentEntity.world.getCollisionBoxes(this.parentEntity, axisalignedbb).isEmpty()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}",
"@Override\n\tpublic boolean collidesWithRectangle(Rectangle rectangle) {\n\t\treturn false;\n\t}",
"private boolean isObjectAPaddle(GObject collider) {\n return (collider == paddle);\n }",
"public boolean playerCollide(Player player) {\n return RectF.intersects(new RectF(this.rect), player.getRect());\n }"
] | [
"0.77678156",
"0.7451469",
"0.742569",
"0.73156726",
"0.73071253",
"0.7292519",
"0.72765267",
"0.72224593",
"0.71936154",
"0.7086726",
"0.7033293",
"0.6994861",
"0.6993341",
"0.6963451",
"0.694705",
"0.6942861",
"0.6936319",
"0.689588",
"0.6884441",
"0.68836623",
"0.6840082",
"0.6834671",
"0.68204767",
"0.6807717",
"0.67483526",
"0.6737757",
"0.6711643",
"0.6700561",
"0.6650667",
"0.663264",
"0.65888906",
"0.6586101",
"0.658049",
"0.65720665",
"0.6557261",
"0.6538749",
"0.6510644",
"0.65039504",
"0.64952487",
"0.6487567",
"0.64763016",
"0.6443414",
"0.64192396",
"0.64167356",
"0.6407164",
"0.6405112",
"0.63854504",
"0.6373136",
"0.63710666",
"0.636365",
"0.6342552",
"0.63389313",
"0.6331901",
"0.63317835",
"0.6330901",
"0.6299132",
"0.6298689",
"0.62974834",
"0.6292722",
"0.62912375",
"0.628745",
"0.62821186",
"0.6281119",
"0.62800634",
"0.62782377",
"0.62603384",
"0.6254185",
"0.62496513",
"0.6244562",
"0.6235496",
"0.6229868",
"0.62282646",
"0.6222847",
"0.62168926",
"0.6215055",
"0.6211528",
"0.61976266",
"0.61952436",
"0.6177815",
"0.61744636",
"0.6174313",
"0.6173648",
"0.6171796",
"0.616665",
"0.6164939",
"0.6164094",
"0.6163622",
"0.61613125",
"0.6159863",
"0.6158555",
"0.6153768",
"0.61460847",
"0.6145547",
"0.61381406",
"0.6134948",
"0.6134746",
"0.61331993",
"0.6132751",
"0.61305636",
"0.612987",
"0.6123278"
] | 0.0 | -1 |
check if the player has achieved the objectives | public boolean getStop() {
return end == 5;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean checkIfPlayerHoldsExplosive () { return noOfExplosives > 0; }",
"private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }",
"public boolean isAchieved(){\n\t\treturn achieved;\n\t}",
"public boolean checkToProceed(){\n return getGame().getCurrentPlayer().getRemainingActions() > 0;\n }",
"public boolean avengersAlive() {\n\t\tif (avengersHp <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private void checkVictory()\n {\n if(throne.getEnemyHealth() <= 0)\n {\n System.out.println(\"Congrats! The land is now free from all chaos and destruction. You are now very rich and wealthy. Yay\");\n alive = false;\n }\n }",
"public boolean activeInvincibilityFrames(Graphics g) {\n if (damageTaken) { // will be converted to if (player is damaged)\n frameCount++;\n if (frameCount % 2 == 0) {\n playerHead.draw(g);\n super.draw(g);\n }\n if (frameCount > 50) {\n damageTaken = false;\n frameCount = 0;\n }\n return true;\n } else {\n playerHead.draw(g);\n super.draw(g);\n return false;\n }\n }",
"private boolean didPlayerWin() {\r\n for (int i = 0; i < targets.length; i++) {\r\n if (targets[i].getHitPoints() != 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}",
"public boolean isAlive(){\n if(this.hp <= 0){\n return false;\n }\n else{\n return true;\n }\n }",
"boolean hasPlayerBag();",
"public void playerHasInvincibility() {\n\t\tthis.state = canBeKilled;\n\t}",
"public boolean completed(){\n return !activeAttackers() && !attackersLeft();\n }",
"private boolean checkPoints() {\n\n for (Map.Entry pair : playersAgentsMap.entrySet()) {\n ArrayList<IAgent> iAgentList = (ArrayList<IAgent>) pair.getValue();\n\n int points = 0;\n try {\n points = iPlayerList.get(iAgentList.get(0).getName()).getPoints();\n } catch (RemoteException ex) {\n Logger.getLogger(ServerFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n try {\n for (Component comp : playerList.getComponents()) {\n if (comp instanceof PlayerPanel) {\n PlayerPanel panel = (PlayerPanel) comp;\n if (panel.getName().equals(iAgentList.get(0).getName())) {\n panel.setPlayerPoints(points);\n }\n }\n\n }\n } catch (RemoteException e1) {\n e1.printStackTrace();\n }\n if (points >= targetAmount) {\n try {\n System.out.println(iAgentList.get(0).getName() + \" has won with \" + points + \" points\");\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return false;\n }\n }\n\n return true;\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 boolean isVisionary(EntityPlayer player);",
"public Boolean gameIsOver(){\n\n if(playerShipDead || enemyShipDead){\n if(enemyShipDead && !(deathTriggered)){\n deathTriggered = true;\n playerScore += scoreToGain; //This will depend on the enemyShip's score amount. Only affects the display.\n playerGoldAmount += goldToGain;\n //playerShip.setPointsWorth(playerScore); // Doesn't work.\n }\n return true;\n } else {\n return false;\n }\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 boolean amIWinning(){\n if (playerScore > oppoScore) {\n return true;\n } else {\n return false;\n }\n }",
"boolean isGameComplete();",
"public boolean isAlive(){\r\n if (currHP > 0){\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean taken() {\n return pawn.getLives() != 0;\n }",
"public void checkIfAlive()\n {\n if(this.health<=0)\n {\n targetable=false;\n monstersWalkDistanceX=0;\n monstersWalkDistanceY=0;\n this.health=0;\n new TextureChanger(this,0);\n isSelected=false;\n if(monsterType==1)\n {\n visible=false;\n }\n if(gaveResource==false) {\n int gameResource = Board.gameResources.getGameResources();\n Board.gameResources.setGameResources(gameResource + resourceReward);\n gaveResource=true;\n }\n }\n }",
"public int isSafe(){\n int nbEnnemies = 0;\n List<Player> players = state.getPlayers();\n Player currentPlayer = state.getCurrentPlayer();\n for(Player p : players){\n if(!p.equals(currentPlayer)) {\n nbEnnemies += currentPlayerReachable(state.getCurrentPlayer(), p);\n //nbEnnemies += manhattan(currentPlayer, p); //naive version\n }\n }\n return nbEnnemies;\n }",
"public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }",
"public boolean isTurnOngoing() {\n int numEntitiesWithActions = 0;\n for (Entity entity : entitiesInCombat) {\n if (entity.canAct()) {\n numEntitiesWithActions++;\n }\n }\n return numEntitiesWithActions > 0;\n }",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"boolean isSetObjectives();",
"public void checkAchievements() {\n \t\tif (duration >= 1000*Achievements.LOCAL_SLOW_LONG_TIME) {\n \t\t\tAchievements.unlockLocalAchievement(Achievements.localSlowLongTime);\n \t\t}\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 }",
"public boolean isPlayerDefeated() {\n if (player.getHealth() <= 0) {\n return true;\n }\n return false;\n }",
"private boolean playerDetection() {\n\t\tAxisAlignedBB axisalignedbb = new AxisAlignedBB(posX, posY, posZ, posX + 1, posY + 1, posZ + 1).grow(DETECTION_RANGE);\n\t\tList<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);\n\n\t\treturn !list.isEmpty();\n\t}",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal();",
"@Override\n\tpublic boolean isComplete() {\n\t\tif (this.defeated == this.totalEnemies)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public boolean noLives()\r\n\t{\r\n\t\treturn Avatar.getLives() <= 0;\r\n\t}",
"public boolean successfulHit(CreatureAttack attack, Creature attacked){\r\n return attack.attacker.attributes.health.accuracy.next() >= attacked.attributes.health.evasion.next();\r\n }",
"public int canPoseBombAndStillBeSafe() {\n Player currentPlayer = state.getCurrentPlayer();\n List<Player> players = state.getPlayers();\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n for (Player p : players) {\n if (!p.equals(currentPlayer)) {\n if (canBombThisEnemyAndRunSafe(currentPlayer,p)) {\n return 1;\n }\n }\n }\n return 0;\n }",
"public boolean goalAchieve(LoopManiaWorld world) {\n return world.getDoggieKilledValue() >= this.doggie;\n }",
"public boolean isAlive() {\r\n\t\treturn hp > 0;\r\n\t}",
"public void isStillInCombat() {\n isInCombat = enemiesInCombat.size() > 0;\n }",
"public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }",
"private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }",
"public void checkHits() {\n\t\t// your code here\n\t\tfor (int i = 0; i < enemyX.length; i++) {\n\t\t\tif (distance((int)xI, (int)yI, enemyX[i], enemyY[i]) <= DIAM_ENEMY/2 + DIAM_LAUNCHER/2) {\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }",
"public boolean Lost()\n {\n return this.numLives <= 0;\n }",
"public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }",
"boolean isGameSpedUp();",
"public boolean gameContinue() {\n for (Player player : players) {\n if (player.getPoints() > END_GAME_POINTS) {\n return false;\n }\n }\n return true;\n }",
"public abstract void isUsedBy(Player player);",
"public boolean getAchieved() {\n return this.achieved;\n }",
"public void allPlayerLivesAreGone() {\n\t\t\n\t\t// If player01 has 0 lives..\n\t\tif(player01.getPlayerLives() == 0){\n\t\t\t\n\t\t\t// Invoke.\n\t\t\tplayer02.incrementNumberOfGamesWon();\n\t\t\t\n\t\t\t// Display message.\n\t\t\tSystem.out.println(\"Player 01 has no more lives left.\");\n\t\t\tSystem.out.println(\"------------------------\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Player 02 wins the game!\");\n\t\t\tSystem.out.println(\"Well done Player 02!\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"------------------------\");\n\n\t\t\t// If player02 has 0 lives..\n\t\t} else {\n\t\t\t\n\t\t\tplayer01.incrementNumberOfGamesWon();\n\n\t\t\tSystem.out.println(\"Player 02 has no more lives left.\");\n\t\t\tSystem.out.println(\"------------------------\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Player 01 wins the game!\");\n\t\t\tSystem.out.println(\"Well done Player 01!\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"------------------------\");\n\t\t}\t\t\n\t}",
"boolean hasMinExperience();",
"public boolean isGoal() {\n return hamming == 0;\n }",
"public void checkHealth()\n {\n if(player.getHealth() <= 0)\n {\n System.out.println(\"\\n\" + \"You are dead :(\" + \"\\n\");\n alive = false;\n }\n }",
"public boolean isGoal() {\n\t\treturn hamming == 0;\n\t}",
"public static boolean checkVictory(){\n\t\tboolean victory = true;\n\t\t\n\t\tfor (int i = 0; i < enemyList.length && victory; i++) {\n\t\t\tif (enemyList[i].isAlive()) {\n\t\t\t\tvictory = false;\n\t\t\t}\n\t\t}\n\t\treturn victory;\n\t}",
"public boolean inRange(){\n //System.out.println(\"inRange\");\n return Math.abs(GameView.instance.player.position.x - creationPoint.x) < GameView.instance.cameraSize * attackRange;\n }",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"public synchronized boolean HaveWon() {\n if (maxScore <= score) {\n return true;\n }\n return false;\n }",
"public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}",
"boolean isGoalReached(ExerciseSessionData data);",
"@Override\n public void checkWonLost(Entity entity) {\n if (entity instanceof Player) {\n\n if (overallCoinsInGame <= 0) {\n world.won();\n }\n }\n }",
"boolean hasGemReward();",
"boolean hasMaxExperience();",
"public void action(Player myPlayer)\n {\n if (getNbUtilisation() == 0) {\n System.out.println(\"Not possible\");\n } else {\n int nHealthy = getPointsHealthy();\n myPlayer.addLifePoints(nHealthy);\n\n }\n }",
"public boolean isGameWon(){\r\n for(Card c: this.cards){\r\n if (c.getFace() == false){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"boolean hasActivePokemon();",
"@Override\n\tprotected boolean isFinished() {\n\t\tif (!stoppable) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t// return Robot.elevator.getLevel() == Level.Bottom;\n\t\t\treturn (Robot.elevator.getLevel() == Level.Bottom && v < 0.0) || (Robot.elevator.getLevel() == Level.Top && v > 0.0);\n\t\t}\n\t}",
"protected abstract boolean isPlayerActivatable(PlayerSimple player);",
"public abstract boolean isPossible(Player p);",
"public boolean poison() {\r\n\t\tstrength = 0;\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean isFinished() {\n// return false;\n return LightningMath.epsilonEqual(shooter.getFlywheelMotor1Velocity(), shooter.motor1setpoint, Constants.FLYWHEEL_EPSILON) &&\n LightningMath.epsilonEqual(shooter.getFlywheelMotor2Velocity(), shooter.motor2setpoint, Constants.FLYWHEEL_EPSILON) &&\n LightningMath.epsilonEqual(shooter.getFlywheelMotor3Velocity(), shooter.motor3setpoint, Constants.FLYWHEEL_EPSILON);\n }",
"public void checkBehavior() {\n\t\tif (behaviorStage == 1) {\n\t\t\tif (screen.score >= 100) {\n\t\t\t\tshow();\n\t\t\t}\n\t\t\tif (active) {\n\t\t\t\tif (health <= maxHealth / 2f) {\n\t\t\t\t\tleave();\n\t\t\t\t\tbehaviorStage = 2;\n\t\t\t\t}\n\t\t\t\tif (screen.score < 100) {\n\t\t\t\t\tleave();\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (behaviorStage == 2) {\n\t\t\tif (screen.score >= 200) {\n\t\t\t\tshow();\n\t\t\t}\n\t\t\tif (active) {\n\t\t\t\tif (screen.score < 200) {\n\t\t\t\t\tleave();\n\t\t\t\t}\n\t\t\t\tif (health <= 0) {\n\t\t\t\t\tleave();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean isGoal() {\n return humming() = 0;\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 }",
"float shouldAggroOnHit(IGeneticMob geneticMob, EntityLiving attacker);",
"public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}",
"public boolean isAlive(){\n\t\treturn lifeForce > 0;\n\t}",
"public boolean shouldExecute() {\n LivingEntity livingentity = ShulkerEntity.this.getAttackTarget();\n if (livingentity != null && livingentity.isAlive()) {\n return ShulkerEntity.this.world.getDifficulty() != Difficulty.PEACEFUL;\n } else {\n return false;\n }\n }",
"boolean isPlayableInGame();",
"public boolean continueGame(){\n for (Player p : super.getPlayers()) {\n // check if p is dead\n if (p.isDead()) {\n return false;\n }\n }\n return true;\n }",
"public boolean isAlive() {\r\n return (lives() > 0);\r\n }",
"@Override\n public boolean isAlive() {\n return health > 0f;\n }",
"public boolean hasFainted() {\n return hp <= 0;\n }",
"private boolean shouldBecomeCombatEngineer() {\r\n\t\tdouble machineUnitsCount = this.getNumberOfMachineUnits();\r\n\t\tdouble combatEngineers = this.informationStorage.getWorkerConfig().getTotalCombatEngineerCount();\r\n\r\n\t\treturn combatEngineers / machineUnitsCount <= this.combatEngineerTriggerPercentageEnroll;\r\n\t}",
"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 }",
"@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}",
"@Override\n public boolean gameOver() {\n return player1Wins() || player2Wins();\n }",
"public boolean alive() {\r\n\t\treturn myHP > 0;\r\n\t}",
"void object_calculations_doesnt_touch_ground(){\n if(angle_with_ground>0&&down_angle>0&&up_angle<0)\n object_on_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle<0&&up_angle<0)\n object_upper_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle>0&&up_angle>0)\n object_below_eyes_level_calc();\n }"
] | [
"0.7303071",
"0.7069867",
"0.68497133",
"0.6785094",
"0.67638475",
"0.6731815",
"0.6649283",
"0.66449046",
"0.66347814",
"0.65772194",
"0.6531889",
"0.6514382",
"0.65075207",
"0.6497888",
"0.64934385",
"0.64922684",
"0.6487405",
"0.6464523",
"0.64511836",
"0.64410704",
"0.64343995",
"0.6433054",
"0.6429904",
"0.64224374",
"0.6398759",
"0.63981944",
"0.6397321",
"0.63908625",
"0.63869196",
"0.638431",
"0.63754004",
"0.6350352",
"0.63494486",
"0.63403314",
"0.63403314",
"0.63403314",
"0.63403314",
"0.63403314",
"0.63403314",
"0.63377273",
"0.6335798",
"0.6330311",
"0.6329721",
"0.6325503",
"0.6305621",
"0.6305552",
"0.628678",
"0.6267796",
"0.62666786",
"0.6261529",
"0.6259551",
"0.6254645",
"0.62533134",
"0.6234371",
"0.6232177",
"0.6230592",
"0.6230036",
"0.6228015",
"0.6215187",
"0.62141865",
"0.6202985",
"0.61722624",
"0.61709005",
"0.6168452",
"0.6155008",
"0.6155008",
"0.6155008",
"0.6155008",
"0.6155008",
"0.6144462",
"0.61436003",
"0.61282533",
"0.61230713",
"0.6121403",
"0.6120884",
"0.6114721",
"0.6112563",
"0.61113423",
"0.6107265",
"0.6103824",
"0.6101567",
"0.6100559",
"0.6099341",
"0.6097341",
"0.6095325",
"0.60901016",
"0.6089016",
"0.6088422",
"0.60868555",
"0.6086851",
"0.6085995",
"0.6085023",
"0.60794234",
"0.60786575",
"0.60695803",
"0.6063164",
"0.60624623",
"0.60597366",
"0.60515106",
"0.6049235",
"0.6047287"
] | 0.0 | -1 |
Get the points of the player | public int getPoints() {
return points;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getPoints ( Player player );",
"public int getPlayPoints() {\n return localPlayPoints;\n }",
"int getPoints();",
"public int getPointsP() {\r\n\r\n pointsP = getPointsPlayer() + getPointsPlayer2();\r\n\r\n if (pointsP >= 10) {\r\n pointsP -= 10;\r\n }\r\n return pointsP;\r\n }",
"public int getPoints() {\n return this.points;\n }",
"public int getPoints();",
"public int getPoints(){\r\n\t\treturn this.points;\r\n\t}",
"public int getPoints(){\r\n\t\treturn this.points;\r\n\t}",
"public int getPoints() {\n return points;\n }",
"public int getPoints() {\n return points;\n }",
"public int getPoints() {\n return points;\n }",
"public int getPoints() {\n return points;\n }",
"public PlayerStart[] getPlayerStartingPoints() {\n if(mPlayerStartList == null) {\n generate();\n }\n return mPlayerStartList;\n }",
"public List<Vector2f> getPlayerStartPositions() {\n \n List<Vector2f> list = new ArrayList();\n PlayerStart[] points = getPlayerStartingPoints();\n \n if(points == null || points.length <= 0) {\n return list;\n }\n \n for(int i = 0; i < points.length; i++) {\n PlayerStart p = points[i];\n list.add(new Vector2f( p.x, p.y ));\n }\n \n return list;\n \n }",
"public int getPoints() { return points; }",
"public int getPoints(){\n\t\t//add the player socres(including monster killing, powerUp points and winning points\n\t\tint points = this.player.getScore() + 200*this.player.getHealth();\n\t\t\n\t\t//since the better the less time used, we use 600 seconds to minus the total seconds being used\n\t\t//and add it to the points\n\t\t//600 seconds is 10 minutes, which is definity long enough\n\t\t//if exceeds 10 minutes, we will subtract total score\n\t\tif(this.player.win()){\t//only if the player wins will we calculate the time\n\t\t\tpoints += (int)(3600 - (this.time / 1000000000));\n\t\t}\n\t\t\n\t\tthis.totalLabel.setText(String.valueOf(points));\t//set the value of the JLabel\n\t\t\n\t\treturn points;\n\t\t\n\t}",
"public double getPoints()\r\n {\r\n return points;\r\n }",
"public Integer getPointsForPlayer(String playerName) {\r\n if (!points.containsKey(playerName))\r\n return null;\r\n return points.get(playerName);\r\n }",
"public int getPoints() {\r\n\t\treturn points;\r\n\t}",
"public int getPoints() {\r\n\t\treturn this.points;\r\n\r\n\t}",
"public int getPoints() {\n\t\treturn this.points;\n\t}",
"MazePoint getActivePlayerCoordinates();",
"public Integer getPoints() {\r\n return points;\r\n }",
"public int getPoints() {\r\n\t\treturn levelManager.getPoints();\r\n\t}",
"protected int getExperiencePoints(EntityPlayer player)\n {\n return super.getExperiencePoints(player);\n }",
"protected int getExperiencePoints(PlayerEntity player) {\n return super.getExperiencePoints(player);\n }",
"public int getPlayerOnePoints() {\n if (gameStatus == null) return -1;\n return gameStatus.getPlayerOnePoints();\n }",
"@Override\r\n\tpublic int getPoints() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn this.points;\r\n\t}",
"public List<SpawnPoint> getSpawnPoints(){\n return spawnPoints;\n }",
"public List<Integer> getGamePoints() {\n return gamePoints;\n }",
"private void getPoints()\n\t{\n\t\ttotalEntered = statsCollector.getTotalEnteredPoints();\n\t\taverageWait = statsCollector.getAverageWaitPoints();\n\t\tmaxWait = statsCollector.getMaxWaitPoints();\n\t\ttimeAlive = statsCollector.getTimeAlivePoints();\n\t}",
"public String getPoints();",
"public Vecteur[] getPoints() {\n Vecteur[] points = {this.OA, this.OB};\n return points;\n }",
"public List<Point> getPoints() {\n return pointRepository.findAll()//\n .stream() //\n .sorted((p1, p2) -> Integer.compare(p1.getPosition(), p2.getPosition()))//\n .collect(Collectors.toList());\n }",
"public List<Point3D> getPoints() {\n return mPoints;\n }",
"public int getPoints(int[] details) throws RemoteException {\n return sd.getGames().get(details[0]).getPlayerPoints(details[1]);\n }",
"public Point getXyLocation() {\n return playerxy;\n }",
"public LiveData<Integer> getPoints() {\n Log.d(\"berttest\", \"getPoints works\");\n return points;\n }",
"public int getP2Points() {\n return p2Points;\n }",
"public int getPointsP2() {\r\n\r\n pointsP2 = pointsP + getPointsPlayer3();\r\n\r\n if (pointsP2 >= 10) {\r\n pointsP2 -= 10;\r\n }\r\n return pointsP2;\r\n }",
"PVector[] _getPoints() {\n PVector cen = _getCenter();\n \n PVector[] points = new PVector[_hitbox.length];\n float angle = _rotVector.heading();\n for(int i = 0; i < _hitbox.length; i++) {\n points[i] = new PVector(_hitbox[i].x, _hitbox[i].y);\n points[i].rotate(angle);\n points[i].x += cen.x;\n points[i].y += cen.y;\n }\n return points;\n }",
"@Override\n public int getPoints(){\n\n }",
"public int getPlayerTwoPoints() {\n if (gameStatus == null) return -1;\n return gameStatus.getPlayerTwoPoints();\n }",
"@NotNull\n public Vector2D[] getPts() {\n return pts;\n }",
"public PointsInfo[] getPointsInfo() {\n return pointsInfo;\n }",
"public ChunkCoordinates getPlayerCoordinates()\n {\n return new ChunkCoordinates(0, 0, 0);\n }",
"public java.math.BigDecimal getPoints() {\n return this.points;\n }",
"public abstract int getPoints();",
"private List<Player> calculatePoints()\n\t{\n\t\tthis.systemDataInput.printMessage(\"Calculating points...\");\n\t\t\n\t\tArrayList<Player> winningPlayers = new ArrayList<Player>();\n\t\tint maxPoints = 0;\n\t\tint maxBuilding = 0;\n\t\t\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\tint points = 0;\n\t\t\tint bestBuilding = 0;\n\t\t\t\n\t\t\tfor(Area area : board.getAreaList())\n\t\t\t{\n\t\t\t\tif (!area.hasDemon())\n\t\t\t\t{\n\t\t\t\t\tif (area.hasBuilding(player))\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints += area.getCost();\n\t\t\t\t\t\tif (area.getCost() > bestBuilding)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbestBuilding = area.getCost();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpoints += 5 * area.getMinionList(player).size();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint playerMoney = player.getMoneyAmount();\n\t\t\tpoints += playerMoney;\n\t\t\t\n\t\t\tfor(Card card : player.getInFrontOfHimDeck())\n\t\t\t{\n\t\t\t\tfor(Action action : card.getActions(BorrowMoneyFromTheBank.class))\n\t\t\t\t{\n\t\t\t\t\tint moneyToPayBack = ((BorrowMoneyFromTheBank)action).getMoneyToPayBack();\n\t\t\t\t\tif (playerMoney >= moneyToPayBack)\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= moneyToPayBack;\n\t\t\t\t\t\tplayerMoney -= moneyToPayBack;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpoints -= ((BorrowMoneyFromTheBank)action).getPointsToLose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tplayer.addPoints(points);\n\t\t\tplayer.getDataInput().printMessage(points + \" points\");\n\t\t\t\n\t\t\tif (points > maxPoints || (points == maxPoints && bestBuilding > maxBuilding))\n\t\t\t{\n\t\t\t\tmaxPoints = points;\n\t\t\t\tmaxBuilding = bestBuilding;\n\t\t\t\twinningPlayers.clear();\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t\telse if (points == maxPoints && bestBuilding == maxBuilding)\n\t\t\t{\n\t\t\t\twinningPlayers.add(player);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn winningPlayers;\n\t}",
"public int getPoints()\n {\n return (10000 - this.points);\n }",
"public Point[] getPoints()\n {\n return getPointsForAlignment(this);\n }",
"final public int getPoints() {\r\n\t\tif (wildcard) {\r\n\t\t\treturn 20;\r\n\t\t}\r\n\t\t\r\n\t\tif (isJoker()) {\t\t\t\r\n\t\t\treturn 50;\r\n\t\t}\r\n\t\t\r\n\t\treturn face;\r\n\t}",
"public int getP1Points() {\n return p1Points;\n }",
"int getNeedPoints();",
"Float getTotalPoints();",
"public int getPilotPoints() {\n\n return this.pilotPoints;\n }",
"public int points() {\n\t\treturn cards[0].points() + cards[1].points() + cards[2].points();\n\t}",
"public int getPoints() {\n return this.difficulty;\n }",
"public int differencePoints(){\n return player1Score - player2Score;\n }",
"public int getOtherPlayerPoints(int[] details) throws RemoteException {\n if (details[1] == 1) {\n return sd.getGames().get(details[0]).getPlayerPoints(0);\n }\n return sd.getGames().get(details[0]).getPlayerPoints(1);\n }",
"public int getPlayerPosition(int player)\n {\n return players[player];\n }",
"public Player[] getPlayers()\r\n\t{\r\n\t\treturn this.players;\r\n\t}",
"public Player[] getPlayers() {\n return this.players;\n }",
"public Player[] getPlayers() {\n return this.players;\n }",
"public int getPointsFor() {\n int pointsFor = 0;\n for (Game g : gameList) {\n pointsFor += g.getTeamScore(this);\n }\n return pointsFor;\n }",
"public float[] getLocation() {\n return llpoints;\n }",
"public ArrayList<Point> getAllPoints() {\n return allPoints;\n }",
"public Point getPlayerStart() {\r\n\t\treturn this.playerStart;\r\n\t}",
"public Point getPos(){\n return new Point(getUserFriendlyXPos(),getUserFriendlyYPos());\n }",
"public int returnPoints()\n {\n return score ;\n }",
"int getRemainPoints();",
"public void countAllPoints() {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.points = PointCounter.countPoint(player.clientCards);\n\t\t\tview.writeLog(player.name+\" : \"+player.points);\n\t\t}\n\t}",
"public Player[] getPlayers() {\r\n return players;\r\n }",
"public PlayerPoints(Player owner) {\n this.owner = owner;\n }",
"public void updatePlayerPoints() {\n setText(Integer.toString(owner.getPlayerPoints()) + \" points\");\n }",
"public Player[] getPlayers() {\n return players;\n }",
"public Player[] getPlayers()\n\t{\n\t\treturn players;\n\t}",
"public Position[] getWinningPositions();",
"public ArrayList<Integer> getXPlayers() {\n return this.xPlayers;\n }",
"int getUsedPoints();",
"int getUsedPoints();",
"int getUsedPoints();",
"public Point2D[] getGivenPoints(){ \n return this.points; \n }",
"@JsonIgnore\r\n public int getPoints(){\r\n int lPoints = 0;\r\n for (CFantasyTeamByWeek lFantasyTeamByWeek : mFantasyTeamsByWeek){\r\n lPoints += lFantasyTeamByWeek.getPoints();\r\n }\r\n return lPoints;\r\n }",
"public int getPoints(String name) {\n int points = 0;\n ArrayList<IAgent> iAgentList = playersAgentsMap.get(name);\n for (Iterator<IAgent> iterator2 = iAgentList.iterator(); iterator2.hasNext();) {\n IAgent iAgent = iterator2.next();\n try {\n points = points + iAgent.getPoints();\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }\n return points;\n }",
"public int getPlayerX() {\n return playerX;\n }",
"@java.lang.Override\n public double getPlayerLng() {\n return playerLng_;\n }",
"public int getPoint(){\n return point;\n }",
"public int getFighterPoints() {\n\n return this.fighterPoints;\n }",
"public int getCurrentPlayerRealPosition();",
"java.util.List<com.google.ads.googleads.v6.common.CpvBidSimulationPoint> \n getPointsList();",
"public double getPrayerPoints() {\r\n return prayerPoints;\r\n }",
"public final int getHitPoints () {\n return this.currentHitPoints;\n }",
"public List<Player> getPlayers() {\r\n return players;\r\n }",
"public List<Player> getPlayers() {\r\n return players;\r\n }",
"public ArrayList<Entity> getPlayers() {\n ArrayList<Entity> players = new ArrayList<>();\n students.forEach(student -> players.add(student.getPlayer()));\n return players;\n }",
"@java.lang.Override\n public double getPlayerLat() {\n return playerLat_;\n }",
"public double getPoint() {\r\n return point;\r\n }",
"public double getPoint() {\r\n return point;\r\n }",
"public Integer getPoint() {\n return point;\n }"
] | [
"0.8072532",
"0.7291605",
"0.7255843",
"0.7204441",
"0.71293527",
"0.7128984",
"0.7113684",
"0.7113684",
"0.7105069",
"0.7105069",
"0.7105069",
"0.7105069",
"0.7103077",
"0.7070905",
"0.70576316",
"0.70497924",
"0.703608",
"0.6977547",
"0.6976483",
"0.69721854",
"0.69668484",
"0.6954913",
"0.6932869",
"0.6927676",
"0.6911749",
"0.68918073",
"0.688652",
"0.68492246",
"0.683899",
"0.68116826",
"0.6787832",
"0.67796445",
"0.67512095",
"0.67034",
"0.66855264",
"0.66843337",
"0.6676018",
"0.6649847",
"0.6618744",
"0.66064",
"0.65889037",
"0.6587766",
"0.65836793",
"0.657792",
"0.6568843",
"0.65687275",
"0.65542847",
"0.6550918",
"0.6537954",
"0.6525345",
"0.6520407",
"0.65178716",
"0.6488205",
"0.6469131",
"0.6460025",
"0.64584297",
"0.6452333",
"0.6443492",
"0.6429566",
"0.63930935",
"0.6388916",
"0.63841385",
"0.6379451",
"0.6379451",
"0.63767856",
"0.63686335",
"0.6361551",
"0.63597393",
"0.6344362",
"0.6338103",
"0.6336512",
"0.63335806",
"0.6306462",
"0.6292935",
"0.62841105",
"0.6280888",
"0.6279791",
"0.6279164",
"0.6274384",
"0.62605137",
"0.62605137",
"0.62605137",
"0.6247187",
"0.62465036",
"0.6231759",
"0.62285286",
"0.6212241",
"0.62034494",
"0.62006724",
"0.6195924",
"0.619366",
"0.6189277",
"0.6186995",
"0.6186993",
"0.6186993",
"0.6167848",
"0.6165049",
"0.6162513",
"0.6162513",
"0.6154811"
] | 0.69393235 | 22 |
Check if player has used up sprite's lives | public boolean gameOver(){
return this.lives < 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int isSafe(){\n int nbEnnemies = 0;\n List<Player> players = state.getPlayers();\n Player currentPlayer = state.getCurrentPlayer();\n for(Player p : players){\n if(!p.equals(currentPlayer)) {\n nbEnnemies += currentPlayerReachable(state.getCurrentPlayer(), p);\n //nbEnnemies += manhattan(currentPlayer, p); //naive version\n }\n }\n return nbEnnemies;\n }",
"public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}",
"boolean isGameSpedUp();",
"public void checkIfAlive()\n {\n if(this.health<=0)\n {\n targetable=false;\n monstersWalkDistanceX=0;\n monstersWalkDistanceY=0;\n this.health=0;\n new TextureChanger(this,0);\n isSelected=false;\n if(monsterType==1)\n {\n visible=false;\n }\n if(gaveResource==false) {\n int gameResource = Board.gameResources.getGameResources();\n Board.gameResources.setGameResources(gameResource + resourceReward);\n gaveResource=true;\n }\n }\n }",
"public boolean taken() {\n return pawn.getLives() != 0;\n }",
"public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }",
"public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }",
"public boolean isAlive() {\r\n\t\treturn hp > 0;\r\n\t}",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"public boolean isAlive(){\r\n if (currHP > 0){\r\n return true;\r\n }\r\n return false;\r\n }",
"public void checkDeath()\n {\n if (player.getY() >= 549)\n {\n gameOver();\n }\n }",
"public void isShot() {\r\n\t\tlives -=1;\r\n\t\tif(isDead())\r\n\t\t{\r\n\t\t\tthis.erase();\r\n\t\t}\r\n\t}",
"private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }",
"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}",
"public boolean hasBeenSunk(){\n return this.lifePoints==0;\n\n }",
"public boolean isGameOver() {\n\t\treturn (lives <= 0);\n\t}",
"public boolean avatarAlive()\n\t{\n\t\treturn (avatar.getHitPoints() > 0);\n\t}",
"boolean playerExists() {\n return this.game.h != null;\n }",
"boolean GameOver() {\n\t\treturn player.isDead();\n\t}",
"public boolean checkIfPlayerHoldsExplosive () { return noOfExplosives > 0; }",
"public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}",
"public boolean isAlive(){\n if(this.hp <= 0){\n return false;\n }\n else{\n return true;\n }\n }",
"public void gameOver() {\n this.lives --;\n this.alive = false;\n }",
"public boolean isAlive() {\r\n return (lives() > 0);\r\n }",
"@Override\n public boolean isAlive() {\n return health > 0f;\n }",
"boolean allEnemyShipsAreDestroyed()\n\t{\n\t\tfor (int i = 0; i < targets.myShips.size(); i++) {\n\t\t\tif (targets.myShips.get(i).isAlive()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}",
"public void checkHealth()\n {\n if(player.getHealth() <= 0)\n {\n System.out.println(\"\\n\" + \"You are dead :(\" + \"\\n\");\n alive = false;\n }\n }",
"private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}",
"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 }",
"private boolean didPlayerWin() {\r\n for (int i = 0; i < targets.length; i++) {\r\n if (targets[i].getHitPoints() != 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private boolean hasEatenPowerUp() {\r\n if (snake[HEAD].row == powerUp.row && \r\n snake[HEAD].column == powerUp.column) { \r\n growSnake();\r\n newPowerUp();\r\n MainClass.totalPoints++;\r\n return true;\r\n }\r\n return false;\r\n }",
"public int nbEnemiesAlive(){\n return state.getPlayers().size()-1;\n }",
"private void checkVictory()\n {\n if(throne.getEnemyHealth() <= 0)\n {\n System.out.println(\"Congrats! The land is now free from all chaos and destruction. You are now very rich and wealthy. Yay\");\n alive = false;\n }\n }",
"private boolean playerDetection() {\n\t\tAxisAlignedBB axisalignedbb = new AxisAlignedBB(posX, posY, posZ, posX + 1, posY + 1, posZ + 1).grow(DETECTION_RANGE);\n\t\tList<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);\n\n\t\treturn !list.isEmpty();\n\t}",
"public boolean hasScannedEnemies()\n\t{\n\t\treturn (lastscanround == br.curRound && !needToScanEnemies);\n\t}",
"public void playerHasSword() {\n\t\tthis.state = canBeKilled;\n\t}",
"private void checkPlayerCollisions() {\r\n\t\tGObject left = getElementAt(player.getX() - 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tGObject right = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tif(dragon1 != null && (left == dragon1 || right == dragon1)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t\tif(dragon2 != null && (left == dragon2 || right == dragon2)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}",
"public int canPoseBombAndStillBeSafe() {\n Player currentPlayer = state.getCurrentPlayer();\n List<Player> players = state.getPlayers();\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n for (Player p : players) {\n if (!p.equals(currentPlayer)) {\n if (canBombThisEnemyAndRunSafe(currentPlayer,p)) {\n return 1;\n }\n }\n }\n return 0;\n }",
"private boolean checkNearbyVillagers() {\n\t\tIterator<Integer> it = sprites.keySet().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tSprite as = sprites.get(it.next());\n\t\t\tif (as instanceof Villager) {\n\t\t\t\tVillager v = (Villager) as;\n\t\t\t\tif (v.checkTalkable(player.pos, player.direction)) {\n\t\t\t\t\treturn executeTalkableVillager(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }",
"public boolean alive() {\r\n\t\treturn myHP > 0;\r\n\t}",
"public void playerHasInvincibility() {\n\t\tthis.state = canBeKilled;\n\t}",
"public boolean isAlive() {\r\n\t\treturn life > 0;\r\n\t}",
"public boolean inRange(){\n //System.out.println(\"inRange\");\n return Math.abs(GameView.instance.player.position.x - creationPoint.x) < GameView.instance.cameraSize * attackRange;\n }",
"boolean haveAnySpawn();",
"public boolean noLives()\r\n\t{\r\n\t\treturn Avatar.getLives() <= 0;\r\n\t}",
"@Override\n\tpublic boolean isUseableByPlayer(EntityPlayer player){\n\t return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64.0D;\n\t}",
"public boolean Lost()\n {\n return this.numLives <= 0;\n }",
"public boolean avengersAlive() {\n\t\tif (avengersHp <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean isOwnOccupied(int x, int y) {\n for (int i = 0; i < player.own.length; i++) {\n if (player.own[i].x == x && player.own[i].y == y) {\n //System.out.println(\"own occupied:\" + i);\n return true;\n }\n }\n return false;\n }",
"public void checkFirePlayer() {\n if (up > 0) {\r\n if (up == 1) {\r\n\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() - 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (up == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() - 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() - 100, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (down > 0) {\r\n if (down == 1) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() + 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n if (down == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() + 50, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY() + 100, 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (left > 0) {\r\n if (left == 1) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() - 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n if (left == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() - 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() - 100, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (right > 0) {\r\n if (right == 1) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() + 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n if (right == 2) {\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() + 50, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX() + 100, fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n //Controllo per il blocco di fuoco centrale\r\n if (CollisionsManager.checkPlayerSingleCollision(player, fire.getX(), fire.getY(), 50, 50)) {\r\n player.setLife(player.getLife() - 1);\r\n SoundManager.musicClipStart(SoundManager.lifeLostMusic());\r\n\r\n if (player.getLife() <= 0) {\r\n GameManager.GAME_OVER = true;\r\n }\r\n }\r\n\r\n }\r\n\r\n }",
"public abstract void isUsedBy(Player player);",
"void check_game_state() {\n // Game over\n if (lives <= 0){ // No lives left\n end_game();\n }\n for (Alien alien : aliens){ // Aliens reached bottom of screen\n if (alien.y_position + alien.alien_height >= ship.y_position) {\n end_game();\n break;\n }\n }\n\n // Empty board\n if (aliens.isEmpty()) { // All aliens defeated\n if (level < 3) { // Level up\n level_up();\n alien_setup();\n }\n else { // Victory\n end_game();\n }\n }\n }",
"public boolean playerShootCheck(int x, int y){\n\t\tif( opponentShips[x][y] != null ){\n\t\t\t\n\t\t\tif(opponentShips[x][y].isDestroyed()){\n\t\t\t\tint shipSize = opponentShips[x][y].getshipSize();\n\t\t\t\topponentShips[x][y] = null;\n\t\t\t\tthis.dmgLastRound = shipSize;\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\topponentShips[x][y] = null;\n\t\t\tthis.dmgLastRound = 0;\n\t\t\treturn true;\n\t\t}\n\t\telse this.dmgLastRound = -1;\n\t\treturn false;\n\t}",
"public boolean canSpawnMore() {\n for(int e: enemiesLeft) {\n if(e > 0) {\n return true;\n }\n }\n\n return false;\n }",
"public boolean isAlive(){\n\t\treturn lifeForce > 0;\n\t}",
"public boolean gameIsOver() {return revealedShips >= 4;}",
"public boolean activeInvincibilityFrames(Graphics g) {\n if (damageTaken) { // will be converted to if (player is damaged)\n frameCount++;\n if (frameCount % 2 == 0) {\n playerHead.draw(g);\n super.draw(g);\n }\n if (frameCount > 50) {\n damageTaken = false;\n frameCount = 0;\n }\n return true;\n } else {\n playerHead.draw(g);\n super.draw(g);\n return false;\n }\n }",
"protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }",
"private boolean usesies(ActivePokemon p) {\n boolean used = false;\n for (Stat stat : Stat.BATTLE_STATS) {\n if (p.getStage(stat) < 0) {\n p.getStages().setStage(stat, 0);\n used = true;\n }\n }\n return used;\n }",
"public boolean playerLoses(){\n return (curPlayerRow == curTrollRow && curPlayerCol == curTrollCol);\n }",
"public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }",
"boolean hasPlayerBag();",
"public static boolean checkVictory(){\n\t\tboolean victory = true;\n\t\t\n\t\tfor (int i = 0; i < enemyList.length && victory; i++) {\n\t\t\tif (enemyList[i].isAlive()) {\n\t\t\t\tvictory = false;\n\t\t\t}\n\t\t}\n\t\treturn victory;\n\t}",
"public boolean isAlive() {\n return health > 0;\n }",
"boolean allMyShipsAreDestroyed()\n\t{\n\t\tfor (int i = 0; i < board.myShips.size(); i++) {\n\t\t\tif (board.myShips.get(i).isAlive()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean isGameOver() {\n\t\treturn !( hasMoves( Seed.CROSS) || hasMoves( Seed.NOUGHT) );\r\n\t}",
"public boolean isOccupied(){\n \t\treturn occupiedSeconds > 0;\n \t}",
"public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}",
"public void checkHealth() {\n if (health == 0) {\n this.texture = new Texture (\"soggy-\" + tex + \".png\");\n }\n }",
"public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }",
"public void checkHits() {\n\t\t// your code here\n\t\tfor (int i = 0; i < enemyX.length; i++) {\n\t\t\tif (distance((int)xI, (int)yI, enemyX[i], enemyY[i]) <= DIAM_ENEMY/2 + DIAM_LAUNCHER/2) {\n\t\t\t}\n\t\t}\n\t}",
"public boolean playerWins(){\n return playerFoundTreasure(curPlayerRow, curPlayerCol);\n }",
"boolean hasActivePokemon();",
"public void checkWin() {\n if (rockList.isEmpty() && trackerRockList.isEmpty() && bigRockList.isEmpty() && bossRockList.isEmpty()) {\n if (ship.lives < 5) {\n ship.lives++;\n }\n Level++;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n }\n }",
"public void playerHasNoSword() {\n\t\tthis.state = cannotBeKilled;\n\t}",
"boolean isAlive(Unit unit);",
"public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }",
"private void checkBounds() {\n\t\t// checks to see if playerX is to the left of the left side of the display\n\t\tif (player.getX() < 0)\n\t\t\tplayer.setX(0);\n\t\t// checks to see if playerX is greater than the width of the display\n\t\tif (player.getX() > displayWidth - sprite.get(\"playerSprite\").getWidth())\n\t\t\tplayer.setX(displayWidth - sprite.get(\"playerSprite\").getWidth());\n\t\t// checks to see if playerY is lower than the bottom of the display\n\t\tif (player.getY() < 0)\n\t\t\tplayer.setY(0);\n\t\t// checks to see if playerY is greater than the height of the display\n\t\tif (player.getY() > displayHeight - sprite.get(\"playerSprite\").getHeight())\n\t\t\tplayer.setY(displayHeight - sprite.get(\"playerSprite\").getHeight());\n\t}",
"public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }",
"public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }",
"boolean isGameOver() {\n\t\treturn Hit;\n\t}",
"public void checkHealth(){\n if (this.getHealth() < this.initialHealth/2){\n this.setImgSrc(\"/students/footballstudent1.png\");\n this.getTile().setImage(\"/students/footballstudent1.png\");\n }\n }",
"private boolean isGameOver() {\n\t\tfor (int i = 0; i < this.board.getHeight(); i++) {\n\t\t\tif (this.board.getModel(i, 0) instanceof AbstractZombie) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private void loseLife() {\n\t\t--lives;\n\t\tupdateLives();\n\t\tcreatePlayerExplosion();\n\t\tplayer.show(false);\n\t\tif (lives <= 0) {\n\t\t\tgameOver();\n\t\t} else {\n\t\t\tplayerDead = true;\n\t\t\tplayerDeadTimeLeft = playerDeadTime;\n\t\t}\n\t}",
"public boolean GameIsOver() {\n\t\tif(deck.numCardsLeft()==8) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"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 }",
"private void checkMovement()\n {\n if (frames % 600 == 0)\n {\n \n ifAllowedToMove = true;\n \n \n }\n \n }",
"public boolean waveDestroyed() {\n return map.getHell().getEnemies().size() + map.getEarth().getEnemies().size() + map.getHeaven().getEnemies().size() == 0;\n }",
"void checkPositions() {\n //check if any bullets have hit any asteroids\n for (int i = 0; i < bullets.size(); i++) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHit(bullets.get(i).pos)) {\n shotsHit++;\n bullets.remove(i);//remove bullet\n score +=1;\n break;\n }\n }\n }\n //check if player has been hit\n if (immortalityTimer <=0) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHitPlayer(position)) {\n playerHit();\n }\n }\n }\n }",
"void testDeath(){\n if(playerHP <= 0){\n isPlayerDead = true;\n scsw.goToScene(\"Death\");\n }\n}",
"public boolean isDead() {\r\n\t\treturn this.lives == 0;\r\n\t}",
"boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }",
"public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }",
"public void checkEnemy() {\n\t\tif (enemy != null)\n\t\tif (Integer.parseInt(getCurrentPositionX()) == enemy.getCurrentPositionX() && Integer.parseInt(getCurrentPositionY()) == enemy.getCurrentPositionY()) {\n\t\t\tx = spawnX;\n\t\t\ty = spawnY;\n\t\t}\n\t}",
"public void checkScore() {\n\t\tif (this.score != 0 && this.score % 5000 == 0\n\t\t\t\t&& this.life < this.MAX_LIFE) {\n\t\t\tthis.life++;\n\t\t}\n\t}",
"public synchronized boolean isFull() {\r\n\t\treturn (this.players.size() == 6);\r\n\t}",
"public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }",
"public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }"
] | [
"0.7050848",
"0.7034838",
"0.6987766",
"0.69729465",
"0.66896796",
"0.6661809",
"0.66566217",
"0.65582246",
"0.6549221",
"0.6546515",
"0.6523835",
"0.651429",
"0.6499591",
"0.64845884",
"0.6475847",
"0.6425787",
"0.64110893",
"0.6409328",
"0.6402792",
"0.6395389",
"0.6393786",
"0.63788563",
"0.63541555",
"0.633847",
"0.63321674",
"0.63308257",
"0.6315116",
"0.63121104",
"0.63008285",
"0.6287474",
"0.6282045",
"0.6280851",
"0.62648433",
"0.62559456",
"0.6253151",
"0.62486297",
"0.6246062",
"0.6242122",
"0.6241421",
"0.6218009",
"0.6211818",
"0.62021005",
"0.61875796",
"0.6179133",
"0.61769414",
"0.61688143",
"0.6163238",
"0.61595064",
"0.61492985",
"0.6142476",
"0.613828",
"0.6134813",
"0.6134366",
"0.61304635",
"0.6121021",
"0.6113627",
"0.61068785",
"0.6099128",
"0.60944575",
"0.60903853",
"0.60877967",
"0.6059169",
"0.605731",
"0.6046221",
"0.60443264",
"0.6024781",
"0.6015986",
"0.6004838",
"0.6003626",
"0.5995303",
"0.5986623",
"0.59834206",
"0.5959715",
"0.5955079",
"0.5934545",
"0.5921808",
"0.5919892",
"0.59172404",
"0.5909394",
"0.58980215",
"0.5894328",
"0.5893537",
"0.58887947",
"0.5866466",
"0.5865436",
"0.5859838",
"0.5854505",
"0.5847728",
"0.58438337",
"0.58419275",
"0.58405006",
"0.5829743",
"0.5825457",
"0.5823784",
"0.5823773",
"0.58202755",
"0.58170784",
"0.5813857",
"0.5813803",
"0.58131343"
] | 0.687652 | 4 |
Get the 'lives' of the sprite | public int getlives(){
return this.lives;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getLength () { return spriteLength; }",
"ArrayList<Sprite> getSpriteArray();",
"public final int getLives() {\n\t\treturn lives;\n\t}",
"int getSpriteArraySize();",
"public int lives() {\r\n return lifeStates.head().lives();\r\n }",
"public Sprite getSprite()\n\t{\n\t\treturn sprite;\n\t}",
"public int getLives() {\r\n\t\treturn lives;\r\n\t}",
"public int getSpriteHeight() {\n return this.spriteHeight;\n }",
"public static int getEnemyLives(){\n return 1 + currentLvl * 2;\n\n }",
"public Image getBulletImg(){ \n return SpriteSheet.playerProjectileSprites[this.frameNumber]; \n }",
"public int getLives() {return lives;}",
"public Sprite getSprite() {\n\t\treturn sprite;\n\t}",
"public Sprite getSprite() {\n\t\treturn sprite;\n\t}",
"public int getLives() {\n return lives;\n }",
"public Sprite getSprite() {\n\t\tlong currTime = System.currentTimeMillis();\n\t\tif(currTime - lastUpdate > timeEach) {\n\t\t\tlastUpdate = currTime;\n\t\t\tcurrSprite++;\n\t\t\tif(currSprite >= sprites.length)\n\t\t\t\tcurrSprite = 0;\n\t\t}\n\t\treturn sprites[currSprite];\n\t}",
"public int getSpriteID() {\n return spriteID;\n }",
"public List<Integer> getLives() {\n return lives;\n }",
"public int getLives()\n {\n return lives;\n }",
"public HashMap<Integer, Sprite> getVillagers() {\n\t\tfor (int i = 0; i < player.getPartyMembers().size(); i++) {\n\t\t\tint h = player.getPartyMembers().get(i).hashCode();\n\t\t\tsprites.remove(h);\n\t\t}\n\t\tupdateSpriteList();\n\t\treturn sprites;\n\t}",
"public List<Sprite> getEnnemies() {\r\n return ennemies.stream()\r\n .filter(c -> !SpriteStatusEnum.DEAD.equals(c.getStatus()))\r\n .collect(Collectors.toList());\r\n }",
"public HashMap<String, BufferedImage> getSprites() {\n \t\treturn sprites;\n \t}",
"public MyAnimation getSprite();",
"@Override\n\tpublic final Sprite getSprite() {\n\t\treturn this.sprite;\n\t}",
"public Image sprite(){\n\t\treturn (face);\n\t}",
"public RectF getSpriteBoundary() { return new RectF(atomSpriteBoundary); }",
"public Sprite getSprite() {\n\t\treturn image;\n\t}",
"@Basic @Immutable\n\tpublic Sprite[] getImages() {\n\t\treturn this.images;\n\t}",
"public Sprite getCurrentSprite() {\n\t\tif (this.getVx() <= 0) {\n\t\t\treturn getImages()[0];\n\t\t}\n\t\treturn getImages()[1];\n\t}",
"public int getNumberOfLivingNeighbours(int x, int y){\n int living = 0;\n\n for (int i = x - 1; i <= x + 1; i++) {\n for (int j = y - 1; j <= y + 1; j++) {\n if (isAlive(i, j)) {\n living++;\n }\n }\n }\n\n if(isAlive(x, y))\n living--; //Remove 1 from count if orig coordinate\n\n return living;\n }",
"@Override\n public String getEntLS() {\n return \"Enemies\";\n }",
"public int lives() {\r\n return lives;\r\n }",
"public int nbEnemiesAlive(){\n return state.getPlayers().size()-1;\n }",
"public int getLives(){return lives;}",
"@Override\r\n\tpublic String lives() {\n\t\treturn \"lives in land and water\";\r\n\t}",
"int indexOfSpriteThatCollided(Array<? extends Sprite> sprites, Sprite sprite);",
"public List<REPoint> getObstacles();",
"public int getSpriteWidth() {\n return this.spriteWidth;\n }",
"@Override\n public Sprite getHurtSprite() {\n return Assets.getInstance().getSprite(\"entity/zombie_blood0.png\");\n }",
"public BufferedImage[] powerSprite(){\n\t\tBufferedImage arr[] = new BufferedImage[4];\n\t\tarr[0] = img.getSubimage(724, 283, 71, 67);\n\t\tarr[1] = img.getSubimage(650, 286, 72, 64);\n\t\tarr[2] = img.getSubimage(484, 292, 83, 58);\n\t\tarr[3] = img.getSubimage(257, 281, 71, 69);\n\t\treturn arr;\n\t\t\t\n\t}",
"public int getSpriteHover()\n\t{\n\t\treturn this.spriteHover;\n\t}",
"public MyAnimation getFrontSprite();",
"public int getNonMovers();",
"int getNumberOfTextureCoordinates();",
"Sprite getBackground();",
"public Lives()\n {\n lives.scale(19, 19);\n setImage(lives);\n\n }",
"public boolean isAlive() {\r\n return (lives() > 0);\r\n }",
"public ArrayList<String> getSpriteNames() {\n\t\treturn getFileNamesByPath(simulationConfig.getString(\"spritepath\"));\n\t}",
"public int getSpawnY()\n {\n return spawnY;\n }",
"public List<Tile> getNeighbours() {\n \r\n return neighbours;\r\n }",
"public Rectangle points(){\n\t\treturn shotRect;\n\t}",
"float distTo(Sprite s) {\n return dist(_x, _y, s._x, s._y);\n }",
"public MyAnimation getRearSprite();",
"public float getLeftRectF () { return atomSpriteBoundary.left; }",
"String getLawnPosition();",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"public Rect hitBox(){\n return new Rect((int)getX(), (int)getY(), (int)getX() + spriteWidth, (int)getY() + spriteHeight);\n }",
"public Sprite getBattleSprite()\n {\n return battleSprite;\n }",
"public List<Enemy> getEnemies();",
"protected ResourceLocation getEntityTexture(EntityMegaZombie p_110775_1_)\n {\n return zombieTextures;\n }",
"public SpriteBase getSpriteBase() {\n return spriteBase;\n }",
"public Sprite getMazeSprite()\n {\n return mazeSprite;\n }",
"public Vector getTargets(){\n return targets;\n }",
"public GameObject peek();",
"public List<SpawnPoint> getSpawns() {\n\t\treturn spawns;\n\t}",
"public abstract int getNumberOfLivingNeighbours(int x, int y);",
"public List<Missile> getFriendlyMissilesOnStage(){\n\t\treturn this.friendlyMissiles;\n\t}",
"void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}",
"public Collision getCollisionType(ISprite sprite);",
"public List<Location> getSpawns(){\n\t\treturn spawns;\n\t}",
"public int getTextureState() {\n return MathHelper.clamp(MAX_TEXTURE_STATE * aggro / MAX_AGGRO, 0, MAX_TEXTURE_STATE);\n }",
"private void renderGuiLives(SpriteBatch batch)\n {\n float x = cameraGui.viewportWidth - 50 - Constants.MAX_LIVES * 50;\n float y = -15;\n \n for (int i = 0; i < worldController.lives; i++)\n {\n batch.draw(Assets.instance.gui.pumpkin, x + i * 50, y, 50, 50, 120, 100, 0.35f, -0.35f, 0);\n batch.setColor(1, 1, 1, 1);\n }\n }",
"int getLoses() {return _loses;}",
"public ArrayList<Actor> getEnemies() {\n return getGrid().getNeighbors(getLocation());\n }",
"public void setLives(int lives) {this.lives = lives;}",
"public int getSpins() {\n return spinsLeft;\n }",
"public Enemy getEnemy(int whichEnemy);",
"@Override\n public void checkCollision( Sprite obj )\n {\n\n }",
"@Basic\n\tpublic int getHeight() {\n\t\treturn getCurrentSprite().getHeight();\n\t}",
"public boolean limeAvailable();",
"public int magicMissile();",
"public void setLives(int l) {\r\n\t\tlives = l;\r\n\t}",
"public void setLives(int lives) {\r\n\t\tthis.lives = lives;\r\n\t}",
"List<IntVector3> rails();",
"public TextureRegion getStandLeft(){\n return standLeft;\n }",
"@Override\n public void checkCollision( Sprite obj )\n {\n \n }",
"int getLeftMonsterIndex();",
"public long getLifePoints()\n {\n return this.lifePoints;\n }",
"public int getILives() {\n return iLives;\n }",
"int getHitpoints(Unit unit);",
"public float distanceToSprite(Sprite target) { \n return distanceToXY((int)target.pos.x, (int)target.pos.y);\n }",
"public int getSegsLeft(){\r\n return segsLeft;\r\n }",
"public BufferedImage getSpriteImage(String ref) {\n\t\treturn sprites.get(ref);\n\t}",
"public List<SpawnPoint> getSpawnPoints(){\n return spawnPoints;\n }",
"public int getTotalNumberOfSprites() {\n return this.getRows() * this.getColumns();\n }",
"protected ResourceLocation getEntityTexture(EntityBat p_110775_1_)\n {\n return batTextures;\n }",
"@Override\r\n public boolean dye() {\r\n if (getX() > 3100 || getX() < 10 || getY() < 10 || getY() > 3100) {\r\n return true;\r\n }\r\n// int pixel = mapRGB.getRGB((int) getX(), (int) getY());\r\n// int red = (pixel >> 16) & 0xff;\r\n// if(red==255){this.handler.getWaves().removeEnemy(); return true;}\r\n int k = collision(velX, velY, this.getX(), this.getY());\r\n if(k!=0) {\r\n this.handler.getWaves().removeEnemy(); \r\n return true;\r\n }\r\n else{\r\n zombie_x = getX(); \r\n zombie_y = getY();\r\n }\r\n //I proiettili hanno una portata limitata o se ha colpito il player o se è uscito dalla mappa o se è andato contro un muro\r\n if ((this.getHealth() == 0) || (handler.getPlayer().getBounds().contains(getX(), getY()))) {\r\n int n = (int) (Math.random() * 10);\r\n if(n>1) n=2;\r\n switch (n) {\r\n case 2:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 3, 200, 25, handler.getPlayer(), this.handler, 30, 60, 60, 5, new Animation(Assets.zombie, 20), new Animation(Assets.zombieAttack, 35), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 0:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 4, 70, 50, handler.getPlayer(), this.handler, 0, 60, 60, 20, new Animation(Assets.zombie2, 15), new Animation(Assets.zombie2Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 1:\r\n this.handler.addSprite(new SpittleZombie(zombie_x, zombie_y, 3, 500, 40, handler.getPlayer(), this.handler, 0, 60, 60, 45, new Animation(Assets.zombie3, 15), new Animation(Assets.zombie3Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n }\r\n return true;\r\n }\r\n \r\n return false;\r\n }",
"public int getSpawnY() {\n\t\treturn spawnY;\n\t}",
"public Location alliesSpawn(){\r\n\t\treturn alliesSpawn;\r\n\t}",
"@Override\n public void chooseSprite() {\n switch(direction){\n case 0:\n sprite=Sprite.python_down;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_down,Sprite.python_down_1,Sprite.python_down_2,Sprite.python_down_3,animate,40);\n break;\n case 1:\n sprite=Sprite.python_right;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_right,Sprite.python_right_1,Sprite.python_right_2,animate,40);\n break;\n case 2:\n sprite=Sprite.python_up;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_up,Sprite.python_up_1,Sprite.python_up_2,animate,40);\n break;\n case 3:\n sprite=Sprite.python_left;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_left,Sprite.python_left_1,Sprite.python_left_2,animate,40);\n break;\n\n\n }\n\n }",
"public int getValue() {\r\n return lives;\r\n }"
] | [
"0.646422",
"0.61013675",
"0.5961367",
"0.59082323",
"0.588685",
"0.5831268",
"0.5821047",
"0.5781629",
"0.5736407",
"0.5733711",
"0.57204366",
"0.57070524",
"0.57070524",
"0.56990707",
"0.5671868",
"0.5651936",
"0.56401867",
"0.56394875",
"0.55974895",
"0.55947626",
"0.55803984",
"0.553916",
"0.5535681",
"0.552508",
"0.550654",
"0.54813856",
"0.5450322",
"0.5450108",
"0.54287064",
"0.54074556",
"0.536604",
"0.5365221",
"0.536245",
"0.5348007",
"0.5330942",
"0.5323871",
"0.53076893",
"0.5282694",
"0.5279309",
"0.527886",
"0.5263184",
"0.52617556",
"0.52605784",
"0.5233846",
"0.52325404",
"0.5224609",
"0.5219041",
"0.5188291",
"0.5172388",
"0.51550525",
"0.5151728",
"0.5150619",
"0.5148578",
"0.51402026",
"0.51396865",
"0.51339096",
"0.5102733",
"0.51011705",
"0.50986063",
"0.50978506",
"0.50977665",
"0.50973207",
"0.5095413",
"0.5085131",
"0.5076299",
"0.50679857",
"0.5063458",
"0.50584006",
"0.50487053",
"0.5028644",
"0.5027241",
"0.5026915",
"0.50244373",
"0.5021257",
"0.50051785",
"0.50024766",
"0.4985528",
"0.4983773",
"0.49801183",
"0.4979282",
"0.49704403",
"0.4968712",
"0.49558726",
"0.49533322",
"0.49429625",
"0.49408156",
"0.49370432",
"0.49357474",
"0.49290416",
"0.49229333",
"0.49173442",
"0.4915",
"0.490555",
"0.4900018",
"0.48997235",
"0.4888913",
"0.4885058",
"0.4885008",
"0.48842293",
"0.48841086"
] | 0.6578836 | 0 |
This method is use to reset the sprite back to initial state | public void reset(){
frogReposition();
lives = 5;
end = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetSprites() {\n\t\tSPRITE_LIST.clear();\n\t}",
"public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\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}",
"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 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 empty() {\n\t\tempty.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = empty;\n\t}",
"public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }",
"void reset() {\n setPosition(-(TILE_WIDTH * CYCLE), TOP_Y);\n mySequenceIndex = 0;\n setAnimatedTile(myAnimatedTileIndex, FRAME_SEQUENCE[mySequenceIndex]);\n }",
"@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}",
"public final void reset(){\n\t\tthis.undoStack = new GameStateStack();\n\t\tthis.redoStack = new GameStateStack();\n\t\t\n\t\tthis.currentBoard = currentRules.createBoard(currentSize);\n\t\tthis.currentRules.initBoard(currentBoard, currentInitCells, currentRandom);\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}",
"void reset() {\n myManager.reset();\n myScore = 0;\n myGameOver = false;\n myGameTicks = myInitialGameTicks;\n myOldGameTicks = myInitialGameTicks;\n repaint();\n }",
"public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }",
"public void Reset()\r\n\t{\r\n\t\tif(!levelEditingMode)//CAN ONLY RESET IN LEVEL EDITING MODE\r\n\t\t{\r\n\t\t\tgrid.clearUserObjects();\r\n\t\t\tmenu = new SpriteMenu(listFileName, playButton);\r\n\t\t}\r\n\t}",
"public void reset()\r\n/* 89: */ {\r\n/* 90:105 */ this.pos = 0;\r\n/* 91: */ }",
"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 }",
"private void resetUnitSprite() {\r\n\t\tswitch (GameManager.getInstance().getSelectedUnit()) {\r\n\t\tcase 0:\r\n\t\t\tGameManager.getInstance().setSelectedUnit(3);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 1:\r\n\t\t\tUnit1SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 2:\r\n\t\t\tUnit2SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(2);\r\n\t\tcase 3:\r\n\t\t\tUnit3SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(3);\r\n\t\tcase 4:\r\n\t\t\tUnit4SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 5:\r\n\t\t\tUnit5SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 6:\r\n\t\t\tUnit6SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\t}\r\n\t}",
"public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}",
"public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }",
"public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}",
"public void reset() {\n setPrimaryDirection(-1);\n setSecondaryDirection(-1);\n flags.reset();\n setResetMovementQueue(false);\n setNeedsPlacement(false);\n }",
"public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}",
"protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }",
"public void sprite() {\n\t\tspr.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = spr;\n\t}",
"public static void reset(){\r\n\t\tx=0;\r\n\t\ty=0;\r\n\t}",
"public void resetPlayer(){\n images = new EntitySet(true,false, 0);\n }",
"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\t\tthis.setPosition(DEFAULT_X, DEFAULT_Y);\t\n\t\tsetBounds(getX(), getY(), getDefaultWidth(), getHeight());\n\t\tcollisionBounds.setWidth(defaultWidth);\n\t\tspeed = 400;\n\t\tsetGlue(true);\n\t}",
"public void reset()\t{\n\t\tthis.snake.clear();\r\n\t\tdir = 1;\r\n\t\tthis.snake.add(new Dimension(2,5));\r\n\t\tthis.snake.add(new Dimension(2,6));\r\n\t\tthis.snake.add(new Dimension(2,7));\r\n\t}",
"@Override\n\tpublic void reset(){\n\t\tstate.reset();\n\t\toldState.reset();\n\t\treturnAction = new boolean[Environment.numberOfButtons]; \n\t\trewardSoFar = 0;\n\t\tcurrentReward = 0;\n\t}",
"public void resetPlayer() {\n\t\thealth = 3;\n\t\tplayerSpeed = 5f;\n\t\tmultiBulletIsActive = false;\n\t\tspeedBulletIsActive = false;\n\t\tquickFireBulletIsActive = false;\n\t\tinvincipleTimer = 0;\n\t\txPosition = 230;\n\t}",
"public void resetView() {\n pause();\n if (spriteView != null) spriteView.setViewport(new Rectangle2D(0, 0, rect.getWidth(), rect.getHeight()));\n }",
"public void reset() {\n // corresponding function called in the Board object to reset piece\n // positions\n board.reset();\n // internal logic reset\n lastColor = true;\n gameOver = false;\n opponentSet = false;\n }",
"private void resetBackgroundSprite(Texture newSpriteTexture) {\n backgroundSprite = new Sprite(newSpriteTexture);\n backgroundSprite.setSize(screenWidth, screenHeight);\n backgroundSprite.setPosition(0, 0);\n }",
"public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }",
"public void reset() {\n //mLoader.reset();\n start();\n }",
"@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 }",
"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 resetState();",
"private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\n\t}",
"protected void resetState()\n {\n // Nothing to do by default.\n }",
"private void resetAfterGame() {\n }",
"@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }",
"public void reset(){\n newGame();\n removeAll();\n repaint();\n ended = false;\n }",
"public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}",
"public void resetRenderer() {\n\n\t\tanimationComplete = true;\n\t\tif (pieceMove != null) {\n\t\t\tpieceMove.setPiece(null);\n\t\t\tpieceMove.setSquares(-99);\n\t\t}\n\t\tpieceMove = null;\n\t\tmoveFinalIndex = -999;\n\t\tmoveTempIndex = -999;\n\t\tmoveCount = -999;\n\t\tmoveCountHomeSq = 0;\n\t\trestMovedToStart = false;\n\t\tmovedToRest = false;\n\t\thomeSqMovedToHome = false;\n\n\t\tmoveToRestSq = null;\n\t\tmoveToHome = null;\n\n\t\tdiceList = new ArrayList<>();\n\t\tfor (int d = 0; d < selectedPlayer.getRuleEngine().dicePerGame(); d++) {\n\t\t\tDice newDice = createDiceInstance();\n\t\t\tnewDice.setShake(true);\n\t\t\tdiceList.add(newDice);\n\t\t}\n\n\t}",
"public static void reset() {\n\t\tbat1.reset();\n\t\tbat2.reset();\n\t\tball.reset();\n\t}",
"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 resetState() {\n \ts = State.STRAIGHT;\n }",
"public void reset() {\n this.state = null;\n }",
"final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}",
"public ResetAction() {\n width = height = mines = 0;\n }",
"public void reset() {\n position = 0;\n }",
"public void reset()\n {\n mine = false;\n revealed = false;\n flagged = false;\n repaint();\n }",
"public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\n }",
"public void reset() {\n reset(animateOnReset);\n }",
"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 {\n m_source_.setToStart();\n updateInternalState();\n }",
"private void reset(){\n locationFieldX.setText(\"0.00\");\n locationFieldY.setText(\"0.00\");\n locationFieldZ.setText(\"0.00\");\n rotationFieldX.setText(\"0.00\");\n rotationFieldY.setText(\"0.00\");\n rotationFieldZ.setText(\"0.00\");\n scaleField.setText(\"1.00\");\n \n setObjects();\n setImage();\n }",
"public void reset(){\n super.reset();\n this.troef = CardColor.NONE;\n }",
"public void reset() {\n\t\tAssets.playSound(\"tweet\");\n\t\tscore = respawnTimer = spawnCount= 0;\n\t\t\n\t\twalls = new ArrayList<Wall>();\n\t\tcheckPoints = new ArrayList<Wall>();\n\t\tground = new ArrayList<Ground>();\n\n\t\tGround g;\n\t\tPoint[] points = new Point[21];\n\t\tfor (int i = 0; i < 21; i++) {\n\t\t\tpoints[i] = new Point(i * 32, 448);\n\t\t}\n\t\tfor (int j = 0; j < points.length; j++) {\n\t\t\tg = new Ground();\n\t\t\tg.setBounds(new Rectangle(points[j].x, 448, 32, 32));\n\t\t\tground.add(g);\n\t\t}\n\n\t\tsky = new Background(-0.2);\n\t\tsky.setImage(Assets.sprite_sky);\n\t\t\n\t\tmountains = new Background(-0.4);\n\t\tmountains.setImage(Assets.sprite_mountains);\n\t\t\n\t\ttrees = new Background(-1.4);\n\t\ttrees.setImage(Assets.sprite_trees);\n\n\t\tstarted = false;\n\t\tplayer.reset();\n\n\t}",
"public void reset() {\n mMediaPlayer.reset();\n setPlayerState(State.IDLE);\n }",
"public void reset(){\r\n\t\tif (moveTimer != null) moveTimer.stop();\r\n\t\tmySnake = new Snake(MAX_WIDTH/2, MAX_HEIGHT/2, MAX_WIDTH, MAX_HEIGHT);\r\n\t\tmoveSpeed = mySnake.getList().size();\r\n\t\tmoveTimer = new Timer(1000/moveSpeed, new MoveTimerHelper());\r\n\t\tmoveTimer.start();\r\n\t\tshrooms = new ArrayList<Mushroom>();\r\n\r\n\t\tignoreStrokes = 0;\r\n\t\t\r\n\t\tif (lives <= 0){\r\n\t\t\tgameOver = true;\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}",
"protected void reset(){\n inited = false;\n }",
"void reset() {\n setVisible(false);\n myJumpedOver = false;\n }",
"public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }",
"protected abstract AnimationFX resetNode();",
"public void reset()\r\n {\r\n gameBoard.reset();\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard.reset();\r\n }",
"private void reset() {\n\n\n spaceShips.clear();\n playerOne = null;\n playerTwo = null;\n friendlyBullets.clear();\n enemyBullets.clear();\n powerUps.clear();\n enemyGenerator.reset();\n difficulty.reset();\n Bullets.BulletType.resetSpeed();\n\n for (int i = 0; i < enemies.size(); i++) {\n enemies.get(i).getEnemyImage().delete();\n }\n enemies.clear();\n }",
"public void resetPlayerPosition() {\n\t\tthis.tilePositionX = this.STARTING_X;\n\t\tthis.tilePositionY = this.STARTING_Y;\n\t}",
"public void reset( )\n\t{\n\t\tint count = 1;\n\t\tthis.setMoves( 0 );\n\t\tfor( int i = 0; i < this.getSize(); i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < this.getWidth(); j++ )\n\t\t\t{\n\t\t\t\tthis.setTile( count++, i, j );\n\t\t\t\tif( i == getSize( ) - 1 && j == getWidth( ) - 1 ) {\n\t\t\t\t\tthis.setTile( -1, i, j );\n\t\t\t\t\tlocationX = i;\n\t\t\t\t\tlocationY = j;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"public void bossReset(){\n bossTimer.start();\n this.getView().setTranslateX(x);\n this.getView().setTranslateY(y);\n this.getView().setRotate(0);\n bossTimer.start();\n setHitPoints(getDefaultHp());\n }",
"public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }",
"private void reset() {\n ms = s = m = h = 0;\n actualizar();\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 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 }",
"public void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public void reset() {\n\t\t// SimpleTools.processTrackingOutput(\"Resetting TicTacToe.\");\n\t\tfor (int i = 0; i < checkerboard.length; i++) {\n\t\t\tfor (int j = 0; j < checkerboard[0].length; j++) {\n\t\t\t\tcheckerboard[i][j] = EMPTY;\n\t\t\t} // Of for j\n\t\t} // Of for i\n\t\tcurrentState = 0;\n\t\tcurrentRouteLength = 1;\n\n\t\t// White first\n\t\tcurrentPlayer = WHITE;\n\t}",
"public void reset(){\r\n \ttablero.clear();\r\n \tfalling = null;\r\n \tgameOver = false;\r\n \tlevel = 0;\r\n \ttotalRows = 0;\r\n \tLevelHelper.setLevelSpeed(level, this);\r\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\t\ttilePath.clear();\n\t}",
"public void reset(){\n x = originalX;\n y = originalY;\n dx = originalDX;\n dy = originalDY;\n }",
"protected void reset() {\n leftSkier.reset();\n rightSkier.reset();\n }",
"@Override\n public void resetGame() {\n\n }",
"public void resetGame() {\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] = 0;\n\t\t\t\tgetChildren().remove(renders[i][j]);\n\t\t\t\trenders[i][j] = null;\n\t\t\t}\n\t\t}\n\t}",
"private void resetGame(){\n\n }",
"public void reset() {\n firstUpdate = true;\n }",
"public void resetScreen(){\n\t\tGame_Map_Manager.infoVisible= false;\n\t\tGame_PauseMenu.actorManager.open = false;\n\t\tPlayerGoals.open = false;\n\t\tGame_Shop.actorManager.open = false;\n\t\tTrainDepotUI.actorManager.open = false;\n\t\tGameScreenUI.resourcebarexpanded =false;\n\t\tGoalMenu.open= false;\n\t\t\n\t\t//CARDS\n\t\tGame_CardHand.actorManager.open=false;\n\t\tGame_CardHand.actorManager.cardactors.clear();;\n\t\t\n\t\t//Map\n\t\tGame_StartingSequence.reset();\n\t\tGame_Map_Manager.resetMap();\n\t}",
"public void reset() {\r\n\r\n for ( Card card : cards ) {\r\n if ( card.isFaceUp() ) {\r\n card.toggleFace( true );\r\n }\r\n }\r\n Collections.shuffle( cards );\r\n\r\n this.undoStack = new ArrayList<>();\r\n\r\n this.moveCount = 0;\r\n\r\n announce( null );\r\n }",
"public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }",
"@Override\n public void reset(MiniGame game) {\n }",
"private void resetForNextTurn() {\n\t\tremove(ball);\n\t\tdrawBall();\n\t\tsetInitialBallVelocity();\n\t\tpaddleCollisionCount = 0;\n\t\tpause(2000); \t\t\t\t\n }",
"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\t\tplayerModelDiff1.clear();\n\t\tplayerModelDiff4.clear();\n\t\tplayerModelDiff7.clear();\n\t\tif(normalDiffMethods)\n\t\t{\t\n\t\tupdatePlayerModel();\n\t\tdisplayReceivedRewards();\n\t\t}\n\t\tint temp_diffsegment1;\n\t\tint temp_diffsegment2;\n\t\tif (currentLevelSegment == 0) {\n\t\t\t//System.out.println(\"-you died in the first segment, resetting to how you just started\");\n\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(0);\n\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(1);\n\t\t}\n\t\telse {\n\t\t\t//System.out.println(\"-nextSegmentAlreadyGenerated:\" + nextSegmentAlreadyGenerated);\n\t\t\tif (nextSegmentAlreadyGenerated) {\n\t\t\t\t//because the next segment is already generated (and so the previous does not exist anymore),\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//because the next segment is not yet generated\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment-1);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t}\n\t\t}\n\t\tplannedDifficultyLevels.clear();\n\n\t\t//System.out.println(\"-resetting to: \" + temp_diffsegment1 + \", \" + temp_diffsegment2);\n\t\tplannedDifficultyLevels.add(temp_diffsegment1);\n\t\tplannedDifficultyLevels.add(temp_diffsegment2);\n\t\tcurrentLevelSegment = 0;\n\n\t\tpaused = false;\n\t\tSprite.spriteContext = this;\n\t\tsprites.clear();\n\n\t\ttry {\n\t\t\tlevel2 = level2_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tlevel3 = level3_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n fixborders();\n\t\tconjoin();\n\n\t\tlayer = new LevelRenderer(level, graphicsConfiguration, 320, 240);\n\t\tfor (int i = 0; i < 2; i++)\n\t\t{\n\t\t\tint scrollSpeed = 4 >> i;\n\t\tint w = ((level.getWidth() * 16) - 320) / scrollSpeed + 320;\n\t\tint h = ((level.getHeight() * 16) - 240) / scrollSpeed + 240;\n\t\tLevel bgLevel = BgLevelGenerator.createLevel(w / 32 + 1, h / 32 + 1, i == 0, levelType);\n\t\tbgLayer[i] = new BgRenderer(bgLevel, graphicsConfiguration, 320, 240, scrollSpeed);\n\t\t}\n\n\t\tdouble oldX = 0;\n\t\tif(mario!=null)\n\t\t\toldX = mario.x;\n\n\t\tmario = new Mario(this);\n\t\tsprites.add(mario);\n\t\tstartTime = 1;\n\n\t\ttimeLeft = 200*15;\n\n\t\ttick = 0;\n\n\t\t/*\n\t\t * SETS UP ALL OF THE CHECKPOINTS TO CHECK FOR SWITCHING\n\t\t */\n\t\t switchPoints = new ArrayList<Double>();\n\n\t\t//first pick a random starting waypoint from among ten positions\n\t\tint squareSize = 16; //size of one square in pixels\n\t\tint sections = 10;\n\n\t\tdouble startX = 32; //mario start position\n\t\tdouble endX = level.getxExit()*squareSize; //position of the end on the level\n\t\t//if(!isCustom && recorder==null)\n level2.playValues = this.valueList[0];\n\t\t\trecorder = new DataRecorder(this,level3,keys);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.COINS); //Sander disable\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_COINS);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_POWER);\n\t\t\tgameStarted = false;\n\t}",
"public synchronized void reset(){\n\t\tif(motor.isMoving())\n\t\t\treturn;\n\t\tmotor.rotateTo(0);\n\t}",
"static void reset() {\n for( Tile x : tiles ) {\n x.setBackground(white);\n }\n tiles.get(0).setBackground(red);\n start = 0;\n flag = 0;\n }",
"public void reset ()\n\t{\n\t\t//The PaperAirplane and the walls (both types) use their reconstruct ()\n\t\t//method to set themselves back to their starting points.\n\t\tp.reconstruct ();\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i].reconstruct ();\n\t\t\n\t\tfor (int i = 0; i < sW.length; i++)\n\t\t\tsW[i].reconstruct ();\n\t\t\t\n\t\t//the time is reset using the resetTime () method from the Timer class.\n\t\ttime.resetTime ();\n\t\t\n\t\t//the score is reset using the reconstruct method from the Score class.\n\t\tscore.reconstruct ();\n\t\t\n\t\t//The following variables are set back to their original values set in\n\t\t//the driver class.\n\t\ttimePassed = 0;\t\n\t\tnumClicks = 0;\n\t\teventFrame = 0;\n\t\tlevel = 1;\n\t\txClouds1 = 0;\n\t\txClouds2 = -500;\n\t\tyBkg1 = 0;\n\t\tyBkg2 = 600;\t\t\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}",
"@Override\n public void updateStates() {\n mySprite.update();\n }",
"void reset() {\n if (myGrass != null) {\n myGrass.reset();\n }\n if (myCowboy != null) {\n myCowboy.reset();\n }\n if (myLeftTumbleweeds != null) {\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i].reset();\n }\n }\n if (myRightTumbleweeds != null) {\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].reset();\n }\n }\n myLeft = false;\n myCurrentLeftX = Grass.CYCLE * Grass.TILE_WIDTH;\n }"
] | [
"0.78719443",
"0.78012955",
"0.74752885",
"0.74217355",
"0.7409548",
"0.73901254",
"0.7385633",
"0.7363323",
"0.73587793",
"0.7329521",
"0.7320422",
"0.7309152",
"0.72757554",
"0.72626925",
"0.72297424",
"0.7227972",
"0.7227362",
"0.7173375",
"0.71656823",
"0.7148677",
"0.7139034",
"0.7126025",
"0.71182215",
"0.7075496",
"0.70468026",
"0.70373046",
"0.70121145",
"0.7007699",
"0.70004755",
"0.6987129",
"0.69783574",
"0.69684196",
"0.69662815",
"0.6955588",
"0.69549435",
"0.6954353",
"0.69506675",
"0.69376355",
"0.6925596",
"0.69233125",
"0.6913226",
"0.6912272",
"0.6910242",
"0.6908934",
"0.69015026",
"0.68771076",
"0.6872093",
"0.6868136",
"0.68627155",
"0.6854161",
"0.6851461",
"0.68387365",
"0.6817313",
"0.68151146",
"0.6814902",
"0.6812816",
"0.6811415",
"0.6807605",
"0.68021685",
"0.6793439",
"0.6791914",
"0.6784391",
"0.6783705",
"0.67779523",
"0.6763952",
"0.67529243",
"0.6749135",
"0.67388076",
"0.6737206",
"0.6734095",
"0.6721917",
"0.6721328",
"0.67183554",
"0.6714657",
"0.67122805",
"0.67098635",
"0.669987",
"0.6694711",
"0.66849405",
"0.66847384",
"0.6683262",
"0.66696215",
"0.6667557",
"0.6660608",
"0.66561687",
"0.6651473",
"0.66345817",
"0.6630343",
"0.6619729",
"0.661041",
"0.65951777",
"0.6591868",
"0.6589446",
"0.658358",
"0.65825385",
"0.65817493",
"0.65814143",
"0.6576583",
"0.65539813",
"0.6546226"
] | 0.67411107 | 67 |
Test the property 'type' | @Test
public void typeTest() {
// TODO: test type
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void test_getType() {\n assertEquals(\"'type' value should be properly retrieved.\", type, instance.getType());\n }",
"protected abstract boolean isSupportedTestType(Properties prop);",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"public final void testGetType() {\n assertEquals(Hello.SAY_HELLO_INVOKED, n.getType());\n }",
"private boolean isType(String type, Object value) {\n boolean ret = false;\n String val = String.valueOf(value).toUpperCase();\n if (val.equals(\"NULL\")) {\n ret = true;\n } else if (val.contains(\"BASE64\")) {\n ret = true;\n } else {\n if (type.equals(\"NULL\") && value instanceof JSONObject) ret = true;\n if (type.equals(\"TEXT\") && value instanceof String) ret = true;\n if (type.equals(\"INTEGER\") && value instanceof Integer) ret = true;\n if (type.equals(\"INTEGER\") && value instanceof Long) ret = true;\n if (type.equals(\"REAL\") && value instanceof Float) ret = true;\n if (type.equals(\"BLOB\") && value instanceof Blob) ret = true;\n }\n return ret;\n }",
"private void assertType(String snippet, Class<? extends Object> type) {\n try {\n Lexer lexer = new Lexer(new StringReader(snippet));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getRight().getClass() == type);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }",
"public boolean isType() {\n return type;\n }",
"public boolean is( Type type ) {\n return this.type == type;\n }",
"@Test\n public void typeTest() {\n assertTrue(red_piece.getType() == Piece.Type.SINGLE);\n red_piece.king();\n assertTrue(red_piece.getType() == Piece.Type.KING);\n assertTrue(white_piece.getType() == Piece.Type.SINGLE);\n }",
"abstract protected boolean checkType(String myType);",
"public boolean getType() {\r\n\t\treturn type;\r\n\t}",
"public TLPropertyType getType() {\n return type;\n }",
"public <T> T expectProperty(String name, Class<T> type) {\n return getProperty(name, type).orElseThrow(() -> new IllegalArgumentException(String.format(\n \"Property `%s` is not part of %s, `%s`\", name, getClass().getSimpleName(), this)));\n }",
"@Test\n public void testGetType() {\n System.out.println(\"getType\");\n\n String expResult = \"Comum\";\n String result = instance.getType();\n\n assertEquals(expResult, result);\n }",
"@Test\n public void ruleTypeTest() {\n assertEquals(\"Rule type is not match\", Rule.Type.JDBCBuildMap.name(), jdbcBuildMapRule.getRuleType());\n }",
"@Test\n public void testIsTypeOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_TYPE_OF);\n }",
"public boolean isType(String type) {\n return m_Type.equals(type);\n }",
"@Test\n public void testGetSetType()\n {\n try\n {\n Square s = new Square();\n\n assertEquals(Square.squareType.REGULAR, s.getType());\n\n s.setType(Square.squareType.DB_WORD);\n assertEquals(Square.squareType.DB_WORD, s.getType());\n\n s.setType(Square.squareType.DB_LETTER);\n assertEquals(Square.squareType.DB_LETTER, s.getType());\n\n s.setType(Square.squareType.STAR);\n assertEquals(Square.squareType.STAR, s.getType());\n\n s.setType(Square.squareType.TR_WORD);\n assertEquals(Square.squareType.TR_WORD, s.getType());\n\n s.setType(Square.squareType.TR_LETTER);\n assertEquals(Square.squareType.TR_LETTER, s.getType());\n }\n catch(Exception ex)\n {\n ex.printStackTrace();\n fail(\"No exception should be thrown when setting the type of the object\");\n }\n }",
"public void testGetType() {\n System.out.println(\"getType\"); // NOI18N\n \n TypeID expResult;\n TypeID result;\n String value = \"Test value\"; // NOI18N\n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n \n result = PropertyValue.createValue(primitveDescritor, type,value).getType();\n expResult = type;\n assertEquals(expResult, result);\n }",
"private String getType(){\r\n return type;\r\n }",
"PropertyType(String propertyType) {\n this.propertyType = propertyType;\n }",
"public boolean isProperty();",
"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 getType() {return type;}",
"@Test\n public void testGetType() {\n// CarType expected = CarType.SUV;\n \n }",
"public boolean verificaTipo(String tipo) {\r\n\t\tif(tipo.equals(\"single\") || tipo.equals(\"double\") || tipo.equals(\"suite\")) return true;\r\n\t\telse return false;\r\n\t}",
"@JSProperty(\"type\")\n void setType(Type value);",
"public abstract boolean isTypeCorrect();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();"
] | [
"0.7718088",
"0.7159945",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6523786",
"0.6515981",
"0.649814",
"0.64798105",
"0.63618016",
"0.63449955",
"0.6288798",
"0.6285458",
"0.62829643",
"0.6265547",
"0.6224277",
"0.62214404",
"0.62152606",
"0.6214338",
"0.62112576",
"0.6207342",
"0.6198286",
"0.619553",
"0.61949325",
"0.6186423",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6175775",
"0.6162742",
"0.6161932",
"0.61429936",
"0.61388046",
"0.6137217",
"0.61323035",
"0.61323035",
"0.61323035",
"0.61323035",
"0.61323035"
] | 0.6537111 | 3 |
Test the property 'title' | @Test
public void titleTest() {
// TODO: test title
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void assertTitle(final String title);",
"boolean hasTitle();",
"public void testGetSetTitle() {\n exp = new Experiment(\"10\");\n exp.setTitle(\"test\");\n assertEquals(\"test/set title does not work\", \"test\", exp.getTitle());\n }",
"public void validateTitle()\r\n\t{\r\n\t\tString titleDisplayed = this.heading.getText();\r\n\t\tassertEquals(titleDisplayed, \"Dashboard\");\r\n\t\tSystem.out.println(\"Value is asserted\");\r\n\t\t\t}",
"@Test \n\tpublic void homePageTitleTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\t\t\n\t\t//Fetch title \n\t\tString title = homePage.getTitle();\n\t\t\n\t\t//Assert title content \n\t\tAssert.assertTrue(title.equals(\"Lorem Ipsum - All the facts - Lipsum generator\"));\n\t}",
"public boolean verifyTitle(String title) {\n\t\tif (getter().getTitle().equals(title)) {\r\n\t\t\tSystem.out.println(\"Page title: \"+title+\" matched successfully\");\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Page url: \"+title+\" not matched\");\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"protected GuiTestObject title() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"title\"));\n\t}",
"@Test(priority=0)\n\tpublic void titleVerification() {\n\t\tString expectedTitle = \"Facebook – log in or sign up\";\n\t\tString actualTitle = driver.getTitle();\n\t\tAssert.assertEquals(actualTitle, expectedTitle);\n\t}",
"@Test\r\n\t\tpublic void testShowsCorrectTitle() {\r\n\t\t\t\r\n\t\t\t// Simply check that the title contains the word \"Hoodpopper\"\r\n\t\t\t\r\n\t\t\tString title = driver.getTitle();\r\n\t\t\tassertTrue(title.contains(\"Hoodpopper\"));\r\n\t\t}",
"public void testGetTitle() {\n System.out.println(\"getTitle\");\n Wizard instance = new Wizard();\n String expResult = \"\";\n String result = instance.getTitle();\n assertEquals(expResult, result);\n }",
"@SmallTest\n\tpublic void testTitle() {\n\t\tassertEquals(getActivity().getTitle(), solo.getString(R.string.title_activity_memory_game));\n\t}",
"@Test\n\tpublic void test_getTitle() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertEquals(\"Sherlock\",t1.getTitle());\n }",
"public boolean hasTitle(final String title);",
"@Test\n public void panelTitleTest() {\n Player.GetItem item = getPlayerHandler().getMediaItem();\n onView(withId(R.id.title)).check(matches(withText(item.getTitle())));\n }",
"@Test\n\tpublic void titlevalidation() throws IOException\n\t{\n\t\t\n\t\tLandingpage l=new Landingpage(driver);\n\t\t//compare text from the browser with the actual text\n\t\t//here comes assertion\n\t\tAssert.assertEquals(l.title().getText(),\"FEATURED COURSES\");\n\t\tlog.info(\"Compared properly\");\n\t\t\n\t}",
"@DISPID(-2147418043)\n @PropGet\n java.lang.String title();",
"public boolean isSetTitle() {\n return this.title != null;\n }",
"@Test\r\n\tpublic void testGetTitleMU() {\r\n\t\tassertEquals(\"MeetingUnit\", meetingu1.getTitle());\r\n\t}",
"@Test\r\n\tpublic void testSetGetValidTitle() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setTitle(titleValid);\r\n\t\tassertEquals(titleValid, doctor.getTitle());\r\n\t}",
"@Test\n public void testGetTitle() {\n System.out.println(\"getTitle\");\n \n String expResult = \"Title\";\n String result = instance.getTitle();\n assertEquals(\"Title not as expected\", 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 testSetTitle() {\n System.out.println(\"setTitle\");\n String title = \"Title\";\n \n instance.setTitle(title);\n \n assertTrue(\"Title unchanged\", title.equals(instance.getTitle()));\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }",
"public String getTitle() { return this.title; }",
"public String getTitle() {\r\n\t\treturn (String) getProperty(\"title\");\t\r\n\t}",
"public String getTitle() { return title; }",
"public boolean isValidTitle(Title title);",
"public String getThatTitle(){\n return this.title;\n }",
"@Test(priority = 2, dependsOnMethods = {\n\t\t\t\"navigatetosyndicationstatus\" }, description = \"To Verify Title and Title Text\")\n\tpublic void VerifyTitleTxt() throws Exception {\n\t\tdata = new TPSEE_Syndication_Status_Page(CurrentState.getDriver());\n\t\tdata.VerifyTitlenText();\n\t\taddEvidence(CurrentState.getDriver(), \"To Verify Title and Title Text\", \"yes\");\n\t}",
"String get_title()\n {\n return title;\n }",
"@Test\r\n\tpublic void testSetGetInvalidTitle() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setTitle(titleInvalid);\r\n\t\tassertEquals(titleInvalid, doctor.getTitle());\r\n\r\n\t}",
"private boolean updateTitle()\r\n\t{\r\n\t\tString newTitle = titleBase != null ? titleBase : \"\";\r\n\r\n\t\tif (propertyBrowser.isReadOnly() && readonlyText != null)\r\n\t\t{\r\n\t\t\tnewTitle += readonlyText;\r\n\t\t}\r\n\r\n\t\tif (propertyBrowser.isObjectModified() && modifiedText != null)\r\n\t\t{\r\n\t\t\tnewTitle += modifiedText;\r\n\t\t}\r\n\r\n\t\tif (title == null || !title.equals(newTitle))\r\n\t\t{\r\n\t\t\ttitle = newTitle;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void setTitle(String title) {\r\n if (title != null) {\r\n this.title = title;\r\n }\r\n else{\r\n System.out.println(\"Not a valid title\");\r\n }\r\n }",
"public boolean isSetTitle() {\n return this.Title != null;\n }",
"@Test\r\n\tpublic void testSetTitleMU() {\r\n\t\tmeetingu1.setTitle(\"UnitMeeting\");\r\n\t\tassertEquals(\"UnitMeeting\", meetingu1.getTitle());\r\n\t}",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"java.lang.String getTitle();",
"public boolean isSetTitle() {\n return this.title != null;\n }",
"public Title getTitle() {\r\n return title;\r\n }",
"String getTitle() {\r\n return title;\r\n }",
"public String GetTitle(){ return(title); }",
"@Test\n public void testGetTitle() {\n }",
"public String getTitle() { return mTitle; }",
"public void setTitle(String title) { this.title = title; }",
"public void testGetSongTitle()\r\n {\r\n assertTrue(songTitle.equals(song.\r\n getSongTitle()));\r\n }",
"public String get(String title) {\n\t\treturn prop.getProperty(title);\n\t}",
"public String getTitle()\r\n {\r\n return title;\r\n }",
"public String getTitle()\r\n {\r\n return title;\r\n }",
"@Test(priority=3, dependsOnMethods= {\"validateUrl\"})\n\tpublic void validateTtitle() {\n\t\t\n\t\tString actualTtitle = driver.getTitle();\n\t\tString expectedTitle = \"Messenger\";\n\t\tAssert.assertEquals(actualTtitle, expectedTitle);\n\t\t\n\t\t\n\t\t\n\t\tReporter.log(\"Validating the messanger page title\");\n\t\t\n\t}",
"public java.lang.String getTitle();",
"public java.lang.Object getTitle() {\n return title;\n }",
"public void verifyDashboardTitle() {\n app.azzert().titleEquals(\"PECOS\");\n }",
"@Override\r\n public String getTitle() {\n return title;\r\n }",
"@Test(dependsOnMethods = \"testAddTitleRequiredFields\")\n\tpublic void testAddTitle() {\n\t\t\n\t\t//Instantiate titles page object.\n\t\tTitlesPage titlesPageObject = new TitlesPage(driver);\n\t\t\n\t\t//Set the local title name variable to value created in titles page object.\n\t\ttitle = titlesPageObject.getTitleName();\n\t\t\n\t\t//Enter in the name value into the 'Name' field.\n\t\tReporter.log(\"Enter in a name value into the 'Name' field.<br>\");\n\t\ttitlesPageObject.enterTitleName();\n\t\t\n\t\t//Click the 'Create Title' button.\n\t\tReporter.log(\"Click the 'Create Title' button.<br>\");\n\t\ttitlesPageObject.clickCreateTitleButton();\n\t\t\n\t\t//Verify the success message is displayed to indicate a successful title creation.\n\t\tReporter.log(\"Verify an success message is displayed to indicate a successful title creation.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitlesPageSuccessMessage(), \"Unable to verify the title was successfully created; please investigate.\");\n\t\t\n\t\t//Verify the newly created title exists in the list of titles.\n\t\tReporter.log(\"Verify the newly created title value of [ \"+ title +\" ] is displayed in the list of titles on the page.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitleInList(title, true), \"Unable to verify the newly created title was found in the list of titles; please investigate.\");\n\t\t\n\t}",
"private String getTitle() {\n return title;\n }",
"public String getTitle() {\n return this.title;\n }",
"@Override\r\n\tpublic void getTitle(String title) {\n\t\t\r\n\t}",
"public String getTitle()\n {\n return title;\n }",
"@DISPID(-2147418043)\n @PropPut\n void title(\n java.lang.String rhs);",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n }",
"@Override\r\n public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\n return getProperty(Property.TITLE);\n }",
"public String getTitle() {\n\treturn title;\n}",
"public String getTitle() {\r\n return this.title;\r\n }",
"@Test\n public void titlesTest() {\n // TODO: test titles\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public String getTitle()\n {\n return title;\n }",
"public java.lang.String getTitle() {\n return title;\n }",
"public String getTitle() {\n return title;\n\n }",
"public String getTitle()\r\n {\r\n return this.title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"public String getTitle() {\r\n return title;\r\n }",
"String getTitle() {\n return title;\n }",
"@NotNull\n String getTitle();",
"@Override\n public String getTitle() {\n return title;\n }",
"@NonNull\n public String getTitle() {\n return this.title;\n }",
"public String getTitle(){\n return this.title;\n }",
"public boolean hasTitle() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public String verifyTitle(String object, String data) {\n\t\tlogger.debug(\"Verifying title\");\n\t\ttry {\n\t\t\tString actualTitle = driver.getTitle();\n\t\t\tString expectedTitle = data.trim();\n\t\t\tif (actualTitle.equals(expectedTitle))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Title not verified \" + expectedTitle + \" -- \" + actualTitle;\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Error in retrieving title\";\n\t\t}\n\t}",
"@Test\n public void fieldTitle() throws Exception {\n Document doc = new Document();\n\n // Set a value for the \"Title\" built-in document property. \n doc.getBuiltInDocumentProperties().setTitle(\"My Title\");\n\n // We can use the TITLE field to display the value of this property in the document.\n DocumentBuilder builder = new DocumentBuilder(doc);\n FieldTitle field = (FieldTitle) builder.insertField(FieldType.FIELD_TITLE, false);\n field.update();\n\n Assert.assertEquals(field.getFieldCode(), \" TITLE \");\n Assert.assertEquals(field.getResult(), \"My Title\");\n\n // Setting a value for the field's Text property,\n // and then updating the field will also overwrite the corresponding built-in property with the new value.\n builder.writeln();\n field = (FieldTitle) builder.insertField(FieldType.FIELD_TITLE, false);\n field.setText(\"My New Title\");\n field.update();\n\n Assert.assertEquals(\" TITLE \\\"My New Title\\\"\", field.getFieldCode());\n Assert.assertEquals(\"My New Title\", field.getResult());\n Assert.assertEquals(\"My New Title\", doc.getBuiltInDocumentProperties().getTitle());\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.TITLE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.TITLE.docx\");\n\n Assert.assertEquals(\"My New Title\", doc.getBuiltInDocumentProperties().getTitle());\n\n field = (FieldTitle) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_TITLE, \" TITLE \", \"My New Title\", field);\n\n field = (FieldTitle) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_TITLE, \" TITLE \\\"My New Title\\\"\", \"My New Title\", field);\n Assert.assertEquals(\"My New Title\", field.getText());\n }",
"public String getTitle(){\n \treturn this.title;\n }",
"public java.lang.String getTitle()\n {\n return this.title;\n }",
"@Test\n public void verifyTitleOfHomePageTest()\n {\n\t \n\t String abc=homepage.validateHomePageTitle();\n\t Assert.assertEquals(\"THIS IS DEMO SITE FOR \",abc );\n }",
"@Element \n public String getTitle() {\n return title;\n }",
"public String getTitle(){\n return title;\n }",
"public String getTitle(){\n return title;\n }"
] | [
"0.76258165",
"0.75384986",
"0.7513237",
"0.7495337",
"0.74719113",
"0.73645324",
"0.7319108",
"0.7302665",
"0.72511905",
"0.72304493",
"0.72076654",
"0.71960944",
"0.71933275",
"0.71859205",
"0.7157751",
"0.71317613",
"0.7122924",
"0.71143085",
"0.71122307",
"0.71036696",
"0.7055322",
"0.7054478",
"0.70530605",
"0.7046809",
"0.7029327",
"0.70124197",
"0.69942063",
"0.69841325",
"0.6964755",
"0.6951521",
"0.6945517",
"0.6940224",
"0.691925",
"0.6908907",
"0.6908907",
"0.6908907",
"0.6908907",
"0.6908907",
"0.6906685",
"0.6906317",
"0.6905225",
"0.6903332",
"0.68978983",
"0.6855493",
"0.6844459",
"0.6833702",
"0.683102",
"0.6825993",
"0.6825993",
"0.68231547",
"0.6821026",
"0.6816664",
"0.6816422",
"0.68116534",
"0.68081397",
"0.6803266",
"0.67997074",
"0.67985076",
"0.67907304",
"0.67780775",
"0.6773918",
"0.6773918",
"0.6773918",
"0.6773918",
"0.6773918",
"0.67735",
"0.67734116",
"0.6769694",
"0.67657566",
"0.67638147",
"0.67575467",
"0.67575467",
"0.67575467",
"0.67575467",
"0.67575467",
"0.67575467",
"0.67556614",
"0.67516714",
"0.67413175",
"0.67362463",
"0.67362463",
"0.67362463",
"0.67362463",
"0.67362463",
"0.67362463",
"0.67362463",
"0.6730462",
"0.6729438",
"0.67278093",
"0.67259634",
"0.6724217",
"0.6722148",
"0.67144775",
"0.6713743",
"0.67125505",
"0.6711957",
"0.6710683",
"0.67073",
"0.67035794",
"0.67035794"
] | 0.7130197 | 16 |
Test the property 'status' | @Test
public void statusTest() {
// TODO: test status
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Boolean getStatus() {return status;}",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean hasStatus();",
"boolean getStatus();",
"boolean getStatus();",
"boolean getStatus();",
"@Test\n public void testGetStatus() {\n System.out.println(\"getStatus\");\n Member instance = member;\n \n String expResult = \"APPROVED\";\n String result = instance.getStatus();\n \n assertEquals(expResult, result);\n }",
"@Test\n public void setStatus_StatusIsSet_Passes() throws Exception {\n test2JsonResponse.setStatus(test2status);\n Assert.assertEquals(test2JsonResponse.getStatus(), test2status);\n }",
"@Test\n public void test_setStatus() {\n UserStatus value = new UserStatus();\n instance.setStatus(value);\n\n assertSame(\"'setStatus' should be correct.\",\n value, TestsHelper.getField(instance, \"status\"));\n }",
"public boolean getStatus(){\r\n\t\treturn status;\r\n\t}",
"@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}",
"public Boolean getStatus() {\n return status;\n }",
"public Boolean getStatus() {\n return status;\n }",
"public Boolean getStatus() {\n return status;\n }",
"@Test\n public void getStatus_StatusIsGot_Passes() throws Exception {\n Assert.assertEquals(test1JsonResponse.getStatus(), test1status);\n }",
"@java.lang.Override\n public boolean hasStatus() {\n return status_ != null;\n }",
"@java.lang.Override\n public boolean hasStatus() {\n return status_ != null;\n }",
"public boolean getStatus() {\n\treturn status;\n }",
"@Test\n public void testSetStatus() {\n System.out.println(\"setStatus\");\n Member instance = member;\n \n String status = \"APPLIED\";\n instance.setStatus(status);\n \n String expResult = status;\n String result = instance.getStatus();\n \n assertEquals(expResult,result);\n }",
"boolean isSetStatus();",
"public Status getStatus();",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus(){\n return activestatus;\n }",
"@Test\n public void setStatusDone_shouldReturnTrueForStatus() {\n Task task = new Task(\"Test\");\n task.setStatusDone();\n Assertions.assertTrue(task.getStatus());\n }",
"public boolean isStatus() {\r\n return status;\r\n }",
"public boolean is_set_status() {\n return this.status != null;\n }",
"@Override\n\tpublic int getStatus();",
"@Override\n\tpublic int getStatus();",
"boolean isValidStatus();",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus() {\n return status_;\n }",
"public boolean getStatus() {\n return status_;\n }",
"public Status getStatus(){\n return status;\n }",
"public Status getStatus() {\r\n\t return status;\r\n\t }",
"public boolean isStatus() {\n return status;\n }",
"public boolean isStatus() {\n return status;\n }",
"public String getStatus() { return status; }",
"public boolean getStatus() {\n\t\treturn status;\n\t}",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public boolean isSetStatus() {\n return this.status != null;\n }",
"public boolean status() {\n return status;\n }",
"@Test\n public void test_getStatus() {\n UserStatus value = new UserStatus();\n instance.setStatus(value);\n\n assertSame(\"'getStatus' should be correct.\",\n value, instance.getStatus());\n }",
"public boolean getStatus()\n\t{\n\t\treturn getBooleanIOValue(\"Status\", false);\n\t}",
"public Status getStatus() {\r\n return status;\r\n }",
"public Status getStatus()\n {\n return status;\n }",
"public int getStatus();",
"public int getStatus();",
"public int getStatus();",
"public String getStatus(){\n\n //returns the value of the status field\n return this.status;\n }",
"@Override\n public Status getStatus() {\n return status;\n }",
"public java.lang.Object getStatus() {\n return status;\n }",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"public boolean returnStatus(){\n return status;\r\n }",
"@java.lang.Override\n public int getStatus() {\n return status_;\n }",
"T getStatus();",
"public Boolean isActive(){return status;}",
"boolean hasStatusChanged();",
"@java.lang.Override\n public int getStatus() {\n return status_;\n }",
"@Test\n public void testGetStatus() {\n System.out.println(\"getStatus\");\n DataModel instance = new DataModel();\n int expResult = 0;\n int result = instance.getStatus();\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 hasStatus() {\n return result.hasStatus();\n }",
"public boolean hasStatus() {\n return result.hasStatus();\n }",
"public boolean hasStatus() {\n return result.hasStatus();\n }",
"public boolean hasStatus() {\n return result.hasStatus();\n }",
"@Test\n public void setGetStatus() {\n final CourseType courseType = new CourseType();\n final Integer STATUS = 1;\n courseType.setStatus(STATUS);\n\n assertSame(STATUS, courseType.getStatus());\n }",
"public Status getStatus() {\n return status;\n }",
"public Status getStatus() {\n return status;\n }",
"public Status getStatus() {\n return status;\n }",
"Integer getStatus();",
"public int getStatus ()\n {\n return status;\n }",
"public int getStatus ()\n {\n return status;\n }",
"public boolean getResponseStatus();"
] | [
"0.76989675",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.74008524",
"0.7375437",
"0.7375437",
"0.7375437",
"0.7281541",
"0.72546244",
"0.7225339",
"0.72124475",
"0.71776414",
"0.7155138",
"0.7155138",
"0.7155138",
"0.71400934",
"0.71270955",
"0.71270955",
"0.7120547",
"0.70853883",
"0.7084083",
"0.705714",
"0.7037356",
"0.7037356",
"0.7037356",
"0.7010213",
"0.7007573",
"0.6980941",
"0.6977605",
"0.697693",
"0.697693",
"0.69623655",
"0.69409096",
"0.69409096",
"0.69409096",
"0.69356346",
"0.6917161",
"0.69057083",
"0.69057083",
"0.6882482",
"0.6865172",
"0.68495834",
"0.68495834",
"0.68495834",
"0.68495834",
"0.68495834",
"0.681654",
"0.68050957",
"0.678944",
"0.67850524",
"0.6779003",
"0.6774074",
"0.6774074",
"0.6774074",
"0.67469066",
"0.6742257",
"0.67339057",
"0.6726375",
"0.6726375",
"0.6726375",
"0.6726375",
"0.6723944",
"0.6721761",
"0.67209876",
"0.67198557",
"0.67182654",
"0.67094153",
"0.6709029",
"0.6708427",
"0.6708427",
"0.6708427",
"0.6708427",
"0.6700426",
"0.6675652",
"0.6675652",
"0.6675652",
"0.66752857",
"0.6674226",
"0.6674226",
"0.6673791"
] | 0.69896114 | 47 |
Test the property 'details' | @Test
public void detailsTest() {
// TODO: test details
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDetails() {\n return this.details;\n }",
"public void setDetails(String details) {\n this.details = details;\n }",
"public String getDetails() {\n return details;\n }",
"public void setDetails(String details) {\n\t\tthis.details = details;\n\t}",
"@Override\n\tpublic Object getDetails() {\n\t\treturn details;\n\t}",
"public String getDetails() {\n\t\treturn details;\n\t}",
"public String getDetails() {\n\t\treturn details;\n\t}",
"java.lang.String getDetails();",
"public void setDetails(String details) {\n this.mDetails = details;\n }",
"public void testDetails() {\n\t\tassertEquals(\"Incorrect target\", TARGET, this.aggregate.getTarget());\n\t\tassertEquals(\"Incorrect change description\", CHANGE_DESCRIPTION, this.aggregate.getChangeDescription());\n\t}",
"public String getDetails() {\n return mDetails;\n }",
"public String getDetails() {\n return mDetails;\n }",
"public void setDetails(String details) {\n\t\tif(details != null)\n\t\t\tthis.details = details;\n\t}",
"public String getDetail() {\r\n return detail;\r\n }",
"public String getDetail() {\r\n return detail;\r\n }",
"public String getDetail() {\n return detail;\n }",
"public String getDetail() {\n return detail;\n }",
"public String getDetail() {\n return detail;\n }",
"public String getDetail() {\n return detail;\n }",
"public String getDetail()\n {\n return detail;\n }",
"abstract String getDetails();",
"public void setDetail(String detail) {\n this.detail = detail;\n }",
"public String getDetails() {\n if(details == null)\n return \"\";\n else return details;\n }",
"public void setDetail(String detail) {\r\n this.detail = detail;\r\n }",
"@Test\n public void testCanReadDetails() throws Exception {\n final BuildDetails details = new TestJenkins().jobs().iterator().next()\n .builds().iterator().next().details();\n MatcherAssert.assertThat(\n details.fullDisplayName(),\n new IsEqual<>(\"test-different-builds-job #1\")\n );\n }",
"public void setDetail(String detail) {\n this.detail = detail;\n }",
"public void setDetail(String detail) {\n this.detail = detail;\n }",
"public void setDetail(String detail) {\n this.detail = detail;\n }",
"public void setPresentationDetails(String details) {\r\n this.details = details;\r\n }",
"public boolean showDetails() {\n return showDetails;\n }",
"public String[] getDetails() {\n\t\treturn details;\n\t}",
"public String wantDetail();",
"public Object getDetails() {\n return null;\n }",
"public void setDetails(String mDetails) {\n this.mDetails = mDetails;\n }",
"@Override\n public Object getDetails() {\n return null;\n }",
"public String getDetails() {\n return toString();\n }",
"@Override\n\tpublic void addDetails(String details) {\n\t\tthis.details = details;\n\t}",
"public void checkChangePropertyDetail(HashMap<String, String> changeData) {\n\t\tchangePropertyDetailPage.getChangePropertyInfo();\n\t\trp.info(\"Verify referenceId\");\n\t\trp.assertEquals(changePropertyDetailPage.getReferenceId(), changeData\n\t\t\t\t.get(\"referenceId\").trim());\n\t\trp.info(\"Verify referenceCategoryId\");\n\t\trp.assertEquals(changePropertyDetailPage.getReferenceCategoryId(),\n\t\t\t\tchangeData.get(\"referenceCategoryId\").trim());\n\t\trp.info(\"Verify summary\");\n\t\trp.assertEquals(changePropertyDetailPage.getSummary(),\n\t\t\t\tchangeData.get(\"summary\").trim());\n\t\trp.info(\"Verify contents\");\n\t\trp.assertEquals(changePropertyDetailPage.getContents(),\n\t\t\t\tchangeData.get(\"contents\").trim());\n\t\trp.info(\"Verify assignee\");\n\t\trp.assertEquals(changePropertyDetailPage.getAssignee(),\n\t\t\t\tchangeData.get(\"assignee\").trim());\n\t\trp.info(\"Verify category\");\n\t\trp.assertEquals(changePropertyDetailPage.getCategory(),\n\t\t\t\tchangeData.get(\"category\").trim());\n\t\trp.info(\"Verify milestone\");\n\t\trp.assertEquals(changePropertyDetailPage.getMilestone(), changeData\n\t\t\t\t.get(\"milestone\").trim());\n\t\trp.info(\"Verify all detail completed\");\n\n\t}",
"@Override\n\tpublic void getDetail() {\n\t\t\n\t}",
"@Then(\"detailed description is displaying\")\n public void detailed_description_is_displaying() {\n }",
"public void testAuditDetail_Accuracy() {\r\n assertNotNull(\"The AuditDetail instance should be created.\", auditDetail);\r\n }",
"@Override\n public String toString() {\n return detail;\n }",
"public String getAnotherDetail();",
"public void showDetails (EventTable details) {\n\t\tdetailDisplay.show(\"details\");\n\t\tthis.details.showDetails(details);\n\t}",
"public String getDetailed() {\r\n return detailed;\r\n }",
"public void setDetail(String detail) {\r\n this.detail = detail == null ? null : detail.trim();\r\n }",
"public abstract String showDetails();",
"public byte[] getDetail() {\r\n return detail;\r\n }",
"private void checkManualPlaceDetails() {\n // now in DetailActivity, check the name and address are correct\n onView(withId(R.id.et_name)).check(matches(withText(PLACE_NAME)));\n onView(withId(R.id.et_address)).check(matches(withText(PLACE_ADDRESS)));\n\n checkManualVisit();\n\n // scroll to notes EditText\n onView(withId(R.id.et_notes))\n .perform(scrollTo());\n onView(withId(R.id.et_notes)).check(matches(isDisplayed()));\n // check notes displays correct text\n onView(withId(R.id.et_notes)).check(matches(withText(NOTES)));\n\n // go back\n Espresso.pressBack();\n }",
"@ApiModelProperty(value = \"A human-readable explanation specific to this occurrence of the problem\")\n \n public String getDetail() {\n return detail;\n }",
"public void Req_detail()\n {\n\t boolean reqpresent=reqdetails.size()>0;\n\t // boolean reqpresent = driver.findElements(By.linkText(\"Requests details\")).size()>0;\n\t if(reqpresent)\n\t {\n\t\t // System.out.println(\"Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Request details report is not present\");\n\t }\n }",
"@java.lang.Override\n public boolean containsDetails(\n java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetDetails().getMap().containsKey(key);\n }",
"@java.lang.Override\n public boolean containsDetails(\n java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetDetails().getMap().containsKey(key);\n }",
"boolean containsDetails(\n java.lang.String key);",
"boolean containsDetails(\n java.lang.String key);",
"@Test public void summaryInfoTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n Assert.assertEquals(\"summary Test\", true, \n pList.summaryInfo().contains(\"Total\"));\n \n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"public final void mDETAILS() throws RecognitionException {\r\n try {\r\n int _type = DETAILS;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // Satmc.g:11:9: ( 'DETAILS' )\r\n // Satmc.g:11:11: 'DETAILS'\r\n {\r\n match(\"DETAILS\"); \r\n\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"public void testGetEAnnotationsDetails() {\r\n\t\t// any model element should do\r\n\t\tEModelElement modelElement = new Emf().getEcorePackage();\r\n\t\tEAnnotation eAnnotation = _emfAnnotations.annotationOf(modelElement, \"http://rcpviewer.berlios.de/test/source\");\r\n\t\tMap<String,String> details = new HashMap<String,String>();\r\n\t\tdetails.put(\"foo\", \"bar\");\r\n\t\tdetails.put(\"baz\", \"boz\");\r\n\t\t_emfAnnotations.putAnnotationDetails(eAnnotation, details);\r\n\t\t\r\n\t\tMap<String,String> retrievedDetails = _emfAnnotations.getAnnotationDetails(eAnnotation);\r\n\t\tassertEquals(2, retrievedDetails.size());\r\n\t\tassertEquals(\"bar\", retrievedDetails.get(\"foo\"));\r\n\t\tassertEquals(\"boz\", retrievedDetails.get(\"baz\"));\r\n\t}",
"public String getDetailsData()\n {\n WebElement element = driver.findElement(By.xpath(\"//app-hero-detail[1]/div[1]/h2[1]\"));\n return element.getText();\n }",
"List<PartDetail> getDetails();",
"@ApiModelProperty(example = \"Validation error occurred.\", value = \"A description of the error\")\n /**\n * A description of the error\n *\n * @return detail String\n */\n public String getDetail() {\n return detail;\n }",
"void displayDetails(String title, String description);",
"private void dumpServiceDetails(ServiceDetailsExt details)\n {\n log(\"*\");\n log(\"* ServiceDetails Information\");\n assertNotNull(\"ServiceDetails' Long name cannot be null\", details.getLongName());\n log(\"* SD Long Name: \" + details.getLongName());\n int prog = details.getProgramNumber();\n assertTrue(\"ServiceDetails' Program number must be -1 or greater than zero, instead found \" + prog, prog == -1\n || prog > 0);\n log(\"* SD Program Number: \" + details.getProgramNumber());\n assertTrue(\"SourceID should be greater than zero\", details.getSourceID() > 0);\n log(\"* SD SourceID: \" + details.getSourceID());\n assertNotNull(\"ServiceDetails' CA IDs cannot be null\", details.getCASystemIDs());\n int[] caIDs = details.getCASystemIDs();\n if (caIDs.length == 0)\n log(\"* SD CASystemIDs: NONE\");\n else\n {\n log(\"* SD CASystemIDs: \");\n for (int k = 0; k < caIDs.length; k++)\n {\n log(\"* \" + caIDs[k]);\n }\n }\n assertNotNull(\"ServiceDetails' DeliverySystemType cannot be null\", details.getDeliverySystemType());\n log(\"* SD DeliverySystemType: \" + details.getDeliverySystemType());\n assertNotNull(\"ServiceDetails' ServiceType cannot be null\", details.getServiceType());\n log(\"* SD ServiceType: \" + details.getServiceType());\n assertNotNull(\"ServiceDetails' ServiceInformationType cannot be null\", details.getServiceInformationType());\n log(\"* SD ServiceInformationType: \" + details.getServiceInformationType());\n assertNotNull(\"ServiceDetails' Update time cannot be null\", details.getUpdateTime());\n long now = new Date().getTime();\n long oneYearAgo = now - (1000 * 60 * 60 * 24 * 365);\n long oneYearAhead = now + (1000 * 60 * 60 * 24 * 365);\n assertTrue(\"ServiceDetails' Update time should not be more than a year off\",\n (oneYearAgo < details.getUpdateTime().getTime()) && (oneYearAhead > details.getUpdateTime().getTime()));\n log(\"* SD UpdateTime: \" + details.getUpdateTime());\n assertNotNull(\"ServiceDetails' Locator cannot be null\", details.getLocator());\n log(\"* SD Locator: \" + details.getLocator());\n assertNotNull(\"ServiceDetails' handle cannot be null\", details.getServiceDetailsHandle());\n log(\"* SD Handle: \" + details.getServiceDetailsHandle());\n assertNotNull(\"ServiceDetails' Service cannot be null\", details.getService());\n assertNotNull(\"ServiceDetails' TransportStream cannot be null\", details.getTransportStream());\n }",
"@Test\n\tpublic void getProductDetails() throws Exception {\n\n\t\tMockito.when(productService.getProductInfo(Mockito.anyLong())).thenReturn(mockProduct);\n\n\t\tRequestBuilder requestBuilder = MockMvcRequestBuilders.get(\"/products/\" + productID)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON);\n\n\t\tMvcResult result = mockMvc.perform(requestBuilder).andReturn();\n\n\t\tSystem.out.println(result.getResponse());\n\n\t\tJSONAssert.assertEquals(expected, result.getResponse().getContentAsString(), true);\n\t\tSystem.out.println(\"UnitTestSuccessful\");\n\t}",
"@When(\"Hotels Details page has finished loading\")\n public void detailspage_i_am_on_details_page() {\n detailsPage = new HotelsDetailsPage(driver);\n detailsPage.check_page_title();\n }",
"@When(\"User is on the Challenge Details screen\")\n\tpublic void user_is_on_the_Challenge_Details_screen() {\n\t\tAssert.assertEquals(fluentWaitDisplayed(creatorRCDetailsScreeen.getCreatorName(), 30, 2), true);\n\t\tAssert.assertEquals(fluentWaitDisplayed(creatorRCDetailsScreeen.getChallengeName(), 30, 2), true);\n\n\t}",
"public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }",
"public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }",
"public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }",
"public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }",
"@Test\n public void testGetInfo_1()\n throws Exception {\n LogicStep fixture = new LogicStep();\n fixture.setScript(\"\");\n fixture.setName(\"\");\n fixture.setOnFail(\"\");\n fixture.setScriptGroupName(\"\");\n fixture.stepIndex = 1;\n\n String result = fixture.getInfo();\n\n assertEquals(\"Logic Step: \", result);\n }",
"public void hideDetails () {\n\t\tdetailDisplay.show(\"empty\");\n\t}",
"@Then(\"List Employee specific details\")\r\n\tpublic void list_Employee_specific_details() {\n\t\trestTester.getSpecificEmployeeIdRecord(generatedEmployeeId);\r\n\t\tSystem.out.println(restTester.returnResponseAsString());\r\n\t\tassertTrue(restTester.returnResponseAsString().contains(\"false\"));\r\n\t}",
"com.google.protobuf.ByteString getDetailsBytes();",
"public void setDetails(String details) {\n Errors e = Errors.getInstance();\n if (details.length() > 50) {\n e.setError(\"Event details cannot be over 50 characters long\");\n }\n else\n this.details = details;\n }",
"public void setDetailed(String detailed) {\r\n this.detailed = detailed == null ? null : detailed.trim();\r\n }",
"public String getReportDetail () {\n return reportDetail;\n }",
"boolean getDesc();",
"String getRemediationDetail();",
"@Test\r\n public void testRetrieve() {\r\n\r\n PaymentDetailPojo expResult = instance.save(paymentDetail1);\r\n assertEquals(expResult, instance.retrieve(paymentDetail1));\r\n }",
"public boolean isSetLiabDetail() {\n return this.liabDetail != null;\n }",
"public void testPrintStudentDetails() {\n\t System.out.println(\"printStudentDetails\");\n\t Student instance = student1;\n\t student1.addCourse(course1);\n\t student1.addModule(module1);\n\t instance.printStudentDetails();\n\t }",
"public void setShowDetails( boolean showDetails ) {\n this.showDetails = showDetails;\n details.setVisible(showDetails);\n }",
"@Test\n\tvoid descriptionTest() {\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tString expected = \"Name: \" + item.toString() + \"\\nHeal Amount: \" + item.getHealAmount() +\n\t\t\t\t\t\"\\nCures Plague: \" + item.getCure() +\"\\nOutpost Cost: $\" + item.getPrice();\n\t\t\tassertEquals(item.itemDescription(), expected);\n\t\t}\n\t}",
"boolean hasDescription();",
"boolean hasDescription();",
"boolean hasDescription();",
"boolean isSetCustomsDetails();",
"@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n assertEquals(\"Dumb abstract building\", building.getDescription());\n }",
"@Test\n public void testDAM32001002() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n OrderMB3PageListPage orderMB3PageListPage = dam3IndexPage\n .dam32001002Click();\n\n orderMB3PageListPage.checkITM0000001();\n\n orderMB3PageListPage = orderMB3PageListPage.clickItemCodeSearch();\n\n String expectedOrdeDetails = \"Order accepted, ITM0000001\\nITM0000002, Orange juice\\nNotePC, CTG0000001\\nCTG0000002, Drink\\nPC, dummy7\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3PageListPage.getOrderDetails(7);\n\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy4\";\n actualOrderDetails = orderMB3PageListPage.getOrderDetails(4);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n }",
"public String getStatusDetails() { return statusDetails; }",
"String getDetailedDescription() {\n return context.getString(detailedDescription);\n }",
"@Override\n\tpublic void showDetails(Manufacturer entity) {\n\n\t}",
"public void setDetail(byte[] detail) {\r\n this.detail = detail;\r\n }",
"java.lang.String getDetailsOrThrow(\n java.lang.String key);",
"java.lang.String getDetailsOrThrow(\n java.lang.String key);",
"@java.lang.Override\n public java.util.Map<java.lang.String, java.lang.String> getDetailsMap() {\n return internalGetDetails().getMap();\n }",
"public String getDetail_id() {\n return detail_id;\n }"
] | [
"0.74203336",
"0.7279267",
"0.71734315",
"0.71271026",
"0.7098786",
"0.7023407",
"0.7023407",
"0.70023185",
"0.6981249",
"0.69794893",
"0.6931168",
"0.6931168",
"0.6890928",
"0.685429",
"0.685429",
"0.68241715",
"0.68241715",
"0.68241715",
"0.68241715",
"0.6817622",
"0.67913234",
"0.66122025",
"0.6564137",
"0.6562342",
"0.65621483",
"0.65381956",
"0.65381956",
"0.65381956",
"0.652809",
"0.64944136",
"0.64918256",
"0.64765376",
"0.6471492",
"0.64487326",
"0.63638985",
"0.6352304",
"0.6296728",
"0.6253225",
"0.625046",
"0.6191923",
"0.61443746",
"0.61218315",
"0.6066847",
"0.6032816",
"0.60319924",
"0.6023144",
"0.59901893",
"0.5987149",
"0.59497935",
"0.5940591",
"0.5918913",
"0.5904098",
"0.58928835",
"0.5873613",
"0.5873613",
"0.58559835",
"0.5828812",
"0.5804346",
"0.57982534",
"0.57834345",
"0.5778295",
"0.57594645",
"0.57510495",
"0.5740557",
"0.5736424",
"0.57264435",
"0.5726045",
"0.57257426",
"0.57257426",
"0.57257426",
"0.57257426",
"0.5717059",
"0.5670251",
"0.56564003",
"0.5648371",
"0.5626111",
"0.56231964",
"0.55926806",
"0.55875796",
"0.5579127",
"0.5578374",
"0.5569503",
"0.55673355",
"0.5545477",
"0.5533223",
"0.5524978",
"0.5524978",
"0.5524978",
"0.5524129",
"0.55156887",
"0.54950327",
"0.54912436",
"0.5473036",
"0.54696375",
"0.5469537",
"0.5469485",
"0.5469485",
"0.5463028",
"0.5459862"
] | 0.66731024 | 22 |
Test the property 'instance' | @Test
public void instanceTest() {
// TODO: test instance
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasInstance();",
"@Test\n public void testGetInstance() throws Exception {\n HealthRecordController copy1 = HealthRecordController.getInstance();\n assert(HealthRecordController.getInstance() != null);\n assert(copy1 == HealthRecordController.getInstance());\n }",
"@java.lang.Override\n public boolean hasInstance() {\n return stepInfoCase_ == 5;\n }",
"@java.lang.Override\n public boolean hasInstance() {\n return stepInfoCase_ == 5;\n }",
"@Test\n public void testGetInstance() {\n System.out.println(\"getInstance\");\n ConnectionManager result = ConnectionManager.getInstance();\n assertNotNull(result);\n assertEquals(instance,result);\n }",
"public void testGetInstance() {\n\t\tREDFinder finder = REDFinder.getInstance();\n\t\tassertSame(\"getInstance returned not the same object.\", finder,\n\t\t\t\tREDFinder.getInstance());\n\t}",
"public boolean isValid() {\n return instance != null;\n }",
"@org.testng.annotations.Test\n public void testGetInstance() throws Exception {\n System.out.println(\"getInstance\");\n Store result = Store.getInstance();\n assertEquals(result, Store.getInstance());\n assertTrue(result instanceof Store);\n }",
"public static boolean hasInstance() {\n return instance != null;\n }",
"public void testConstructor() {\r\n assertNotNull(\"unable to create instance\", instance);\r\n }",
"public void testGetInstance(){\r\n assertNotNull(this.lm);\r\n }",
"@Test\n public void testGetInstance() {\n\n // singleton\n assertSame(GestionnaireRaccourcis.getInstance(), GestionnaireRaccourcis.getInstance());\n }",
"@Test\n public void testGetInstance() {\n System.out.println(\"getInstance\");\n Fabrica expResult = Fabrica.getInstance();\n Fabrica result = Fabrica.getInstance();\n assertEquals(expResult, result);\n \n }",
"public void test_ctor() {\n assertNotNull(\"instance should be created.\", instance);\n }",
"@Test\n public void publicInstanceTest() {\n // TODO: test publicInstance\n }",
"private boolean checkInstance(Instance instance) {\n for (EC2AbstractSlave node : NodeIterator.nodes(EC2AbstractSlave.class)) {\n if ( (node.getInstanceId().equals(instance.getInstanceId())) &&\n (! (instance.getState().getName().equalsIgnoreCase(InstanceStateName.Stopped.toString())\n ))\n ){\n logInstanceCheck(instance, \". false - found existing corresponding Jenkins agent: \" + node.getInstanceId());\n return false;\n }\n }\n logInstanceCheck(instance, \" true - Instance is not connected to Jenkins\");\n return true;\n }",
"@Test\n public void testGetInstance() {\n System.out.println(\"getInstance test ---\");\n ChannelController expResult = ChannelController.getInstance();\n ChannelController result = ChannelController.getInstance();\n assertTrue(expResult == result);\n }",
"boolean containsInstance(Instance instance);",
"public void verifyInstance(HelixZkClient zkClient, String clusterName, String instance,\n boolean wantExists) {\n String instanceConfigsPath = PropertyPathBuilder.instanceConfig(clusterName);\n String instanceConfigPath = instanceConfigsPath + \"/\" + instance;\n String instancePath = PropertyPathBuilder.instance(clusterName, instance);\n Assert.assertEquals(wantExists, zkClient.exists(instanceConfigPath));\n Assert.assertEquals(wantExists, zkClient.exists(instancePath));\n }",
"public boolean isManaged(T instance) {\r\n\t\tif (instance != null) {\r\n\t\t\tif (instance.getId() > 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} \r\n\t\treturn false;\r\n\t}",
"public static test5 getinstance(){\r\n\t\t return instance;\r\n\t }",
"public PropertyInstanceTest(String name) {\n\t\tsuper(name);\n\t}",
"@Test\r\n public void testGetInstance() {\r\n System.out.println(\"getInstance\");\r\n assertNotNull(sm);\r\n \r\n SessionManager instance = SessionManager.getInstance();\r\n assertEquals(instance, sm);\r\n }",
"@Test\n public void testNewInstance(){\n car = Car.newInstance();\n assertNotNull(car);\n assertNotNull(car.getID());\n }",
"public void testGetObjectInstance() throws Exception {\r\n\t\t// test setup\r\n\t\tfinal int expectedValue = 100;\r\n\t\t// stub builder to be used in test\r\n\t\tObjectFactoryBuilder factoryBuilder = new ObjectFactoryBuilder() {\r\n\t\t\tpublic ObjectFactory createObjectFactory(Object var0, Hashtable var1) throws NamingException {\r\n\t\t\t\treturn new ObjectFactory() {\r\n\t\t\t\t public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception {\r\n\t\t\t\t return new Integer(expectedValue);\r\n\t\t\t\t }\r\n\t\t\t\t};\r\n\t\t\t}\r\n };\r\n\t\t\r\n\t\tServiceReference serviceReference = \r\n\t\t\tgetContext().getServiceReference(\"org.osgi.service.jndi.JNDIProviderAdmin\");\r\n\t\tassertNotNull(\"JNDIProviderAdmin service was not published as expected\", serviceReference);\r\n\t\t\r\n\t\tJNDIProviderAdmin contextAdmin = \r\n\t\t\t(JNDIProviderAdmin) getContext().getService(serviceReference);\r\n \r\n // only register the builder implementation\r\n registerService(ObjectFactoryBuilder.class.getName(), factoryBuilder, null);\r\n\r\n\r\n // reference data does not matter, since we're testing that\r\n // the factory manager can locate the only ObjectFactory registered.\r\n Reference reference = new Reference(\"test\", \"com.test.factory.DoesNotExist\", null);\r\n // invoke getObjectInstance on the JNDIProviderAdmin service\r\n Object result = contextAdmin.getObjectInstance(reference, null, null, new Hashtable());\r\n assertEquals(\"JNDI Factory Manager did not locate the correct ObjectFactory\", \r\n new Integer(expectedValue), result);\r\n\t}",
"@Test\n public void testGetInstance()\n {\n System.out.println(\"TEST: getInstance\");\n TomTomReader result = TomTomReader.getInstance();\n assertNotEquals(null, result);\n }",
"@Test\n public void testGetBackendInstance() throws EiBackendInstancesException {\n utils.setBackendInstances(instances);\n String nameToGet = instances.get(0).getAsJsonObject().get(\"name\").getAsString();\n BackendInstance result = utils.getBackendInstance(nameToGet);\n\n assertEquals(\"Expected instance data:\\n\" + instances.get(0).getAsJsonObject() + \"\\nBut got data:\\n\"\n + result.getAsJsonObject(), instances.get(0).getAsJsonObject(), result.getAsJsonObject());\n\n // No back end data exist\n exceptionRule.expect(EiBackendInstancesException.class);\n utils.setBackendInstances(new JsonArray());\n utils.getBackendInstance(\"does not exist\");\n }",
"private boolean isAllowed(ProcessInstance instance) {\r\n return true; // xoxox\r\n }",
"@Test\n public void testGetValue() {\n System.out.println(\"getValue\");\n Setting instance = null;\n Object expResult = null;\n Object result = instance.getValue();\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 testBooleanProperty() {\n try (ReleasableVariant started = classObject.get(\"Started\")) {\n Assertions.assertTrue(started.booleanValue());\n }\n }",
"@Test\n public void testGetPermissionInstance() throws Exception\n {\n permission = permissionManager.getPermissionInstance();\n assertNotNull(permission);\n assertTrue(permission.getName() == null);\n }",
"public void testCtor2() {\n assertNotNull(\"Failed to create PropertiesPanel instance.\", instance);\n }",
"private void initInstance() {\n init$Instance(true);\n }",
"public void test_getType() {\n assertEquals(\"'type' value should be properly retrieved.\", type, instance.getType());\n }",
"public static boolean hasInstance()\n\t{\n \tif(wdba == null)\n \t\treturn false;\n \telse\n \t\treturn true;\n\t}",
"@Test\n public void testEquals() throws StoreException {\n System.out.println(\"equals\");\n boolean expResult = false;\n boolean result = instance.equals(new Object());\n assertEquals(result, expResult);\n\n assertEquals(instance.equals(Store.getInstance()), true);\n }",
"void instanceChanged();",
"@Test\n public void testGetBenachrichtigungVerwaltung(){\n assertNotNull(BenachrichtigungVerwaltung.getInstance());\n }",
"@Test\n\tpublic void testInstanciaMrMe(){\n\t\tassertTrue(MrMe instanceof MrMeeseeks);\n\t}",
"@Test\n public void testGetId() {\n System.out.println(\"getId\");\n Member instance = member;\n \n String expResult = \"myId\";\n String result = instance.getId();\n \n assertEquals(expResult, result);\n }",
"@Test\n\tpublic void testGetInstance_1()\n\t\tthrows Exception {\n\n\t\tSaveScenarioAction result = SaveScenarioAction.getInstance();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getKeys());\n\t\tassertEquals(true, result.isEnabled());\n\t}",
"@Test\n\tpublic void testGetInstance_2()\n\t\tthrows Exception {\n\n\t\tSaveScenarioAction result = SaveScenarioAction.getInstance();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getKeys());\n\t\tassertEquals(true, result.isEnabled());\n\t}",
"@Test\n public void testSelfInstanceVarReflectionObjectCycle() {\n final SelfInstanceVarReflectionTestFixture test = new SelfInstanceVarReflectionTestFixture();\n assertEquals(this.toBaseString(test) + \"[typeIsSelf=\" + this.toBaseString(test) + \"]\", test.toString());\n }",
"@Test\r\n\tpublic final void testGetInstance() {\r\n\t\tComparatorFacade facade = ComparatorFacade.getInstance();\r\n\t\tAssert.assertSame(singleton, facade);\r\n\t}",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"@java.lang.Override\n public boolean getPrivateInstance() {\n return privateInstance_;\n }",
"private boolean isInstanceLocationSet() {\n \t\tActivator activator = Activator.getDefault();\n \t\tif (activator == null)\n \t\t\treturn false;\n \t\tLocation service = activator.getInstanceLocation();\n \t\tif (service == null)\n \t\t\treturn false;\n \t\treturn service.isSet();\n \t}",
"@Test\r\n public void testGetTypeId() {\r\n System.out.println(\"getTypeId\");\r\n \r\n int expResult = 0;\r\n int result = instance.getTypeId();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }",
"@java.lang.Override\n public boolean getPrivateInstance() {\n return privateInstance_;\n }",
"public void testGetObj() {\n System.out.println(\"getObj\");\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.getObj();\n assertEquals(expResult, result);\n }",
"@Test\n public void testHasTemperaturaVariation() {\n System.out.println(\"hasTemperaturaVariation\");\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n boolean expResult = true;\n instance.setHasTemperaturaVariation(expResult);\n boolean result = instance.hasTemperaturaVariation();\n assertEquals(expResult, result);\n }",
"public void testGetOwner() {\n System.out.println(\"getOwner\");\n Wizard instance = new Wizard();\n Component result = instance.getOwner();\n assertNotNull(result);\n }",
"@Test\n\tpublic void testPropertyInSuper() {\n\t\tfinal Valuable valuable = context.mock(Valuable.class);\n\t\tcontext.checking(new PropertyEnabledExpectations() {\n\t\t\t{\n\t\t\t\tallowingProperty(valuable).getId();\n\t\t\t\twill(returnValue(INITIAL));\n\t\t\t}\n\t\t});\n\n\t\tassertEquals(\"Initial value not set\", INITIAL, valuable.getId());\n\t}",
"@Test\n public void shouldInjectInstances() {\n Assert.assertNotNull(notificationServiceComposite);\n Assert.assertNotNull(notificationService);\n }",
"@Test\n public void testGet() {\n System.out.println(\"get\");\n int id = 0;\n Address result = instance.get(id);\n assertTrue(result.validate());\n \n }",
"@Test\n public void testCatalog() {\n System.out.println(\"catalog\");\n Setting instance = Setting.factory();\n String key1 = instance.getName();\n instance.setName(\"funny\");\n\n instance.catalog();\n assertTrue(Setting.isNotUsed(key1));\n assertFalse(Setting.isNotUsed(\"funny\"));\n\n }",
"public boolean getAlive() {\n return instance.getAlive();\n }",
"@Test\n public void testGetInstance() {\n assertNotNull(eventDispatcher);\n }",
"protected PropertyInstance getFixture() {\n\t\treturn fixture;\n\t}",
"public void testing() {\n\t\tprotectedInstanceVariable = \"\";\n\t}",
"@Test\n public void testBooleanPropertyQuick() {\n Assertions.assertTrue(classObject.getBoolean(\"Started\"));\n }",
"@Test\n\tpublic void testPublicInstanceVars() {\n\t\tip = new ImagePlus();\n\t\tassertFalse(ip.changes);\n\t\t/* OBSOLETE\n\t\tassertEquals(1.0,ip.pixelHeight,0.0);\n\t\tassertEquals(1.0,ip.pixelWidth,0.0);\n\t\tassertEquals(\"pixel\",ip.unit);\n\t\tassertEquals(\"pixel\",ip.units);\n\t\tassertFalse(ip.sCalibrated);\n\t\t*/\n\t}",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }",
"@Test\n public void testGetName() {\n System.out.println(\"getName\");\n Member instance = member;\n \n String expResult = \"myName\";\n String result = instance.getName();\n \n assertEquals(expResult, result);\n }",
"public boolean isSingleton () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"@Test\n public void testGetStatus() {\n System.out.println(\"getStatus\");\n Member instance = member;\n \n String expResult = \"APPROVED\";\n String result = instance.getStatus();\n \n assertEquals(expResult, result);\n }",
"@Test\r\n\tpublic void testContributormanagerInstance() {\r\n\t\tcm = Contributormanager.getInstance();\r\n\t\tassertTrue(cm.isEmpty());\r\n\t\tassertTrue(cm.addContributor(\"Chris\"));\r\n\t\tcm = Contributormanager.getInstance();\r\n\t\tassertFalse(cm.isEmpty());\r\n\t\tassertFalse(cm.addContributor(\"Chris\"));\r\n\t}",
"@Test\n public void testValiderPrenom() {\n Beneficiaire instance = ben1;\n boolean expResult = true;\n boolean result = instance.validerPrenom();\n assertEquals(expResult, result);\n\n instance = ben2;\n expResult = false;\n result = instance.validerPrenom();\n assertEquals(expResult, result);\n\n }",
"public void testGetOwner_1_accuracy() {\n instance.setOwner(owner);\n assertTrue(\"Owner is not set properly.\", owner == instance.getOwner());\n }",
"public static CowTester getInstance() {\n return instance;\n }",
"public static boolean instanceType(FileInputStream f){\n if(observer != null){\n observer.parser.setCurrentRule(\"instanceType\", true);\n }\n CToken t = new CToken();\n\n t = getUsePeek(f);\n \n if(!t.token.equals(\"instance\")){\n return false;\n }\n CScanner.needToUsePeekedToken = false; \n //token == instance\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n //identifier\n if(!t.type.equals(\"Identifier\")){\n System.err.format(\"Syntax Error: In rule InstanceType unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n } //if not an identifer\n //else, we all good\n if(observer != null){\n observer.parser.setCurrentRule(\"instanceType\", false);\n }\n return true;\n }",
"@Test\r\n public void testIsMatin() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : isMatin\");\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setMatin(false);\r\n boolean expResult = false;\r\n boolean result = instance.isMatin();\r\n assertEquals(expResult, result);\r\n }",
"@Test\n public void testIntProperty() {\n try (ReleasableVariant procId = classObject.get(\"ProcessId\")) {\n Assertions.assertNotEquals(0, procId.intValue());\n }\n }",
"@Test\n public void getStopTest() {\n boolean expectedValue = animal.getStop();\n Assert.assertEquals(expectedValue,false);\n }",
"public Instances getTesting()\n {\n return new Instances(mTesting);\n }",
"public Instance() {\n super(Routing.NAMESPACE, \"instance\");\n }",
"synchronized public static void setInstance(SampletypeManager instance)\n {\n singleton = instance;\n }",
"public static boolean isInstance(java.lang.Object param0) {\n if (!(param0 instanceof org.xms.g.utils.XGettable)) {\n return false;\n }\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n return ((org.xms.g.utils.XGettable) param0).getHInstance() instanceof com.huawei.hms.support.api.client.ResultConvert;\n } else {\n return ((org.xms.g.utils.XGettable) param0).getGInstance() instanceof com.google.android.gms.common.api.ResultTransform;\n }\n }",
"@Test\n public void TestSingletonInitialization() {\n\t\tassertSame(SingletonClass.getInstance(), SingletonClass.getInstance());\n }",
"@Test\n public void testSelfInstanceTwoVarsReflectionObjectCycle() {\n final SelfInstanceTwoVarsReflectionTestFixture test = new SelfInstanceTwoVarsReflectionTestFixture();\n assertEquals(this.toBaseString(test) + \"[otherType=\" + test.getOtherType().toString() + \",typeIsSelf=\" + this.toBaseString(test) + \"]\", test.toString());\n }",
"@Test\n public void testValiderNom() {\n\n Beneficiaire instance = ben1;\n boolean expResult = true;\n boolean result = instance.validerNom();\n assertEquals(expResult, result);\n\n instance = ben2;\n expResult = false;\n result = instance.validerNom();\n assertEquals(expResult, result);\n }",
"@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings(), settings);\n }",
"@Test\n public void testSetClient() {\n\n Client client = client2;\n Beneficiaire instance = ben1;\n instance.setClient(client);\n assertEquals(client, instance.getClient());\n\n\n }",
"@Test\n public void testRandomPiece() {\n System.out.println(\"randomPiece\");\n Player instance = new Player(PlayerColor.WHITE, \"\");\n Piece result = instance.randomPiece();\n\n assertFalse(instance.getPieces().contains(result));\n\n }",
"public boolean getPropertyAlive();",
"public static boolean getInsta() {\n return insta;\n }",
"@ApiModelProperty(value = \"Flag indicating whether to normalize the instance\")\n public Boolean isNormalizeInstance() {\n return normalizeInstance;\n }",
"public static boolean isInstance(java.lang.Object param0) {\n throw new java.lang.RuntimeException(\"Not Supported\");\n }",
"@Override\n\tpublic synchronized boolean found(MotifInstance<V,E> instance) {\n\t\tObject identifier = groupBy.getGroupIdentifier(instance);\n\t\tif (instanceIdentifiers.add(identifier)) {\n\t\t\t//System.out.println(\"added,\" + identifier+','+Thread.currentThread().getId());\n\t\t\treturn delegate.found(instance);\n\t\t}\n\t\telse {\n\t\t\t//System.out.println(\"rejected,\" + identifier+','+Thread.currentThread().getId());\n\t\t}\n\t\treturn true;\n\t}",
"public Instance() {\n }",
"@Test\n public void equalsSelfTest() {\n assertEquals(device, device);\n }",
"@Test\r\n public void testGetId() {\r\n System.out.println(\"getId\");\r\n \r\n int expResult = 0;\r\n int result = instance.getId();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }",
"public void testIsModal() {\n System.out.println(\"isModal\");\n Wizard instance = new Wizard();\n boolean expResult = false;\n boolean result = instance.isModal();\n assertEquals(expResult, result);\n }",
"@Override\n public T getInstance() {\n return instance;\n }",
"public static boolean isInstance(java.lang.Object param0) {\n if (!(param0 instanceof org.xms.g.utils.XGettable)) {\n return false;\n }\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n return ((org.xms.g.utils.XGettable) param0).getHInstance() instanceof com.huawei.hms.location.ActivityConversionRequest;\n } else {\n return ((org.xms.g.utils.XGettable) param0).getGInstance() instanceof com.google.android.gms.location.ActivityTransitionRequest;\n }\n }",
"@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Test\n public void testGetClient() {\n\n Beneficiaire instance = ben1;\n Client expResult = client1;\n Client result = instance.getClient();\n assertEquals(expResult, result);\n\n instance = ben3;\n expResult = client1;\n result = instance.getClient();\n assertEquals(expResult, result);\n\n instance = ben2;\n expResult = client1;\n result = instance.getClient();\n assertEquals(expResult, result);\n }",
"public T getInstance() {\n return instance;\n }",
"@Test\r\n public void testIsAvailability() {\r\n System.out.println(\"isAvailability\");\r\n Table instance = new Table(\"s\",1);\r\n boolean expResult = true;\r\n boolean result = instance.isAvailability();\r\n assertEquals(expResult, result);\r\n \r\n }"
] | [
"0.66532195",
"0.64099646",
"0.6408215",
"0.64074206",
"0.6309724",
"0.62918997",
"0.626523",
"0.62395585",
"0.6234945",
"0.6207778",
"0.61605096",
"0.61511546",
"0.61398244",
"0.6132428",
"0.6131864",
"0.6102573",
"0.6099932",
"0.6075622",
"0.6066422",
"0.596465",
"0.5960139",
"0.5889319",
"0.5888603",
"0.5846757",
"0.5843527",
"0.5839997",
"0.5803633",
"0.57806545",
"0.5767925",
"0.5763928",
"0.57604325",
"0.5760121",
"0.573274",
"0.57218915",
"0.5716531",
"0.5690539",
"0.5671549",
"0.56691617",
"0.5647154",
"0.5602345",
"0.5582051",
"0.55751604",
"0.55714965",
"0.557017",
"0.5562658",
"0.5553774",
"0.5552381",
"0.5549395",
"0.55371773",
"0.55251324",
"0.5522753",
"0.5513735",
"0.55115944",
"0.55092907",
"0.5485716",
"0.54796106",
"0.5477402",
"0.54646075",
"0.5447867",
"0.54322004",
"0.53940314",
"0.53885597",
"0.53841835",
"0.538277",
"0.5376964",
"0.5372336",
"0.5367551",
"0.53467864",
"0.5339827",
"0.5329863",
"0.5324762",
"0.53221315",
"0.5307804",
"0.53059024",
"0.5295222",
"0.529515",
"0.5285033",
"0.5283466",
"0.52823246",
"0.52779645",
"0.5270267",
"0.52639985",
"0.526355",
"0.52619135",
"0.5259524",
"0.5258287",
"0.525668",
"0.5255495",
"0.52554893",
"0.52547234",
"0.52489257",
"0.5245113",
"0.5232872",
"0.52324265",
"0.52251637",
"0.52187645",
"0.5209709",
"0.5205818",
"0.5204959",
"0.5200378"
] | 0.6896057 | 0 |
TODO Autogenerated method stub | @Override
public String toString() {
return "userName " + this.userName + ", pasword " + this.passWord + "sex " + userSex.name();
} | {
"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 |
Testing the class that returns an instance of a database Connection object. Checks if the Connection instance is null. That means that the connection is not successful and something is wrong. | @Test
public void testGetDbInstance(){
Connection c = DatabaseConnect.getInstance();
assertTrue(c != null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testGetConnection() throws SQLException\n\t{\n\t\tassertTrue(DatabaseGateway.getConnection() != null);\n\t}",
"@Test\n public void testConstructorConnection() {\n assertEquals(connection, dao.getDatabaseConnection());\n }",
"@Test\n public void testGetConnection() {\n System.out.println(\"getConnection\");\n Connection result = instance.getConnection();\n assertTrue(result!=null);\n \n }",
"public boolean testConnection()\r\n { \r\n try {\r\n myConn = DriverManager.getConnection(getconn + \"?user=\" + user + \"&password=\" + pass);\r\n //Connection successfully connected check sourced from Stack Overflow\r\n //Source: https://stackoverflow.com/questions/7764671/java-jdbc-connection-status\r\n if (!myConn.isClosed() || myConn != null)\r\n return true;\r\n return false;\r\n //End borrowed code\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n //Logger.getLogger(SQLConnector.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }",
"public boolean testConnection(){\n\t\tboolean connected = false;\n\t\ttry {\t\t\t\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tconnected = true;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t}\n\n\t\treturn connected;\n\t}",
"public void CheckConnection() {\n\t\tconn = SqlConnection.DbConnector();\n\t\tif (conn == null) {\n\t\t\tSystem.out.println(\"Connection Not Successful\");\n\t\t\tSystem.exit(1);\n\t\t} else {\n\t\t\tSystem.out.println(\"Connection Successful\");\n\t\t}\n\t}",
"@Test\n\tpublic void testGetConnection() throws SQLException {\n\t\tint count = pool.idleConnectionsCount();\n\t\tConnection connection = pool.getConnection(config.getConnectionTimeout());\n\t\tAssert.assertEquals(((ConnectionItem) connection).state().get() , ConnectionItem.STATE_IN_USE);\n\t\tAssert.assertEquals(count - 1 , pool.idleConnectionsCount());\n\t}",
"public void testConnecitonFails() {\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tConnection c = new Connection(\"localhost\", 4444, this, this);\n\t\t\t// this connection should fail... wait for that:\n\t\t\tfor (int i=0; i<10; i++) {\n\t\t\t\t// if we have a result before our max-wait-time, break\n\t\t\t\tif (connectionStatus != null)\n\t\t\t\t\tbreak;\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\t\n\t\t\tassertTrue(connectionStatus != null && connectionStatus.booleanValue() == false);\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(\"should not get an exception\", false);\n\t\t}\n\t}",
"private static void getConnectionTest() {\n\t\ttry {\r\n\t\t\tConnection conn=CartDao.getConnection();\r\n\t\t\tif(conn==null) System.out.println(\"disconnect\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"final void checkEnsure() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (this.conn == null || this.conn.isClosed()) {\r\n\t\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (--this.loops < 0 || this.date < System.currentTimeMillis()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this.databaseType == ConnectionHolder.DT_UNKNOWN) {\r\n\t\t\t\tthis.databaseType = this.conn.getMetaData().getDatabaseProductName().toUpperCase().indexOf(\"ORACLE\") == -1\r\n\t\t\t\t\t? ConnectionHolder.DT_NORMAL\r\n\t\t\t\t\t: ConnectionHolder.DT_ORACLE;\r\n\t\t\t}\r\n\t\t\ttry (final Statement st = this.conn.createStatement()) {\r\n\t\t\t\t/** Do not use it here, may be unsupported? */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst.setQueryTimeout(10);\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tst.execute(\r\n\t\t\t\t\t\tthis.databaseType == ConnectionHolder.DT_ORACLE\r\n\t\t\t\t\t\t\t? \"SELECT 5 FROM DUAL\"\r\n\t\t\t\t\t\t\t: \"SELECT 5\");\r\n\t\t\t}\r\n\t\t} catch (final SQLException e) {\r\n\t\t\tif (this.conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t}\r\n\t}",
"@Test\n public void shouldConnectToDB()\n {\n assertTrue(DatabaseHelper.checkConnection());\n }",
"public void testNotReady() throws Exception {\n Properties props = new Properties();\n props.setProperty(LockssRepositoryImpl.PARAM_CACHE_LOCATION, tempDirPath);\n props\n\t.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath);\n props.setProperty(SqlDbManager.PARAM_DATASOURCE_CLASSNAME, \"java.lang.String\");\n ConfigurationUtil.setCurrentConfigFromProps(props);\n\n startService();\n assertEquals(false, sqlDbManager.isReady());\n\n Connection conn = null;\n try {\n conn = sqlDbManager.getConnection();\n } catch (SQLException sqle) {\n }\n assertNull(conn);\n\n }",
"public void testConnection() {\n\t\ttry {\n\t\t\tinit();\n\n\t\t} catch (Exception e) {\n\t\t\tif (log.isDebugEnabled())\n\t\t\t\tlog.error(\"Erro teste Conexao \", e);\n\t\t\tthrow new ConnectorException(\"Falha no teste de conexao : \"\n\t\t\t\t\t+ e.getMessage() + \". Check os detalhes da conexao.\");\n\t\t}\n\t}",
"@Test\n public void connectionNullTest() throws GeneralException {\n JavaRuleContext testRuleContext = buildTestJavaRuleContext();\n testRuleContext.getArguments().remove(JDBCBuildMapRule.ARG_CONNECTION);\n\n assertThrows(GeneralException.class, () -> jdbcBuildMapRule.execute(testRuleContext));\n verify(jdbcBuildMapRule).internalValidation(eq(testRuleContext));\n verify(jdbcBuildMapRule, never()).internalExecute(eq(testRuleContext), any());\n }",
"public static boolean testConn() {\r\n\t\tboolean bool = false;\r\n\t\ttry (Connection conn = DataSource.getConnection()) {\r\n\t\t\tbool = conn.isValid(0);\r\n\t\t\tif (bool == true){\r\n\t\t\t\tdbStatus = \"ONLINE\";\r\n\t\t\t}\r\n\t\t\telse dbStatus = \"OFFLINE\";\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn bool;\r\n\t}",
"@Override\n public boolean verifyJobDatabase() {\n try (Connection conn = getConnection()) {\n } catch (Exception e) {\n LOG.error(\"Failed to verify connection to the Job Database. \", e);\n return false;\n }\n return true;\n }",
"private static void checkConn() {\n try {\n if (conns.isClosed()) conns = Connect.getConnect();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public Connection createConnection(){\n Connection conn = null;\n registerDriver();\n createURL();\n\n try {\n conn = DriverManager.getConnection(urlDB,username,password);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n System.out.println((conn != null)?\"You made it, take control your database now!\":\"Failed to make connection!\");\n\n return conn;\n}",
"private void ensureConnection() {\n Objects.requireNonNull(connection);\n }",
"@Test\n public void testIsConnected() throws MainException {\n System.out.println(\"isConnected\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n boolean result = instance.isConnected();\n assertEquals(expResult, result);\n instance.disconnect();\n result = instance.isConnected();\n assertEquals(false, result);\n\n }",
"@Test\n public void testRegister_connectionException() throws SQLException {\n SignUpRequest request = new SignUpRequest(UNIQUE, PASSWORD);\n\n doThrow(SQLException.class).when(connection).register(request);\n\n dao.register(request);\n\n verify(controller).connectionFailed();\n }",
"@Test(timeout = 4000)\n public void test035() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.connect((JDBCConnectData) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test\n public void testGetterSetterConnection() {\n UserDao userDao = new UserDao();\n userDao.setDatabaseConnection(connection);\n assertEquals(connection, userDao.getDatabaseConnection());\n }",
"@Test\n public void testConnect() throws MainException {\n System.out.println(\"connect\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n Connection result = instance.connect();\n assertNotNull(result);\n boolean expResult = true;\n assertEquals(instance.isConnected(), expResult);\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n // Undeclared exception!\n try { \n DBUtil.executeQuery(\"c\", jdbcConnection0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.hsqldb.jdbc.jdbcStatement\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test066() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.query(\"No JDBC URL specified\", (Connection) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test015() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n // Undeclared exception!\n try { \n DBUtil.queryScalar(\"\", jdbcConnection0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.hsqldb.jdbc.jdbcStatement\", e);\n }\n }",
"@Test(expected=SQLTimeoutException.class)\n\tpublic void testNoIdleConnectionsWhenGetConnection() throws SQLException {\n\t\tconfig.setConnectionTimeout(TimeUnit.SECONDS.toMillis(1));\n\t\tfor (int i= 0; i < pool.totalConnections(); i++) {\n\t\t\tpool.getConnection();\n\t\t}\n\t\tpool.getConnection();\n\t}",
"public void testGetConnection() {\r\n \r\n }",
"@Test\r\n\tpublic void testChooseConnection() throws Exception {\n\t}",
"Connection getConnection() throws SQLException;",
"Connection getConnection() throws SQLException;",
"final boolean checkAlive() {\r\n\t\t\r\n\t\tif (this.conn == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (this.conn.isClosed()) {\r\n\t\t\t\tthis.conn = null;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (--this.loops < 0 || this.date < System.currentTimeMillis()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = null;\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (this.databaseType == ConnectionHolder.DT_UNKNOWN) {\r\n\t\t\t\tthis.databaseType = this.conn.getMetaData().getDatabaseProductName().toUpperCase().indexOf(\"ORACLE\") == -1\r\n\t\t\t\t\t? ConnectionHolder.DT_NORMAL\r\n\t\t\t\t\t: ConnectionHolder.DT_ORACLE;\r\n\t\t\t}\r\n\t\t\ttry (final Statement st = this.conn.createStatement()) {\r\n\t\t\t\t/** Do not use it here, may be unsupported? */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst.setQueryTimeout(10);\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tst.execute(\r\n\t\t\t\t\t\tthis.databaseType == ConnectionHolder.DT_ORACLE\r\n\t\t\t\t\t\t\t? \"SELECT 5 FROM DUAL\"\r\n\t\t\t\t\t\t\t: \"SELECT 5\");\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} catch (final SQLException e) {\r\n\t\t\tif (this.conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = null;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"protected void checkConnectionProvider() {\n\t\tfinal Connection connection = connectionProvider.getConnection();\n\t\ttry {\n\t\t\tfinal DatabaseMetaData databaseMetaData = connection.getMetaData();\n\t\t\tfinal String name = databaseMetaData.getDatabaseProductName();\n\t\t\tfinal String version = databaseMetaData.getDatabaseProductVersion();\n\n\t\t\tif (log.isInfoEnabled()) {\n\t\t\t\tlog.info(\"Connected to database: \" + name + \" v\" + version);\n\t\t\t}\n\t\t} catch (final SQLException sex) {\n\t\t\tlog.error(\"DB connection failed: \", sex);\n\t\t} finally {\n\t\t\tconnectionProvider.closeConnection(connection);\n\t\t}\n\t}",
"@Before\r\n\tpublic void setUp() throws SQLException {\n\t\tconn = DBManager.getInstance().getConnection();\r\n\t}",
"private boolean connect() throws ClassNotFoundException, SQLException {\r\n\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\r\n\t\tif (dbConnection == null || dbConnection.isClosed()) {\r\n\t\t\tdbConnection = DriverManager.getConnection(Conf.getDbPath(), Conf.getDbUser(), Conf.getDbPassword());\r\n\t\t\tif (!dbConnection.isValid(10)) {\r\n\t\t\t\tConf.setDbLog(false);\r\n\t\t\t\treturn false;\r\n\t\t\t} else\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Test\n public void testUnique_connectionException() throws SQLException {\n SignUpRequest request = new SignUpRequest(UNIQUE, \"Pw\");\n\n doThrow(SQLException.class).when(connection).isUnique(request.getUsername());\n\n dao.register(request);\n\n verify(controller).connectionFailed();\n }",
"int initConnection(){\n\t\tint status = -1; //the return value. -1 if connection failed, 0 if succeeded\r\n\t\ttry {\r\n\t\t\tconn = dbSource.getConnection();\r\n\t\t\tstatus = 0;\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(\"Error: Could not connect to the tool rental database.\");\r\n\t\t}\r\n\t\treturn status;\r\n\t\t\r\n\t}",
"public boolean checkConnection() {\n\t\ttry {\n\t\t\tif (con.isClosed() || !isAlive) {\n\t\t\t\treturn connect();\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test065() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.querySingleRow(\")\", (Connection) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test080() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n // Undeclared exception!\n try { \n DBUtil.queryWithMetadata(\"null\", jdbcConnection0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.hsqldb.jdbc.jdbcStatement\", e);\n }\n }",
"private DBConnection() \n {\n initConnection();\n }",
"@Test(timeout = 4000)\n public void test092() throws Throwable {\n Proxy proxy0 = (Proxy)DBUtil.wrapWithPooledConnection((Connection) null, false);\n // Undeclared exception!\n try { \n DBUtil.prepareStatement((Connection) proxy0, \"SELECT pronae,oid FROM pg_roc WHEE \", false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"abstract public boolean createConnection(String database);",
"@Test(timeout = 4000)\n public void test000() throws Throwable {\n try { \n DBUtil.getMetaData((Connection) null, \" i/1o\", \"l\", true, true, true, true, \" i/1o\", false);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Connecting null failed: \n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"public void testConnect() {\n\t\tConnection con = SQLUtilities.connect();\n\t\tResultSet set = SQLUtilities.executeSQL(\"SELECT * FROM TBL\", con);\n\t\t\n\t\ttry {\n\t\t\tset.last();\n\t\t\tint indx = set.getRow();\n\t\t\tSystem.out.println(indx);\n\t\t} catch (SQLException e) {\n\t\t\tfail();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSQLUtilities.disconnect(con);\n\t\tassertEquals(true,true);\n\n\t}",
"abstract Connection getConnection() throws SQLException;",
"@Test(timeout = 4000)\n public void test068() throws Throwable {\n Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());\n doReturn((Result) null).when(session0).execute(any(org.hsqldb.Result.class));\n jdbcConnection jdbcConnection0 = new jdbcConnection(session0);\n // Undeclared exception!\n try { \n DBUtil.executeUpdate(\"30J;t|'\", jdbcConnection0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.hsqldb.jdbc.jdbcStatement\", e);\n }\n }",
"@BeforeClass\n\tpublic static void setup() throws SQLException {\n\t\tconfig = new ConnectionConfig();\n\t\tconfig.setDataSource(Mockito.mock(DataSource.class));\n\t\t//mock connection\n\t\tConnection connection = Mockito.mock(Connection.class);\n\t\tMockito.when(config.getDataSource().getConnection()).thenReturn(connection);\n\t\tMockito.when(connection.isValid((int) TimeUnit.MILLISECONDS.toSeconds(config.getValidationTimeout()))).thenReturn(true);\n\t\t//create the connection pool\n\t\tpool = new ConnectionPoolImpl(config);\n\t}",
"@Test\n public void testConnectToDb() {\n System.out.println(\"connectToDb\");\n ClienteDAO instance = new ClienteDAO();\n instance.connectToDb();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}",
"public void testRetrievePaymentTerm_NotExistDatabase() throws Exception {\r\n try {\r\n new SimpleCommonManager(\"SimpleCommonManager_Error_13\").retrievePaymentTerm(1);\r\n fail(\"PaymentTermDAOException is expected\");\r\n } catch (PaymentTermDAOException e) {\r\n assertTrue(e.getMessage()\r\n .indexOf(\"DBConnectionException occurs when creating the database connection\") >= 0);\r\n }\r\n }",
"@Test\n public void testGetSdsConnection() {\n System.out.println(\"getSdsConnection\");\n SDSconnection expResult = null;\n SDSconnection result = instance.getSdsConnection();\n assertEquals(expResult, result);\n }",
"@Test(timeout = 4000)\n public void test084() throws Throwable {\n JDBCConnectData jDBCConnectData0 = new JDBCConnectData((String) null, \"One-row database query returned multiple rows: \", \"One-row database query returned multiple rows: \", (String) null, \"Closing statement failed\", (String) null);\n // Undeclared exception!\n try { \n DBUtil.connect(jDBCConnectData0, true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No JDBC driver class name specified\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"public static DB getFakeConnection() {\n\t\treturn fakeConnection;\n\t}",
"private void initConnection() throws DatabaseAccessException {\n\t\ttry {\n\t\t\tthis.connection = DriverManager.getConnection(this.driver + \":\" + this.path);\n\n\t\t} catch (SQLException e) {\n\t\t\t// unable to create the connection; access error\n\t\t\tthrow new DatabaseAccessException(Failure.CONNECTION);\n\t\t}\n\t}",
"abstract public boolean createConnection();",
"private void conntest() {\n\t\tDatabaseDao ddao = null;\r\n\t\tString url;\r\n\r\n\t\tif (dbType.getValue().toString().toUpperCase()\r\n\t\t\t\t.equals((\"oracle\").toUpperCase())) {\r\n\t\t\turl = \"jdbc:oracle:thin:@\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tSystem.out.println(\"?\");\r\n\t\t\tddao = new OracleDaoImpl();\r\n\t\t} else {\r\n\t\t\turl = \"jdbc:mysql://\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tddao = new MysqlDaoImpl();\r\n\t\t}\r\n\t\tSystem.out.println(url);\r\n\t\tString result = ddao.connection(url, logTxtId.getText(),\r\n\t\t\t\tlogTxtPw.getText());\r\n\t\tString resultSet;\r\n\t\tif (result.indexOf(\"오류\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"오류\"));\r\n\t\telse if (result.indexOf(\"ORA\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"ORA\"));\r\n\t\telse {\r\n\t\t\tresultSet = \"접속 테스트 성공\";\r\n\t\t}\r\n\t\tlogLblLogin.setText(resultSet);\r\n\t}",
"@Test(timeout = 4000)\n public void test085() throws Throwable {\n JDBCConnectData jDBCConnectData0 = new JDBCConnectData((String) null, (String) null, \"-l#o]ndt$;\", \"-l#o]ndt$;\");\n // Undeclared exception!\n try { \n DBUtil.connect(jDBCConnectData0, false);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No JDBC URL specified\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"public static Connection getConnection() {\n\treturn null;\n}",
"@Test(timeout = 4000)\n public void test083() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n DBUtil.close((Connection) jdbcConnection0);\n assertFalse(jdbcConnection0.isClosed());\n }",
"public boolean isDbConnected(Connection dbConnection) {\n try {\n return !dbConnection.isClosed();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return false;\n }",
"@Test(timeout = 4000)\n public void test048() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.getStatement((ResultSet) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test046() throws Throwable {\n try { \n DBUtil.connect(\"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", (String) null, \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", (String) null, true);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Connecting SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE failed: \n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test002() throws Throwable {\n Session session0 = mock(Session.class, new ViolatedAssumptionAnswer());\n doReturn((Result) null).when(session0).execute(any(org.hsqldb.Result.class));\n jdbcConnection jdbcConnection0 = new jdbcConnection(session0);\n Class<PGPooledConnection> class0 = PGPooledConnection.class;\n // Undeclared exception!\n try { \n DBUtil.queryScalarArray((String) null, class0, (Connection) jdbcConnection0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.hsqldb.jdbc.jdbcStatement\", e);\n }\n }",
"public interface DatabaseAccessor {\n\n Connection getConnection() throws SQLException;\n}",
"@Test\r\n public void testCtor() {\r\n instance = new ProjectTermsOfUseDaoImpl(configurationObject);\r\n\r\n assertNotNull(\"'dbConnectionFactory' should be correct.\", instance.getDBConnectionFactory());\r\n assertNotNull(\"'log' should be correct.\", instance.getLog());\r\n }",
"public boolean validate_connection() {\n throw new NO_IMPLEMENT(reason);\n }",
"@Test\n public void testGetInstance() {\n System.out.println(\"getInstance\");\n ConnectionManager result = ConnectionManager.getInstance();\n assertNotNull(result);\n assertEquals(instance,result);\n }",
"public static void sqlCheck(Connection value) throws ServiceException {\n if (value == null) {\n throw new ServiceException(ServiceStatus.NO_SQL);\n }\n }",
"@Test(timeout = 4000)\n public void test103() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.closeResultSetAndStatement((ResultSet) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"public boolean connect(){\n if(isConnect)\n return true;\n\n this.isConnect = true;\n\n this.repository = sqLiteConnect(new Repository().getColumnType());\n\n if(this.repository == null){\n ItemBox.getLogger().severe(\"[Database] \\\"repository\\\" connect fail!\");\n return false;\n }\n\n\n ItemBox.getLogger().info(\"[Database] connect success\");\n return true;\n }",
"private JDBCConnection() {\n System.out.println(\"Created JDBC Connection Object\");\n \n try {\n // Connect to JDBC data base\n connection = DriverManager.getConnection(DATABASE_URL, DATABASE_USERNAME, DATABASE_PASSWORD);\n } catch (SQLException e) {\n // If there is an error, lets just print the error\n System.err.println(e.getMessage());\n }\n }",
"private static void testConnection(Properties properties) throws ClassNotFoundException {\n Optional.ofNullable(properties.getProperty(\"oracle.net.tns_admin\"))\n .ifPresent(v -> System.setProperty(\"oracle.net.tns_admin\", v));\n String dbURL = Optional.ofNullable(properties.getProperty(\"url\"))\n .orElseThrow(() -> new IllegalArgumentException(\"missing url property\"));\n\n Class.forName(\"oracle.jdbc.OracleDriver\");\n\n Connection conn = null;\n Statement stmt = null;\n\n try {\n conn = establishConnection(properties, dbURL);\n\n stmt = conn.createStatement();\n\n Stopwatch stmtWatch = Stopwatch.createStarted();\n ResultSet rs = stmt.executeQuery(properties.getProperty(\"query\"));\n System.out.println(\"Executed statement took : \" + stmtWatch.stop());\n\n if (rs.next()) {\n System.out.println(rs.getString(1));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n if (stmt != null) try { stmt.close(); } catch (Exception e) {}\n if (conn != null) try { conn.close(); } catch (Exception e) {}\n }\n }",
"private boolean isConnected() {\n try {\n return (conn != null) && conn.isValid(0);\n } catch (SQLException ex) {\n Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }",
"private VirtuosoConnectionWrapper getDirtyConnection () throws DatabaseException {\n if (dirtyConnection == null) {\n \tdirtyConnection = VirtuosoConnectionFactory.createJDBCConnection(context.getDirtyDatabaseCredentials());\n \t}\n\t\treturn dirtyConnection;\n\t}",
"private static Connection getConnection(Connection connection) {\n\n\t\tif (connection == null) {\n\n\t\t\ttry {\n\t\t\t\tconnection = DriverManager.getConnection(\"jdbc:sqlite:lingo.db.sqlite3\");\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\n\t\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t\t}\n\t\t}\n\t\treturn connection;\n\t}",
"public void testDefaultWrapper() throws Exception {\n\n\t\t// Create the wrapper\n\t\tClass<?> wrapperClass = this.compiler.addWrapper(Connection.class, null).compile();\n\n\t\t// Other mocks\n\t\tPreparedStatement statement = this.createMock(PreparedStatement.class);\n\n\t\t// Record interactions for appropriate wrapping\n\t\tConnection mock = this.createMock(Connection.class);\n\t\tmock.rollback();\n\t\tmock.setAutoCommit(true);\n\t\tthis.recordReturn(mock, mock.getTransactionIsolation(), 2);\n\t\tthis.recordReturn(mock, mock.prepareStatement(\"SELECT * FROM TEST\"), statement);\n\t\tthis.replayMockObjects();\n\n\t\t// Wrap the connection\n\t\tConnection wrapper = (Connection) wrapperClass.getDeclaredConstructor(Connection.class).newInstance(mock);\n\t\tassertNotSame(\"Should be wrapped\", mock, wrapper);\n\n\t\t// Undertake operations to ensure correct wrapping\n\t\twrapper.rollback();\n\t\twrapper.setAutoCommit(true);\n\t\tassertEquals(\"Incorrect get\", 2, wrapper.getTransactionIsolation());\n\t\tassertSame(\"Incorrect statement\", statement, wrapper.prepareStatement(\"SELECT * FROM TEST\"));\n\n\t\tthis.verifyMockObjects();\n\t}",
"public DatabaseConnection newConnection();",
"@Test\r\n\tpublic void CT01ValidaConexao_com_sucesso() {\r\n\t\tassertNotNull(\"valida a conexao =>\", DAOFactory.criaConexao());\r\n\t}",
"@Test(timeout = 4000)\n public void test016() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.prepareStatement((Connection) null, \"EJ1mj8=\", false, 0, (int) (byte)38, (-91830680));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"public Connection getConnection() throws DBAccessException;",
"private Connection getConnection() throws SQLException, ClassNotFoundException {\n return connectionBuilder.getConnection();\n }",
"public Connection getConnection() throws SQLException {\n return null;\r\n }",
"public void initConnection() throws DatabaseConnectionException, SQLException {\n\t\t\tString connectionString = DBMS+\"://\" + SERVER + \":\" + PORT + \"/\" + DATABASE;\n\t\t\ttry{\n\t\t\t\tClass.forName(DRIVER_CLASS_NAME).newInstance();\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE TROVARE DRIVER\");\n\t\t\t\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tconn=DriverManager.getConnection(connectionString, USER_ID, PASSWORD);\n\t\t\t\t\n\t\t\t}catch(SQLException e){\n\t\t\t\tSystem.err.println(\"IMPOSSIBILE STABILIRE CONNESSIONE DATABASE\");\n\t\t\t\t\n\t\t\t}\n\t\t}",
"public static Connection getConnection() {\n\t\treturn null;\r\n\t}",
"private Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(dbDriver);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(dbConnectionURL, dbUser, dbPassword);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}",
"public void testRetrieveActivePaymentTerms_NotExistDatabase() throws Exception {\r\n try {\r\n new SimpleCommonManager(\"SimpleCommonManager_Error_13\").retrieveActivePaymentTerms();\r\n fail(\"PaymentTermDAOException is expected\");\r\n } catch (PaymentTermDAOException e) {\r\n assertTrue(e.getMessage()\r\n .indexOf(\"DBConnectionException occurs when creating the database connection\") >= 0);\r\n }\r\n }",
"private boolean validateConnection() {\n boolean success = _vcVlsi.testConnection();\n if (!success) {\n _log.log(Level.WARNING, \"Found VC connection dropped; reconnecting\");\n return connect();\n }\n return success;\n }",
"private static Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(DB_DRIVER);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(DB_CONNECTION, DB_USER,\n\t\t\t\t\tDB_PASSWORD);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}",
"private DbConnection() {\n }",
"public static Connection getConnection() {\n\t\treturn null;\n\t}",
"@Test(timeout = 4000)\n public void test013() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.queryString((PreparedStatement) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"@Test\n public void testAddConnection() throws Exception {\n System.out.println(\"addConnection\");\n instance.addConnection(testConnection);\n assertEquals(1, instance.getStoredConnections().size());\n }",
"public boolean connect(){\n try{\n conn = DriverManager.getConnection(uri, user, password);\n }catch (SQLException sqle){\n DLException dle = new DLException(sqle, \"Unable to conclude this operation\");\n return false;\n }\n return true;\n }",
"@Test\n public void testConnectionEchec() {\n try {\n dao.seConnecter(loginInvalide, mdpValide);\n Assert.fail(\"c'est pas normal...\");\n } catch (QualitException paramE) {\n Assert.assertEquals(\n QualitEnum.PROBLEME_IDENTIFICATION,\n paramE.getCodeErreur());\n }\n }",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n JDBCConnectData jDBCConnectData0 = new JDBCConnectData(\"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\", \"SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE\");\n try { \n DBUtil.connect(jDBCConnectData0, true);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Connecting SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE failed: \n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }",
"public boolean isConnectionOpen() throws SQLException{\r\n return connection != null && !connection.isClosed();\r\n }",
"@Nonnull\n Connection getConnection() throws SQLException;",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n // Undeclared exception!\n try { \n DBUtil.countRows(\"6vyv%@\\\":8OZvgeq:\", (Connection) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }"
] | [
"0.78950167",
"0.7868624",
"0.7649766",
"0.72005457",
"0.7138938",
"0.71035576",
"0.7052825",
"0.69132626",
"0.6909213",
"0.68644255",
"0.6859444",
"0.68344355",
"0.6831693",
"0.67891157",
"0.67840636",
"0.669029",
"0.6676925",
"0.66523427",
"0.65980846",
"0.6575021",
"0.6541158",
"0.6510525",
"0.6471959",
"0.6463788",
"0.6463268",
"0.6451814",
"0.64480585",
"0.6385167",
"0.6352946",
"0.6347516",
"0.6334057",
"0.6334057",
"0.632284",
"0.63183606",
"0.63015574",
"0.6284631",
"0.6269039",
"0.6266738",
"0.6256839",
"0.6251968",
"0.62517715",
"0.6188776",
"0.61770344",
"0.61565846",
"0.6129685",
"0.6126511",
"0.61237925",
"0.6122472",
"0.6122163",
"0.6113421",
"0.6111543",
"0.61022645",
"0.61004597",
"0.6095422",
"0.6086223",
"0.6075688",
"0.6072957",
"0.6064353",
"0.6055001",
"0.60405165",
"0.6036968",
"0.60307866",
"0.6028247",
"0.60213023",
"0.6020617",
"0.6020435",
"0.6018967",
"0.60056996",
"0.6003498",
"0.59992594",
"0.5977763",
"0.59766686",
"0.5963847",
"0.59625125",
"0.5959828",
"0.595279",
"0.5949432",
"0.59434336",
"0.59375346",
"0.5934009",
"0.59323025",
"0.592974",
"0.5925543",
"0.59240437",
"0.59126306",
"0.5903229",
"0.589471",
"0.5884632",
"0.5883827",
"0.58834016",
"0.58832765",
"0.5878077",
"0.5870541",
"0.5852895",
"0.58466315",
"0.5837867",
"0.5837687",
"0.5836127",
"0.583465",
"0.5831685"
] | 0.7767737 | 2 |
Updating the account record for the specific account id with the new balance with Sanity check | @Transactional(isolation = Isolation.SERIALIZABLE)
public void updateAccountBalance(Long accountId, Double newBalance) {
Account account =accountRepository.findById(accountId)
.orElseThrow(() -> new AccountNotFoundException("Account not found"));
account.setBalance(newBalance);
accountRepository.save(account);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void updateBalance(int account_id, int final_amount){\n dbUpdate(\"update ACCOUNTS set BALANCE = \"+ final_amount + \" where ACCOUNT_ID = \" + account_id);\n cache.add(new Account(account_id, final_amount));\n }",
"private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}",
"public void updateBalance(UUID accountId, double amount) {\n Account account = repository.getAccount(accountId);\n account.updateBalance(amount);\n repository.save(account);\n }",
"public boolean updateBalance(int account_id, int final_amount, Connection con){\n try {\n tryDbUpdate(\"update ACCOUNTS set BALANCE = \"+ final_amount + \" where ACCOUNT_ID = \" + account_id, con);\n cache.add(new Account(account_id, final_amount));\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }",
"public void testUpdateAccount(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tacc.setDatetime(CommUtil.getNowDate()) ;\n\t\tint r = this.bean.updateAccount(acc) ;\n\t\tAssert.assertEquals(r, 1) ;\n\t}",
"void updateAccount(Account account);",
"public void setBalance( Integer account_id, double balance ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n params.put(\"balance\", String.valueOf(balance));\r\n String url = API_DOMAIN + ACCOUNT_EXT + SET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }",
"@Override\n\tpublic void updateAccountBalance(double newBalance, int id) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString updateQuery = \"update accounts set balance=? where id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(updateQuery);\n\t\t\tprepStmt.setDouble(1, newBalance);\n\t\t\tprepStmt.setInt(2, id);\n\t\t\tprepStmt.executeUpdate();\n\t}",
"void updateAccount();",
"@Override\n\tpublic int accountUpdate(String id, String balance) {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tint executeUpdate = 0;\n\t\tString sqlString=\"update user set balance = '\"+balance+\"' where id ='\"+id+\"'\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString);\n\t\t\texecuteUpdate = query.executeUpdate();\n\t\t\tSystem.out.println(\"executeUpdate:\"+executeUpdate);\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn executeUpdate;\t\n\t}",
"@Override\n public void updateBalanceInfo(Long accountId, BigDecimal amountToAdd) {\n repositoryService.updateBalanceInfo(accountId, amountToAdd);\n AccountInfo accountInfo = repositoryService.fetchAccountInfo(accountId).orElseThrow();\n update(\"accounts\", Long.class, AccountInfo.class, accountId, accountInfo);\n }",
"int updateBalance(CardVO cv) throws RemoteException;",
"public Account update(Account user);",
"private void updateBalance(int balance) throws SQLException {\n\t\tupdateBalanceStatement.clearParameters();\n\t\tupdateBalanceStatement.setInt(1, balance);\n\t\tupdateBalanceStatement.setString(2, this.username);\n\t\tupdateBalanceStatement.executeUpdate();\n\t}",
"int updateByPrimaryKey(FinanceAccount record);",
"int updateAccountInfo(Account account);",
"public void update(Account account) {\n\t\t\n\t}",
"public abstract void updateBalance(Balance balance, LedgerEntry.Subtype subtype, long amount) throws TransactionException;",
"public boolean saveAccount(Account account)\n {\n PreparedStatement preparedStatement = null;\n try\n {\n preparedStatement = connection.prepareStatement(\n String.format(\"UPDATE %s.accounts SET balance=? WHERE id = ?;\",\n simpleEconomy.getConfig().getString(\"db.database\")));\n preparedStatement.setDouble(1, account.getBalance());\n preparedStatement.setInt(2, account.getId());\n preparedStatement.execute();\n return true;\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return false;\n }",
"public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}",
"public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }",
"public synchronized double setBalanceForAccId(int AccId, double bal) {\n\t\tConnection dbAccess = DataAccess.getDbAccess();\n\t\tPreparedStatement psttmnt;\n\t\tString querySting;\n\t\tdouble balance = -1.0;\n\t\ttry {\n\t\t\tquerySting = \"UPDATE accounts SET acc_balance = \" + bal + \" WHERE acc_id = \" + AccId;\n\t\t\tpsttmnt = dbAccess.prepareStatement(querySting);\n\t\t\tint result = psttmnt.executeUpdate();\n\t\t\tif (result != 0) {\n\t\t\t\t balance = getBalanceForAccId(AccId);\n\t\t\t}\n\t\t\tdbAccess.close();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn balance;\n\t}",
"public void updateAccount() {\r\n\t\t\r\n\t\t//update all totals\r\n\t\ttotalYouOwe = 0.0;\r\n\t\ttotalOwedToYou = 0.0;\r\n\t\tbalance = 0.0;\r\n\t\tnetBalance = 0.0;\r\n\t\t\r\n\t\t//totalYouOwe and totalOwedToYou\r\n\t\tfor (Event e : events) {\r\n\t\t\tif (e.isParticipantByGID(GID)) {\r\n\t\t\t\tif (e.getParticipantByGID(GID).getBalance() > 0) {\r\n\t\t\t\t\ttotalOwedToYou = totalOwedToYou + e.getParticipantByGID(GID).getBalance(); \r\n\t\t\t\t} else {\r\n\t\t\t\t\ttotalYouOwe = totalYouOwe + (-e.getParticipantByGID(GID).getBalance());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//netBalance/balance - the same in current implementation\r\n\t\tnetBalance = totalOwedToYou - totalYouOwe;\r\n\t\tbalance = totalOwedToYou - totalYouOwe;\r\n\t\t\r\n\t\tupdatePastRelations();\r\n\t}",
"@Override\r\n\tpublic void update(Account account) throws ServiceException {\n\r\n\t}",
"@Test\n @Order(14)\n void update_account_2() {\n Account first = client.getAccounts().iterator().next();\n\n // mismatch is a copy, but with different client Id\n // we use client2 because it's valid in the database\n Account mismatch = new Account(first.getId(), first.getAmount()+200, client2.getId());\n Account nullCheck = service.updateAccount(mismatch);\n Assertions.assertNull(nullCheck);\n\n // get the account with the id we used to check, should not have changed\n Account check = service.getAccount(client.getId(), mismatch.getId());\n Assertions.assertEquals(first.getAmount(), check.getAmount(), 0.1);\n }",
"void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}",
"@Override\r\n\tpublic boolean update(int id, Account account) {\n\t\treturn daoref.update(id, account);\r\n\t}",
"public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}",
"@Override\r\n\tpublic void updateBalance( Integer userid, double amount) {\n\t\tif ( getBalance( userid) < amount) {\r\n\t\t\tthrow new RuntimeException( \"用户余额不足!\");\r\n\t\t}\r\n\t\tString sql = \"UPDATE buyers SET balance = balance - ? WHERE id = ?;\";\r\n\t\tjdbcTemplate.update( sql, amount, userid);\r\n\t}",
"public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }",
"Account(int id, double balance){\r\n\t\t//sets the default values and than the specified values of the id and balance\r\n\t\tsetId(id);\r\n\t\tsetBalance(balance);\t\t \r\n\t\tsetAnnualInterestRate(0);\r\n\t\tthis.dateCreated = new Date(System.currentTimeMillis());\r\n\t }",
"public void editBalance() {\n\t\tAccount account = getAccountForEditBalance();\n\n\t\tif (adminDao.editBalance(account))\n\t\t\tSystem.out.println(\"Balance edited!\");\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}",
"private void updateBalance(){\n Intent toUpdateBal = new Intent(this, UpdateAccount.class);\n startActivity(toUpdateBal);\n }",
"@Override\npublic void update(Account account) {\n\taccountdao.update(account);\n}",
"private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }",
"public abstract void updateAccount(JSONObject account);",
"Account.Update update();",
"public Account(int id, double balance) {\n this();\n this.id = id;\n this.balance = balance;\n }",
"int updateByPrimaryKey(CusBankAccount record);",
"@Test\n\tpublic void testRecalculateAccountBalance() {\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"1\");\n\t\tsmsAccount.setSakaiSiteId(\"1\");\n\t\tsmsAccount.setMessageTypeCode(\"1\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(10L);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\t\tinsertTestTransactionsForAccount(smsAccount);\n\n\t\tAssert.assertTrue(smsAccount.exists());\n\n\t\tList<SmsTransaction> transactions = hibernateLogicLocator\n\t\t\t\t.getSmsTransactionLogic().getSmsTransactionsForAccountId(\n\t\t\t\t\t\tsmsAccount.getId());\n\n\t\tAssert.assertNotNull(transactions);\n\t\tAssert.assertTrue(transactions.size() > 0);\n\n\t\tsmsBillingImpl.recalculateAccountBalance(smsAccount.getId());\n\n\t\tSmsAccount recalculatedAccount = hibernateLogicLocator\n\t\t\t\t.getSmsAccountLogic().getSmsAccount(smsAccount.getId());\n\t\tAssert.assertNotNull(recalculatedAccount);\n\t\tAssert.assertTrue(recalculatedAccount.getCredits() == 6660);\n\t}",
"int updateByPrimaryKey(Account record);",
"int updateByPrimaryKey(Account record);",
"public void updateAccounts(String sourceAccountNumber, BigDecimal transferedAmount, String destinationAccount ) throws TransferServiceException {\n\t\t\n\t\tList<Account> accountList = new ArrayList<>();\n\t\t\n\t\taccountList.add(debitAmount(sourceAccountNumber,transferedAmount));\n\t\taccountList.add(creditAmount(destinationAccount, transferedAmount));\n\t\trepository.saveAll(accountList);\n\t\n\t}",
"Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }",
"String addBalance(Integer clientAccountId, Integer balance) throws ServiceException;",
"private void updateSingleAccount(double amount, String account_name) {\n if (account_name.equals(\"bankomat\")){\n status_disp.transfer_resources(\"karta konto 1\", \"gotowka\", (float) amount); // TODO: remove hardcoded account names...crashes if names dont match\n }\n else {\n status_disp.reduce_wealth(account_name, (float) amount);\n Log.e(TAG, account_name + \" \" + amount);\n }\n }",
"public abstract void updateAccount(final GDataAccount account)\n throws ServiceException;",
"private void updateUserAccount() {\n final UserDetails details = new UserDetails(HomeActivity.this);\n //Get Stored User Account\n final Account user_account = details.getUserAccount();\n //Read Updates from Firebase\n final Database database = new Database(HomeActivity.this);\n DatabaseReference user_ref = database.getUserReference().child(user_account.getUser().getUser_id());\n user_ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Read Account Balance\n String account_balance = dataSnapshot.child(Database.USER_ACC_BALANCE).getValue().toString();\n //Read Expire date\n String expire_date = dataSnapshot.child(Database.USER_ACC_SUB_EXP_DATE).getValue().toString();\n //Read Bundle Type\n String bundle_type = dataSnapshot.child(Database.USER_BUNDLE_TYPE).getValue().toString();\n //Attach new Values to the Account Object\n user_account.setBalance(Double.parseDouble(account_balance));\n //Attach Expire date\n user_account.setExpire_date(expire_date);\n //Attach Bundle Type\n user_account.setBundle_type(bundle_type);\n //Update Local User Account\n details.updateUserAccount(user_account);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //No Implementation\n }\n });\n }",
"public void InitializeBalance(BigDecimal valor){\n \r\n ChekingAccount chekAc=pRepository.GetChekingAccount();\r\n chekAc.setSaldoInicial(valor);\r\n pRepository.SaveChekingAccount(chekAc);\r\n \r\n }",
"@PutMapping(\"/account/{id}\")\n\tpublic Account update(@Valid @RequestBody Account newAccount, @PathVariable int id) {\n\t\treturn accountRepository.findById(id).map(account -> {\n\t\t\t// skip id, createdTime and isDeleted\n\t\t\taccount.setPassword(bcryptEncoder.encode(newAccount.getPassword()));\n\t\t\taccount.setEmail(newAccount.getEmail());\n\t\t\treturn accountRepository.save(account);\n\t\t}).orElseThrow(() -> new AccountNotFoundException(id));\n\t}",
"@Override\n public void apply(Map<Integer, Account> accounts) {\n Account account = accounts.get(accountNumber);\n if (account == null) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from non-existent account \" + accountNumber\n );\n }\n\n // Make sure the account is enabled.\n if (!account.isEnabled()) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from disabled account \" + accountNumber\n );\n }\n\n // Check that the account belongs to accountHolder.\n if (!account.getAccountHolder().equals(accountHolder)) {\n throw new ViolatedConstraintException(\n \"User \\\"\" + accountHolder + \"\\\" tried to perform transaction \" +\n \"on account \" + accountNumber +\n \" which belongs to user \\\"\" + account.getAccountHolder() + \"\\\"\"\n );\n }\n\n // Compute fee based on whether it was admin initiated or not\n // and whether they are a student or not.\n int fee = (adminInitiated) ? 0 : (\n (account.isStudent()) ? Constants.STUDENT_FEE : Constants.NORMAL_FEE\n );\n\n // Check that the final balance of the account after removing the funds\n // and fee is greater than zero.\n int finalBalance = account.getBalance() - amount - fee;\n if (finalBalance < 0) {\n throw new ViolatedConstraintException(\n \"Final balance should be >= 0, got \" + finalBalance\n );\n }\n\n // If the transaction isn't admin initiated, check that the final\n // withdrawal total is less than the withdrawal limit.\n int finalWithdrawalTotal = 0;\n\n if (!adminInitiated) {\n finalWithdrawalTotal = account.getWithdrawalTotal() + amount;\n\n if (finalWithdrawalTotal > Constants.WITHDRAWAL_LIMIT) {\n throw new ViolatedConstraintException(\n \"Final withdrawal total should be <= \" + Constants.WITHDRAWAL_LIMIT +\n \", got \" + finalWithdrawalTotal\n );\n }\n }\n\n // Remove the funds and fee from the account.\n account.setBalance(finalBalance);\n\n // If the transaction isn't admin initiated update withdrawal total\n // and increment the transaction count.\n if (!adminInitiated) {\n account.setWithdrawalTotal(finalWithdrawalTotal);\n account.incrementTransactionCount();\n }\n }",
"int updateByPrimaryKeySelective(FinanceAccount record);",
"public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }",
"public void transferMoney(int customerAccountId, int accountId) throws SQLException {\n // check if the customer has this account\n boolean customerOwnsAccount = false;\n for (int i = 0; i < this.currentCustomer.getAccounts().size(); i++) {\n if (customerAccountId == this.currentCustomer.getAccounts().get(i).getId()) {\n customerOwnsAccount = true;\n break;\n }\n }\n // it is safe to proceed since the customer accounts have been authenticated\n if (customerOwnsAccount) {\n Account customerAccount = DatabaseSelectHelper.getAccountDetails(customerAccountId);\n // try and catch for valid input (int) expected\n try {\n System.out.println(\"Enter amount you wish to transfer:\");\n // take user input as a big decimal\n BigDecimal bigAmount = new BigDecimal(br.readLine());\n if (bigAmount.compareTo(customerAccount.getBalance()) <= 0) {\n // try to update accounts\n try {\n // update the account which received money in database\n DatabaseUpdateHelper.updateAccountBalance(\n bigAmount.add(DatabaseSelectHelper.getBalance(accountId)), accountId);\n // update account which transfered money in database\n DatabaseUpdateHelper.updateAccountBalance(\n customerAccount.getBalance().subtract(bigAmount), customerAccountId);\n // update the customer object for printing reasons for other options\n this.currentCustomer.updateAccounts();\n // Explicitly tell user money is transfered\n System.out.println(\"you have successfully transfered money to account \" + accountId);\n \n } catch (Exception e) {\n System.out.println(\"The account ID you wish to transfer money to does not exist\");\n }\n // error printing\n } else {\n System.out.println(\"This account does not have enough money to send this amount\");\n }\n \n } catch (Exception e) {\n System.out.println(\"Invalid amount\");\n }\n // error printing\n } else {\n System.out.println(\"You do not have access to this account\");\n }\n \n }",
"String updateClientAccount(ClientAccount account) throws ServiceException;",
"@Override\n\tpublic Account updateAccount(Integer id, String type) {\n\t\tfor(Account account:accountList) {\n\t\t\tif(id.compareTo(account.returnAccountNumber()) == 0 ) {\n\t\t\t\taccount.updateAccountType(type);\n\t\t\t\treturn account;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"@Test\n\tpublic void updateAccount() throws Exception {\n\n\t\tFacebookAdaccountBuilder fbAccount = SocialEntity\n\t\t\t\t.facebookAccount(accessToken);\n\t\tfbAccount.addAccount(\"New Test AdAccount\", \"USD\", 1);\n\t\t// fbAccount.create();\n\n\t\tfbAccount.updateAccountName(\"275668082617836\",\n\t\t\t\t\"Update Test New AdAccount\");\n\t\tfbAccount.updateAccountName(\"1419302888335966\",\n\t\t\t\t\"Batch AdAccount Name Update\");\n\t\tSystem.out.println(fbAccount.update());\n\t}",
"@Override\n\tpublic void updateAccount(int idUsuario, int idCarteira) {\n\t}",
"void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }",
"public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }",
"public void updateAccount(Account account)\n\t {\n\t\t if(!accountExists(account)) addAccount(account);\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t String where = DatabaseContract.AccountContract.COLUMN_NAME_USERNAME + \" = ? \";\n\t\t \n\t\t db.update(DatabaseContract.AccountContract.TABLE_NAME, \n\t\t\t\t values, \n\t\t\t\t where, \n\t\t\t\t new String[] {account.getUsername()});\n\t }",
"public int updateAccount(Accounts account) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, account.getName());\n values.put(KEY_PASSWORD, account.getPassword());\n values.put(KEY_PH_NO, account.getPhoneNumber());\n values.put(KEY_EMAIL, account.getEmail());\n\n // updating row\n return db.update(TABLE_ACCOUNTS, values, KEY_ID + \" = ?\",\n new String[]{String.valueOf(account.getID())});\n }",
"@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}",
"private boolean updateMoneyForAccount(int accountNumber, BankAccountType accountType, int currency) {\n\t\tString columnName = (accountType == BankAccountType.Checking ? \"balance\" : \"balance_saving\");\n\n\t\tString sql = \"UPDATE accounts SET \" + columnName + \" = ? WHERE id = ?\";\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\tpstmt.setInt(1, currency);\n\t\t\tpstmt.setInt(2, accountNumber);\n\n\t\t\tint rowsUpdated = pstmt.executeUpdate();\n\t\t\treturn (rowsUpdated == 1);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn false;\n\t}",
"public void withdraw(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"withdraw : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\tSystem.out.println(\"Ypu got $\"+String.valueOf(amount));\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}",
"public static String payCurrentBill(String account){\n return \"update current_bills set cb_paid = 1 where cb_account = '\"+account+\"'\";\n }",
"public Saving updateSavingBalanceByAddingInterests(Long id){\n Optional<Saving> optionalSaving = savingRepository.findById(id);\n\n if(optionalSaving.isPresent()){\n LocalDateTime today = LocalDateTime.now();\n long diff = Math.abs(ChronoUnit.YEARS.between(today, optionalSaving.get().getAdditionLastInterestDate()));\n if(diff > 0){\n BigDecimal newBalance = optionalSaving.get().getBalance().multiply(optionalSaving.get().getInterestRate().add(new BigDecimal(1)).pow((int) diff));\n transactionService.saveTransaction(TransactionType.INTEREST, newBalance.subtract(optionalSaving.get().getBalance()), optionalSaving.get().getId(), ReturnType.SAVING, optionalSaving.get().getPrimaryOwner(), optionalSaving.get().getId(), ReturnType.SAVING, optionalSaving.get().getPrimaryOwner());\n optionalSaving.get().setBalance(newBalance);\n optionalSaving.get().setAdditionLastInterestDate(today);\n }\n return savingRepository.save(optionalSaving.get());\n }else{\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"The saving account with the given id does not exist\");\n }\n }",
"public void updatebal(String cname, String amt1) {\nString countQuery = \"SELECT Balance FROM \" + DATABASE_TABLE1+\" WHERE Name='\"+cname+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(\"Balance\");\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur+Integer.parseInt(amt1);\n\t ContentValues up=new ContentValues();\n\t up.put(Com_Balance, cur);\n\t\tourDatabase.update(DATABASE_TABLE1, up, Com_Name+\" = '\"+cname+\"'\", null);\n\t\t\n\t}",
"public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}",
"public Account(int id, double initialBalance){\n\t\tthis.id = id;\n\t\tbalance = initialBalance;\n\t\tdateCreated = new Date();\n\t}",
"int updateByExample(CusBankAccount record, CusBankAccountExample example);",
"@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}",
"public Account getAccountForEditBalance() {\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(\"Account: \" + account.getAccountNumber() + \" Balance: \" + account.getBalance());\n\n\t\tdouble balance = Inputs.getUserDoubleInput(\"Enter new balance:\");\n\t\taccount.setBalance(balance);\n\t\treturn account;\n\t}",
"public void updateBalance(String mobileNo,int balance)\n\t{\n\t\tContext ctx;\n\t\ttry {\n\t\t\tctx = new InitialContext();\n\t\t\n\t\t\n\t\t DataSource ds=(DataSource)ctx.lookup(\"java:OracleDS\");\n\t\t\tConnection con=ds.getConnection();\n\t\t\tStatement stmt=con.createStatement();\n\t\t\t\n\t\t\tstmt.executeUpdate(\"update mobile set balance=\"+balance+\" where mobileno=\"+mobileNo);\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error in connection with Database :\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public Account(double balance) {\n\t\tthis.balance = balance;\n\t}",
"public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }",
"public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }",
"@Override\n public void changeBalance (ChangeBalanceDto changeBalanceDto) {\n new AccountDaoImpl(new StatementsRunnerImpl()).changeBalance(changeBalanceDto);\n }",
"int updateByPrimaryKeySelective(CusBankAccount record);",
"public void setBalance( long balance ) {\r\n this.balance = balance;\r\n }",
"public void changeBalance (int amount){\n balance += amount;\n }",
"int updateByPrimaryKey(BankUserInfo record);",
"int updateByPrimaryKey(BankUserInfo record);",
"public void addBalance(long balance) {\r\n this.balance += balance;\r\n }",
"public void deposit(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tlastBalance = nowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"deposit : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}",
"public void Deposit(Integer accountNo,float depositMoney){\n\tSessionFactory sessionFactory = new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n\tSession session = sessionFactory.openSession();\n\tTransaction trans = null;\n\ttry{\n\t\ttrans = session.beginTransaction();\n\t\tQuery query=session.createQuery(\"UPDATE Account set balance+=:balance where accountNo=:accountNo\"); \n\t\tquery.setParameter(\"balance\",depositMoney); \n\t\tquery.setParameter(\"accountNo\",accountNo); \n\t}catch(HibernateException hibernateException){\n\t\tif(trans != null){\n\t\t\ttrans.rollback();\n\t\t}\n\t\thibernateException.printStackTrace();\n\t}\n\t}",
"int deposit(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n accountBalance += amount;\n break;\n } else\n return -1;\n }\n // Run the operation to update the balance only for the user's account\n updateAccount(id, accountBalance, account);\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n System.out.println(\"AMOUNT: \" + accountBalance);\n return 1;\n }",
"int withdraw(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n if (accountBalance <= amount)\n return -1;\n else {\n accountBalance -= amount;\n }\n }\n }\n updateAccount(id, accountBalance, account); // update command\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n\n return 1;\n }",
"public void setBalance(Integer balance) {\n this.balance = balance;\n }",
"public void setBalance(Integer balance) {\n this.balance = balance;\n }",
"@PreAuthorize(\"hasRole('ROLE_USER')\")\r\n\tpublic void updateUserAccount(UserAccount account);",
"int updateByPrimaryKey(DepAcctDO record);",
"int updateByPrimaryKey(ShopAccount record);",
"int updateByPrimaryKey(AccountPaymentMethodEntity record);",
"public void setBalance(){\n balance.setBalance();\n }",
"public Account(int id, String name, double balance){\n this(id, balance);\n this.name = name;\n }",
"public void setBalance(float balance) {\n this.balance = balance;\n }",
"abstract int checkBalance(String accountno) throws RemoteException;",
"public BankAccount(int balance) {\n\n this.balance = balance;\n\n }"
] | [
"0.7941501",
"0.77335745",
"0.7642741",
"0.76132643",
"0.738528",
"0.7360158",
"0.73273164",
"0.71828693",
"0.71067506",
"0.70349187",
"0.7026426",
"0.69675463",
"0.681478",
"0.68035233",
"0.67393106",
"0.6719202",
"0.6716613",
"0.66764766",
"0.6669151",
"0.66624075",
"0.66561294",
"0.66491294",
"0.66139877",
"0.658783",
"0.65702814",
"0.6563841",
"0.6542355",
"0.6538546",
"0.6523316",
"0.651419",
"0.65103114",
"0.65092635",
"0.6493776",
"0.647877",
"0.64779204",
"0.6475017",
"0.64680743",
"0.6449028",
"0.6447342",
"0.6447088",
"0.6440569",
"0.6425586",
"0.6425586",
"0.6403396",
"0.6370319",
"0.6361978",
"0.6341345",
"0.6331173",
"0.6317889",
"0.62952006",
"0.62924933",
"0.6282278",
"0.62772113",
"0.62723017",
"0.62564516",
"0.62390876",
"0.622712",
"0.62228453",
"0.62141836",
"0.6210613",
"0.6209266",
"0.6198212",
"0.61905766",
"0.6189883",
"0.61883986",
"0.61769044",
"0.6170714",
"0.6149692",
"0.614796",
"0.614584",
"0.61326087",
"0.6121519",
"0.61175805",
"0.6091224",
"0.60854304",
"0.6079934",
"0.60720414",
"0.60720414",
"0.6071809",
"0.6062544",
"0.60584164",
"0.60559285",
"0.6039999",
"0.6039999",
"0.6036455",
"0.60216403",
"0.6020281",
"0.6001218",
"0.5999881",
"0.59980214",
"0.59980214",
"0.5996059",
"0.5991051",
"0.5974853",
"0.59626395",
"0.59615374",
"0.59554064",
"0.5951606",
"0.595086",
"0.5949044"
] | 0.72649556 | 7 |
Check available balance of the account | @Transactional(readOnly = true)
public boolean checkAvailableBalance(Long accountId, Double amount) {
return getAccountBalance(accountId) < amount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}",
"void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}",
"private void doCheckBalance() {\n while (true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n ui.displayMessage(\"Balance: \" + userAccount.getBalance());\n break;\n } catch (Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }",
"@Override\n\tpublic void checkBalance() {\n\t\tSystem.out.println(\"balance is checked\");\n\t}",
"abstract int checkBalance(String accountno) throws RemoteException;",
"public boolean checkBalance() {\n checkBalanceHelper(root);\n if (unbalanced == null) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean isBalanced ();",
"Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);",
"protected boolean ensureBalance(BigInteger value)\n {\n String account = appContext.getSettingProvider().getSelectedAccount();\n\n BigInteger balance = appContext.getServiceProvider().getAccountService().getAccountBalance(account).get();\n if(balance == null)\n {\n appContext.getMessageService().showErrorMessage(\"Cannot reach the exchange service. Try again later.\");\n return false;\n }\n\n if(balance.compareTo(value) < 0)\n {\n appContext.getMessageService().showErrorMessage(\"You need at least \" + value.toString() + \" wei to do that!\");\n return false;\n }\n\n return true;\n }",
"public com.token.vl.service.MoneyWs getAvailable_Balance() {\n return available_Balance;\n }",
"public Long getAvailableBalance() {\n return availableBalance;\n }",
"public void showAccountBalance(){\n balance();\n\n }",
"@Test\n public void test_total_balance2() {\n assertEquals(1200, ao2.totalBalanceOfAccountsOwned(), EPS);\n }",
"boolean hasAccountBudget();",
"public void balance(int arg1)\n \n {\n \tint sum=0;\n int s;\n int i=0;\n response=RestAssured.get(\"http://18.222.188.206:3333/accounts\");\n Bala=response.jsonPath().getList(\"Balance\");\n while(i<=Bala.size())\n {\n try\n {\n if(Bala.get(i)!=null)\n {\n s=Integer.parseInt(Bala.get(i));\n if(s>arg1)\n {\n sum++;\n }\n }\n }\n catch(Exception e)\n {\n \n }\n i++;\n \n }\n System.out.println(\"The number of accounts with balance 200000= \"+sum);\n }",
"double getBalance();",
"double getBalance();",
"public abstract boolean isBalanced();",
"public Money getTotalBalance();",
"public String balance() {\n\t\treturn this.apiCall(\"balance\", \"\", \"\", true);\n\t}",
"public int hasBalance(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\t//int previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\r\n\t\tdouble balance = econ.getBalance(player);\r\n\t\tnumber = (int)Math.min(number, (balance / this.ticketPrice));\r\n\t\t//number = (int)Math.min(number - (number - (balance / this.ticketPrice)), number);\r\n\t\t\r\n\t\treturn number;\t\r\n\t}",
"public boolean checkIfEnough(Account account, float amount) {\n float remaining = account.getBalance() - amount;\n if (remaining >= 0) {\n return true;\n }\n return false;\n }",
"@Override\r\npublic void checkBalance() {\n\t\r\n}",
"public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}",
"public double getAvailableBalance(int userAccountNumber) {\r\n return getAccount(userAccountNumber).getAvailableBalance();\r\n }",
"public void printBalance() {\n logger.info(\"Wallet balance : \" + total_bal);\n }",
"public double checkCashInBrokerage(long socialSecurityNumber, String userName, String password) throws AuthenticationException,UnauthorizedActionException{\r\n if(security(socialSecurityNumber, userName, password)){\r\n throw new AuthenticationException();\r\n }\r\n if(getPatron(socialSecurityNumber).getBrokerageAccount() == null){\r\n throw new UnauthorizedActionException();\r\n }\r\n return getPatron(socialSecurityNumber).getBrokerageAccount().getAvailableBalance();\r\n }",
"private void doWithdrawal() {\n while(true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n int amountWithdrawn = ui.readWithdrawalAmount();\n\n if(userAccount.debit(amountWithdrawn)){\n ui.displayNewBalance(userAccount);\n break;\n\n } else {\n ui.displayError(\"You do not have enough money in this account to withdraw \" + amountWithdrawn);\n }\n }catch(Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }",
"@Test\n\tpublic void testWithdraw(){\n\t\t\n\t\t// Arrange\n\t\tBigDecimal amountToWithdraw = new BigDecimal(10.00);\n\t\tBigDecimal expectedBalance = new BigDecimal(110.5);\n\t\tdouble delta = 1e-3;\n\t\t// Act\n\t\tcurrentAccount.withdraw(amountToWithdraw);\n\t\tBalance actualBalance = currentAccount.checkBalance();\n\t\t\n\t\t// Assert\n\t\tassertEquals(expectedBalance.doubleValue(), actualBalance.getAmount().doubleValue(), delta);\n\t}",
"boolean check(double amount) {\n\t\treturn (balance >= amount);\n\t}",
"@Override\r\n\tpublic double checkBalance(String mobileNo) {\n\t\tCustomer custCheckBalance = custMap.get(mobileNo);\r\n\t\tdouble amount = custCheckBalance.getInitialBalance();\r\n\t\treturn amount;\r\n\t}",
"@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }",
"@Test\n\tpublic void withdrawTest(){\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tAccount cAcc = new CurrentAccount(cus);\n\t\tbc.withdraw(cAcc, 300);\n\t\tboolean flag = false;\n\t\tif(cAcc.getBalance() == -300.0){\n\t\t\tflag = true;\n\t\t}\n\t\tassertTrue(flag);\n\t}",
"public double getCurrentBalance(){\n if(!checkAccountOpen()){\n System.out.println(\"This transaction could not be processed. Please check your account status.\");\n }\n System.out.println(\"Your current balance is: $\"+currentBalance);\n return currentBalance;\n }",
"public boolean checkBankBalance(int value1,int amount1)\n {\n if(value1==amount1)\n {\n return true;\n }\n return false;\n }",
"private void listBalances() {\n\t\t\r\n\t}",
"public boolean isBenefitAvailableFor(Account account, Dining dining);",
"public double checkBalanceSavings(long socialSecurityNumber, String userName, String password) throws AuthenticationException,UnauthorizedActionException{\r\n if(security(socialSecurityNumber, userName, password)){\r\n throw new AuthenticationException();\r\n }\r\n if(getPatron(socialSecurityNumber).getSavingsAccount() == null){\r\n throw new UnauthorizedActionException();\r\n }\r\n return getPatron(socialSecurityNumber).getSavingsAccount().getAvailableBalance();\r\n }",
"InsufficientFunds(Account a) {\n balance = a.currentBalance();\n }",
"@Test(priority = 5)\n public void viewAccountBalance() throws IOException, InterruptedException {\n WebElement viewbalanceBtn = driver.findElement(By.xpath(Utility.fetchLocator(\"viewBalanceBtn_XPATH\")));\n viewbalanceBtn.click();\n Thread.sleep(3000);\n //Print out balance\n WebElement availableBalance = driver.findElement(By.xpath(Utility.fetchLocator(\"availableBalance_XPATH\")));\n String balanceText = availableBalance.getText();\n System.out.println(\"The balance is \" + balanceText);\n //Close modal for balance info\n WebElement balanceModal = driver.findElement(By.className(Utility.fetchLocator(\"closeModalBalance_CLASS\")));\n balanceModal.click();\n Thread.sleep(3000);\n }",
"public static void INTTransfer_Insufficientbalance() {\n\n try {\n clickHarmburgerMenuBTN();\n clickTransferBTN();\n clickIntertnational();\n internationalFundTransfer();\n waitToElement(\"//android.widget.TextView[@text='Insufficient balance.']\");\n\n MobileElement insufficientMSG = driver.findElement(By.xpath(\"//android.widget.TextView[@text='Insufficient balance.']\"));\n verifyElementIsDisplayed(insufficientMSG, \"Insufficient Balance\");\n clickCancelButton();\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"unable to verify the message\" + e.getMessage());\n }\n\n\n }",
"public void setAvailable_Balance(com.token.vl.service.MoneyWs available_Balance) {\n this.available_Balance = available_Balance;\n }",
"public int withdraw() {\n\t\tif ((acc.getBalance() - keyboard.getAmt()) > acc.getMinimumBalace()) {\r\n\t\t\tif (casher.withdraw(keyboard.getAmt()) == 1) {\r\n\t\t\t\tsetNewBalance();\r\n\t\t\t\t\r\n\t\t\t\treciept.printer(acc.getAccountNumber(), acc.getBalance(), keyboard.getAmt());\r\n\t\t\t\treturn 1;\r\n\t\t\t} else\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}",
"@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public CheckAccount(double balance, double option) {\n this.balance = balance;\n this.option = option;\n }",
"public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }",
"public CheckBalanceUpcoming() {\n this.upcomingPayment = -1;\n }",
"void accbal()\r\n{\r\nScanner sc5 = new Scanner(System.in);\r\nSystem.out.print(\"Please Enter the Amount you want to Withdraw\");\r\nint accbal = sc5.nextInt();\r\nif(accbal <= money[x]) \r\n{\r\n money[x] = money[x] - accbal;\r\n System.out.println(\"Amount Withdrawn is\"+accbal);\r\n System.out.println(\"The Current Balance is \"+money[x]);\r\n}\r\nelse \r\n{\r\n System.out.println(\"Insufficient balance!!!Please enter a lesser amount and try again\");\r\n}\r\n}",
"public double getBalance() {\n\n double balance = 0;\n balance = overDraftLimit;\n return balance;\n\n }",
"public boolean getAccountHasWithdrawLimit(){\n if (currentAccount instanceof SavingAccount){\n return ((SavingAccount)currentAccount).getHasWithdrawLimit();\n \n }\n else if (currentAccount instanceof NetSavingAccount){\n return ((NetSavingAccount)currentAccount).getHasWithdrawLimit();\n }\n else if (currentAccount instanceof ChequeAccount){\n return ((ChequeAccount)currentAccount).getHasWithdrawLimit(); \n }\n else if (currentAccount instanceof FixedAccount){\n return ((FixedAccount)currentAccount).getHasWithdrawLimit();\n }\n else{\n System.out.println(\"Get Account WithdrawLimit (Bool) Account not found\");\n return false;\n }\n }",
"@Override\n\tpublic double queryBalance(int accNo) {\n\t\treturn 0;\n\t}",
"public int getBalance() {\n return total_bal;\n }",
"@Test\n\tpublic void testRecalculateAccountBalance() {\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"1\");\n\t\tsmsAccount.setSakaiSiteId(\"1\");\n\t\tsmsAccount.setMessageTypeCode(\"1\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(10L);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\t\tinsertTestTransactionsForAccount(smsAccount);\n\n\t\tAssert.assertTrue(smsAccount.exists());\n\n\t\tList<SmsTransaction> transactions = hibernateLogicLocator\n\t\t\t\t.getSmsTransactionLogic().getSmsTransactionsForAccountId(\n\t\t\t\t\t\tsmsAccount.getId());\n\n\t\tAssert.assertNotNull(transactions);\n\t\tAssert.assertTrue(transactions.size() > 0);\n\n\t\tsmsBillingImpl.recalculateAccountBalance(smsAccount.getId());\n\n\t\tSmsAccount recalculatedAccount = hibernateLogicLocator\n\t\t\t\t.getSmsAccountLogic().getSmsAccount(smsAccount.getId());\n\t\tAssert.assertNotNull(recalculatedAccount);\n\t\tAssert.assertTrue(recalculatedAccount.getCredits() == 6660);\n\t}",
"public BigDecimal validateBalance() throws BalanceException {\n\n BigDecimal balanceOfBankAccount;\n try {\n LOG.info(\"Enter balance for account: \");\n balanceOfBankAccount = IOService.getInstance().readBigDecimal();\n } catch (NumberFormatException err){\n throw new BalanceException( \"Incorrect entry. Please input only integer.\", err);\n }\n return balanceOfBankAccount;\n\n }",
"boolean isBalance(Node node) {\n\t\tint i = isBalance1(node);\n\t\tif(i!=-1)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean checkAndFreezeFunds (int secretKey, double proposedFreeze) {\n\n int theBankAccountNumber;\n // use AccountLink and secret key to get actual Bank Account number\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n if ( theAccountLink != null ) {\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n return false;\n }\n // use account number to get full BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // ask BankAccount to check and (if possible) freeze the amount\n boolean fundsFrozen = theBankAccount.checkAndFreeze(proposedFreeze);\n\n if (fundsFrozen) {\n updateBankDisplay();\n }\n\n return fundsFrozen;\n }",
"@Test\n\tpublic void moneyTrnasferExcetionInsufficientBalanceOfFromAccount() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.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(\"Account Number - \");\n\t\tsb.append(accountNumberFrom);\n\t\tsb.append(\" do not have sufficient amout to transfer.\");\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 void getBalance() {\n\t\tSystem.out.println(\"Balance in Savings account is\" + balance);\n\t\t//return balance;\n\t}",
"@Override\n public BigDecimal getCurrentBalance(Account account) {\n return null;\n }",
"public BigDecimal borrow(Account acct) {\n\t\tBigDecimal amt = maxLoans.subtract(acct.loans);\n\t\tif (amt.compareTo(BigDecimal.ZERO) < 0)\n\t\t\tamt = BigDecimal.ZERO;\n\t\treturn amt;\n\t}",
"@Test\n\tpublic void depositTest(){\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tAccount cAcc = new CurrentAccount(cus);\n\t\tbc.deposit(cAcc, 500, true);\n\t\tboolean flag = false;\n\t\tif(cAcc.getBalance() == 500.0){\n\t\t\tflag = true;\n\t\t}\n\t\tassertTrue(flag);\n\t}",
"@Test\n\tpublic void testGetEuroBalance(){\n\t\tForexService fakeForexService = new FakeForexService();\n\t\t// 1.11 - EUR-GBP rate\n\t\tcurrentAccount.setForexService(fakeForexService);\n\t\tBigDecimal expectedEuroBalance = new BigDecimal(Double.toString(133.755));\n\t\t\n\t\t// Act\n\t\tBalance actualBalanceEuro = currentAccount.checkBalance(\"EUR\");\n\t\t\n\t\t// Assert\n\t\tassertEquals(expectedEuroBalance, actualBalanceEuro.getAmount());\n\t}",
"public double getCheckingBalance() {\n return checkingBalance;\n }",
"public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }",
"private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}",
"private void validateBalance(Double fromBalance, Double transferAmount) throws PaymentsException {\n\t\tif ((fromBalance - transferAmount) <= 0) {\n\t\t\tlogger.error(\"Not enough balance.\");\n\t\t\tthrow new PaymentsException(\" Not enough funds. \");\n\t\t\t\n\t\t}\n\t}",
"public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }",
"BigDecimal getOpeningDebitBalance();",
"BigDecimal getOpeningDebitBalance();",
"public double getBal() {\n\t\t return balance;\r\n\t }",
"public boolean isOverdrawn() {\n return balance < 0;\n }",
"public boolean checkNodeBalance(BSTNode<K> currentNode) {\n if (currentNode == null)\n return true;\n if (subTreeDiff(currentNode) < -1 || subTreeDiff(currentNode) > 1) \n return false;\n return true;\n }",
"public long availableForAccount(int acctnum) {\n if (acctnum != -1) {\n return mAccounts.get(acctnum).available();\n } else {\n long sum = 0;\n for (HDAccount hda : mAccounts)\n sum += hda.available();\n return sum;\n }\n }",
"@Override\n\tpublic void stateCheck() {\n\t\tif(balance<0 && balance>=-1000)\n\t\t{\n\t\t\tacc.setState(new YellowState(this));\n\t\t}\n\t\telse if(balance<-1000)\n\t\t{\n\t\t\tacc.setState(new RedState(this));\n\t\t}\n\t}",
"public boolean isBalanced() {\n\t if (checkHeight(root)==-1)\n\t \t\treturn false;\n\t \telse\n\t \t\treturn true;\n\t}",
"public long getBalance() {\n return this.balance;\n }",
"BigDecimal getClosingDebitBalance();",
"@Test\n public void withdrawCheckingTest(){\n userC.withdraw(200.00);\n assertEquals(\"Balance is now $100.00\", userC.getCurrentBalance(), 100.00, DELTA);\n }",
"private static boolean isValidBalance(float balance) {\n\t\tif(balance < 0) {\r\n\t\t\tSystem.out.println(\"Not a valid balance\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse return true;\r\n\t}",
"public void execute() {\n\t\t// get references to bank database and screen\n\t\tatmg.BankDatabase bankDatabase = getBankDatabase();\n\n\t\t// get the available balance for the account involved\n\t\tdouble availableBalance = bankDatabase.getAvailableBalance(getAccountNumber());\n\n\t\t// get the total balance for the account involved\n\t\tdouble totalBalance = bankDatabase.getTotalBalance(getAccountNumber());\n\n\t\t// display the balance information on the screen\n\t\tint input = JOptionPane.showOptionDialog(null,\n\t\t\t\t\"\\nBalance Information:\" + \"\\n\" + \" - Available balance: \" + availableBalance + \"\\n - Total balance:\"\n\t\t\t\t\t\t+ totalBalance + \"\\n\\n\",\n\t\t\t\tnull, JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null,\n\t\t\t\tnew String[] { \"OK\"}, \"default\");\n\t\tif (input == JOptionPane.OK_OPTION) {\n\t\t\t\n\n\t\t} else {\n\t\t\t//windowT.disable();\n\t\t}\n\n\t}",
"public static double validateBalance(double balance) throws AccountHandlingException\n\t{\n\t\tif(balance < MIN_BALANCE)\n\t\t\tthrow new AccountHandlingException(\"A/C Overdrawn!!!!!!\");\n\t\treturn balance;\n\t}",
"public void testAutoBalanceTransactions(){\n\t\tsetDoubleEntryEnabled(false);\n\t\tmTransactionsDbAdapter.deleteAllRecords();\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(0);\n\t\tString imbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNull();\n\n\t\tvalidateTransactionListDisplayed();\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\t\tonView(withId(R.id.fragment_transaction_form)).check(matches(isDisplayed()));\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Autobalance\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"499\"));\n\n\t\t//no double entry so no split editor\n\t\t//TODO: check that the split drawable is not displayed\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(1);\n\t\tTransaction transaction = mTransactionsDbAdapter.getAllTransactions().get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\t\timbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNotNull();\n\t\tassertThat(imbalanceAcctUID).isNotEmpty();\n\t\tassertTrue(mAccountsDbAdapter.isHiddenAccount(imbalanceAcctUID)); //imbalance account should be hidden in single entry mode\n\n\t\tassertThat(transaction.getSplits()).extracting(\"mAccountUID\").contains(imbalanceAcctUID);\n\n\t}",
"public void getCurrentWithdrawlInput()\r\n\t{\r\n\t\tSystem.out.println(\"Current Account Balance : \" + Double.toString(currentBalance));\r\n\t\tSystem.out.println(\"Enter the Amount you wnat to Withdraw : \");\r\n\t\tdouble amount = input.nextDouble();\r\n\t\tif((currentBalance-amount)>=0)\r\n\t\t{\r\n\t\t\tcalcCurrentWithdraw(amount);\r\n\t\t\tSystem.out.println(\"Withdrawl Successful\" + \"Current Account Balance : \" + Double.toString(currentBalance));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Insufficient Amount in your Accout to withdraw\");\r\n\t\t}\r\n\t}",
"private void withdraw() {\n userInput = 0;\n while (userInput <= 0) {\n System.out.printf(\"Din nuværende balance er: %.2f DKK\\n\" +\n \"Indtast ønsket beløb at hæve: \", balanceConverted);\n\n textMenuKey(false, \"\");\n\n if (userInput <= 0) {\n System.out.println(\"Indtast et gyldigt beløb\");\n }\n }\n\n if ((userInput * 100) <= balance) {\n moneyController(-userInput);\n mysql.transactionUpdate(customerNumber, customerName, balance, userInput, \"Withdraw\");\n } else {\n System.out.println(\"Utilstrækkelig balance på kontien\");\n }\n }",
"boolean withdraw (int value )\n {\n if (value>balance)\n {\n return false;\n }\n else {\n balance-=value;\n return true;\n }\n }",
"public long getBalance() {\n\t\n\treturn balance;\n}",
"public int getBalance()\n {\n return balance;\n }",
"public double getBalance()\n \n {\n \n return balance;\n \n }",
"public static String isBillLate(String account){\n return \"select cb_late from current_bills where cb_account = '\"+account+\"'\";\n }",
"private void doReserve() {\n pickParkingLot();\n pickParkingSpot();\n pickTime();\n pickDuration();\n int amount = pickedparkinglot.getPrice() * pickedduration;\n if (pickedAccount.getBalance() >= amount) {\n currentReservation = new Reservation(pickedparkingspot, pickedAccount, pickedtime, pickedduration);\n validateReservation(currentReservation);\n } else {\n System.out.println(\"Insufficient balance\");\n }\n }",
"public static String isBillPaid(String account){\n return \"select * from current_bills where cb_account = '\"+account+\"' and cb_paid = 1\";\n }",
"public boolean updateBalance(int account_id, int final_amount, Connection con){\n try {\n tryDbUpdate(\"update ACCOUNTS set BALANCE = \"+ final_amount + \" where ACCOUNT_ID = \" + account_id, con);\n cache.add(new Account(account_id, final_amount));\n } catch (SQLException e) {\n try {\n con.rollback();\n return false;\n } catch (SQLException e1) {\n e1.printStackTrace();\n return false;\n }\n }\n return true;\n }",
"@Test\n public void testGetBalance() {\n System.out.println(\"getBalance\");\n Account instance = new Account(\"Piper\", 10.0);\n double expResult = 10.0;\n double result = instance.getBalance();\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"private void DetermineBalance() {\n\t\t\n\t\tString query = \"SELECT Ticket_Class FROM Customer_Flight_Information WHERE Customer_Name = \"+name;\n\t\tCursor cursor = deltaDB.rawQuery(query, null);\n\t\t\n\t\ttry{\n\t\t\tif(cursor.moveToFirst()){\n\t\t\t String ticketClass = cursor.getString(cursor.getColumnIndex(\"Ticket_Class\"));\n\t\t\t \n\t\t\t switch(ticketClass){\n\t\t\t \t\n\t\t\t \t\tcase \"Economy Class\":\n\t\t\t \t\t\tprice_txt.setText(\"$315\");\n\t\t\t \t\tbreak;\n\t\t\t \t\t\n\t\t\t \t\tcase \"Business Class\":\n\t\t\t \t\t\tprice_txt.setText(\"$365\");\n\t\t\t \t\tbreak;\n\t\t\t \t\t\n\t\t\t \t\tcase \"First Class\":\n\t\t\t \t\t\tprice_txt.setText(\"$420\");\n\t\t\t \t\tbreak;\t\n\t\t\t }\n\t\t\t}\n\t\t}finally{\n\t\t\tcursor.close();\n\t\t}\n\t}",
"public void update() {\n\t\n\tif(getBalance() > 0) {\n\t\tcanWithdraw = true;\n\t}else {canWithdraw = false;}//end else statement\n}",
"@Override\n public boolean deposit(Account account, BigDecimal amount) {\n return false;\n }",
"public static void atmCheckTransferValid(String accNum, int amount, String accNumB) {\n\t\ttry {\n\t\t\tif (amount >= 0 && amount <= 1000000) {\n\t\t\t\tif (AccMgr.checkDailyTransferLimit(accNum, amount)) {\n\t\t\t\t\tAccMgr.performDailyTransfer(amount, accNum);\n\t\t\t\t\tTransactionFileMgr.addXfrTransaction(accNum, Integer.toString(amount), accNumB);\n\t\t\t\t\tSystem.out.println(\"Transfer successful!\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"You have exceeded the daily limit\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Please enter a number between 0 - 1000000\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"double getBalance(UUID name);",
"public BigDecimal getBalance() {\n return balance;\n }",
"public BigDecimal getBalance() {\n return balance;\n }"
] | [
"0.83035403",
"0.7642473",
"0.72523975",
"0.71771765",
"0.71666414",
"0.69082737",
"0.6775751",
"0.6711617",
"0.6694238",
"0.6615132",
"0.6593064",
"0.6547686",
"0.6537332",
"0.6523708",
"0.65100425",
"0.649842",
"0.649842",
"0.6464181",
"0.64549243",
"0.64464766",
"0.64205945",
"0.64086145",
"0.6406631",
"0.64037853",
"0.6388197",
"0.6341051",
"0.6333498",
"0.6331966",
"0.63272244",
"0.6315133",
"0.63138086",
"0.62797546",
"0.62626547",
"0.625699",
"0.6234847",
"0.62336653",
"0.6220202",
"0.62091845",
"0.6186138",
"0.61754805",
"0.61717844",
"0.6170271",
"0.61380756",
"0.6133255",
"0.61316633",
"0.6130929",
"0.61307085",
"0.6128174",
"0.61248994",
"0.60981447",
"0.609281",
"0.6073647",
"0.6070553",
"0.6068631",
"0.60685325",
"0.6043438",
"0.60268235",
"0.60255814",
"0.60217005",
"0.60181123",
"0.6005748",
"0.5997847",
"0.59939176",
"0.5993104",
"0.5988354",
"0.5983771",
"0.5977591",
"0.5969211",
"0.5969211",
"0.5967584",
"0.5964725",
"0.59629184",
"0.5954902",
"0.5949649",
"0.59472203",
"0.59413415",
"0.59354675",
"0.59320796",
"0.5920672",
"0.59203446",
"0.59201586",
"0.59178996",
"0.5915796",
"0.5907194",
"0.5899806",
"0.589642",
"0.5892735",
"0.58912224",
"0.58798885",
"0.5866722",
"0.5853626",
"0.5853478",
"0.5853224",
"0.5850326",
"0.5847675",
"0.5837811",
"0.5835229",
"0.5830589",
"0.5825006",
"0.5825006"
] | 0.7152121 | 5 |
This method do both debit and credit transaction as per the request data. If the requested data contains debit as transaction type the transaction will debit. And, if the requested data contains credit as transaction type it will be credit transaction. | public void makeTransaction(Transaction transaction)
throws BalanceNotAvailableException, TransactionIdNotUniqueException, TransactionTypeInCorrectException {
if (checkTransactionId(transaction.getTransactionId())) {
throw new TransactionIdNotUniqueException("Transaction Id should be unique");
} else if (transaction.getTransactionType().equalsIgnoreCase("debit")) {
if (checkAvailableBalance(transaction.getAccountId(), transaction.getAmount())) {
throw new BalanceNotAvailableException("Balance Not Available");
}
updateAccountBalance(transaction.getAccountId(),
getAccountBalance(transaction.getAccountId()) - transaction.getAmount());
transactionRepository.save(transaction);
} else if (transaction.getTransactionType().equalsIgnoreCase("credit")) {
updateAccountBalance(transaction.getAccountId(),
getAccountBalance(transaction.getAccountId()) + transaction.getAmount());
transactionRepository.save(transaction);
} else {
throw new TransactionTypeInCorrectException("Transaction type should be debit or credit");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean debit(TransactionRequest transaction) throws ebank.InsufficientBalanceException,ebank.CardNumberException, SQLException, ClassNotFoundException;",
"@ApiOperation(value = \"This end point will allow user to perform a debit transaction on their wallet\", response = Wallet.class)\n\t@PostMapping(\"/txn/debit\")\n\tpublic Wallet performDebittTxn(@RequestBody TransactionRequest request)\n\t\t\tthrows UserNotFoundException, WalletNotFoundException, NumberFormatException, WalletBalanceLowException, NegativeAmountException {\n\t\thandleNegativeAmounts(request);\n\n\t\tString userid = SecurityContextHolder.getContext().getAuthentication().getName();\n\t\tAssert.notNull(userid, \"No user has logged in so can't send wallet details\");\n\t\treturn walletService.performTransaction(userid, TXN_TYPES.DEBIT, Double.valueOf(request.getAmount()));\n\t}",
"@Override\r\n\tpublic TransferAmountResponseDto transfer(TransferAmountRequestDto transferAmountRequestDto) {\r\n\t\tlog.info(\"inside transaction service\");\r\n\r\n\t\tTransferAmountResponseDto transferAmountResponseDto = new TransferAmountResponseDto();\r\n\r\n\t\tTransaction debitTransaction = new Transaction();\r\n\t\tTransaction creditTransaction = new Transaction();\r\n\r\n\t\tAccount fromAccount = accountRepository.findByCustomerId(transferAmountRequestDto.getCustomerId());\r\n\t\tAccount toAccount = accountRepository.findByAccountNumber(transferAmountRequestDto.getCreditTo());\r\n\r\n\t\tif (fromAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (toAccount == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NOT_FOUND);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getAccountNumber().equalsIgnoreCase(toAccount.getAccountNumber())) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_ACCOUNT);\r\n\t\t}\r\n\r\n\t\tBeneficiary existBeneficiary = beneficiaryRepository.findByCustomerAccountNumberAndBeneficiaryAccountNumber(\r\n\t\t\t\tfromAccount.getAccountNumber(), toAccount.getAccountNumber());\r\n\r\n\t\tif (existBeneficiary == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.NOT_BENEFICIARY);\r\n\t\t}\r\n\r\n\t\tif (fromAccount.getBalance() < transferAmountRequestDto.getTransferAmount()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.INVALID_AMOUNT);\r\n\t\t}\r\n\r\n\t\tif (transferAmountRequestDto.getTransferAmount() <= 0) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.MINIMUM_AMOUNT);\r\n\t\t}\r\n\r\n\t\tdebitTransaction.setAccountNumber(fromAccount.getAccountNumber());\r\n\t\tdebitTransaction.setTransactionType(\"debit\");\r\n\t\tdebitTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tdebitTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tdebitTransaction.setAccount(fromAccount);\r\n\r\n\t\tcreditTransaction.setAccountNumber(toAccount.getAccountNumber());\r\n\t\tcreditTransaction.setTransactionType(\"credit\");\r\n\t\tcreditTransaction.setTransferAmount(transferAmountRequestDto.getTransferAmount());\r\n\t\tcreditTransaction.setTransactionDate(LocalDateTime.now());\r\n\t\tcreditTransaction.setAccount(toAccount);\r\n\r\n\t\tdouble remainingBalance = fromAccount.getBalance() - transferAmountRequestDto.getTransferAmount();\r\n\t\tdouble updatedBalance = toAccount.getBalance() + transferAmountRequestDto.getTransferAmount();\r\n\r\n\t\tfromAccount.setBalance(remainingBalance);\r\n\t\ttoAccount.setBalance(updatedBalance);\r\n\r\n\t\taccountRepository.save(fromAccount);\r\n\r\n\t\tTransaction transaction = transactionRepository.save(debitTransaction);\r\n\t\tif (transaction.getTransactionId() == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.TRANSACTION_FAILED);\r\n\t\t}\r\n\t\taccountRepository.save(toAccount);\r\n\r\n\t\ttransactionRepository.save(creditTransaction);\r\n\r\n\t\ttransferAmountResponseDto.setMessage(\"Amount Transferred successfully..\");\r\n\t\ttransferAmountResponseDto.setTransactionId(transaction.getTransactionId());\r\n\t\ttransferAmountResponseDto.setStatusCode(201);\r\n\t\treturn transferAmountResponseDto;\r\n\t}",
"@RequestMapping(value = \"/accounts/transaction\", method = RequestMethod.POST)\n\tpublic ResponseEntity<String> transaction(\n\t\t\t@RequestBody Transaction transaction) {\n\t\tlogger.debug(\"AccountController.transaction: \" + transaction.toString());\n\t\tif (transaction.getType().equals(TransactionType.DEBIT)) {\n\t\t\tlogger.debug(\"debit transaction\");\n\t\t\tAccount accountResponse = this.service.findAccount(transaction\n\t\t\t\t\t.getAccountId());\n\n\t\t\tBigDecimal currentBalance = accountResponse.getBalance();\n\n\t\t\tBigDecimal newBalance = currentBalance.subtract(transaction\n\t\t\t\t\t.getAmount());\n\n\t\t\tif (newBalance.compareTo(BigDecimal.ZERO) >= 0) {\n\t\t\t\taccountResponse.setBalance(newBalance);\n\t\t\t\tthis.service.saveAccount(accountResponse);\n\t\t\t\t// TODO save transaction?\n\t\t\t\tlogger.debug(\"transaction processed.\");\n\t\t\t\treturn new ResponseEntity<String>(\"SUCCESS\",\n\t\t\t\t\t\tgetNoCacheHeaders(), HttpStatus.OK);\n\n\t\t\t} else {\n\t\t\t\t// no sufficient founds available\n\t\t\t\treturn new ResponseEntity<String>(\"FAILED\",\n\t\t\t\t\t\tgetNoCacheHeaders(), HttpStatus.EXPECTATION_FAILED);\n\t\t\t}\n\n\t\t} else if (transaction.getType().equals(TransactionType.CREDIT)) {\n\t\t\tlogger.debug(\"credit transaction\");\n\t\t\tAccount accountResponse = this.service.findAccount(transaction.getAccountId());\n\n\t\t\tBigDecimal currentBalance = accountResponse.getBalance();\n\n\t\t\tlogger.debug(\"AccountController.transaction: current balance='\"\n\t\t\t\t\t+ currentBalance + \"'.\");\n\n\t\t\tif (transaction.getAmount().compareTo(BigDecimal.ZERO) > 0) {\n\n\t\t\t\tBigDecimal newBalance = currentBalance.add(transaction.getAmount());\n\t\t\t\tlogger.debug(\"AccountController.increaseBalance: new balance='\"\n\t\t\t\t\t\t+ newBalance + \"'.\");\n\n\t\t\t\taccountResponse.setBalance(newBalance);\n\t\t\t\tthis.service.saveAccount(accountResponse);\n\t\t\t\t// TODO save transaction?\n\t\t\t\treturn new ResponseEntity<String>(\"SUCCESS\", getNoCacheHeaders(), HttpStatus.OK);\n\n\t\t\t} else {\n\t\t\t\t// amount can not be negative for increaseBalance, please use\n\t\t\t\t// decreaseBalance\n\t\t\t\treturn new ResponseEntity<String>(\"FAILED\", getNoCacheHeaders(),\n\t\t\t\t\t\tHttpStatus.EXPECTATION_FAILED);\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic KLSResponse handleCreditTransaction(CurrentTransactionData currentTransactionData, STLoanRecoveryData stLoanRecoveryData) {\n\n\t\tlogger.info(\"Start : Handling credit transaction in handleCreditTransaction() method.\");\n\t\tCurrentTransaction master = CurrentTransactionHelper.getCurrentTransaction(currentTransactionData);\n\t\tKLSResponse klsResponse = new KLSResponse();\n\t\tIPacsDAO pacsDao = KLSDataAccessFactory.getPacsDAO();\n\t\tMap<String, Object> creditMap = new HashMap<String, Object>();\n\t\tcreditMap.put(ServiceConstants.KLS_RESPONSE, klsResponse);\n\t\tcreditMap.put(ServiceConstants.IS_STANDALONE_MODE, currentTransactionData.isStandAloneStatus());\n\t\tBankParameter bankParameter = KLSDataAccessFactory.getBankParameter();\n\t\t// check whether the savings account number exists.\n\t\tlogger.info(\"currentTransactionData.isStandAloneStatus() in handle credit transaction method.\"+currentTransactionData.isStandAloneStatus());\n\t\tInteger pacsId=0;\n\t\tInteger productId=0;\n\t\tboolean isSavingsAccountNumberValid = isSavingsAccountNumberValid(currentTransactionData.getSavingsAccountNumber(), master, klsResponse,\n\t\t\t\tcurrentTransactionData.isStandAloneStatus());\n\t\t\n\t\tCurrentTransaction creditDebitTransaction = copyCurrentTransaction(master);\n\t\tlogger.info(\"isSavingsAccountNumberValid in handle credit transaction method.\"+isSavingsAccountNumberValid);\n\t\t\n\t\tif (isSavingsAccountNumberValid) {\n\t\t\t// get line of credit accounts balance.\n\t\t\tif (calculateLineOfCreditAccountsBalance(master, creditMap)) {\n\t\t\t\tString CCB=(String) creditMap.get(\"CCB_ACCOUNT\");\n\t\t\t\tInteger borrowingProductid=(Integer) creditMap.get(\"Borrowing_Product\");\n\t\t\t\tString borrowingProduct=borrowingProductid.toString();\n\t\t\t\tif (doCreditTransaction(master, creditMap, stLoanRecoveryData)) {\n\t\t\t\t\t// get the current transaction dao.\n\t\t\t\t\tICurrentTransactionDAO dao = KLSDataAccessFactory.getCurrentTransactionDAO();\n\t\t\t\t\tList<CurrentTransaction> currTransactionList = (List<CurrentTransaction>) creditMap\n\t\t\t\t\t\t\t.get(ServiceConstants.CREDIT_CURRENT_TRANSACTION_LIST);\n\t\t\t\t\tcreditMap = (Map<String, Object>) creditMap.get(ServiceConstants.CREDIT_ACCOUNT_MAP);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * doing Debit, Credit on loan account\n\t\t\t\t\t\t */ \n\t\t\t\t\t\tfor(CurrentTransaction transaction:currTransactionList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString businessDate=\"\";\n\t\t\t\t\t\t\tPacs pacs=pacsDao.getPacs(transaction.getPacs().getId());\n\t\t\t\t\t\t\tlogger.info(\"pacs type::\"+pacs.getPacsStatus());\n\t\t\t\t\t\t\tif(pacs.getPacsStatus().equals(PacsStatus.Offline)){\n\t\t\t\t\t\t\t\tbusinessDate=RestClientUtil.getPacsBusinessDate(transaction.getPacs().getId(),pacs.getBranch().getId());\n\t\t\t\t\t\t\t\t//businessDate=\"2017-05-01\";\n\t\t\t\t\t\t\t\ttransaction.setBusinessDate(DateUtil.getVSoftDateByString(businessDate));\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}\n\t\t\t\t\t\tif(bankParameter.getCbsIntegrationMethod().equals(CBSMethodEnum.ISO8583)){\n\t\t\t\t\t\t\tISOTransactionResponse response=new ISOTransactionResponse();\n\t\t\t\t\t\t\t response=getISOResponse(currTransactionList,currentTransactionData);\n\t\t\t\t\t\t\t\tif(response!=null && response.getStatus()){\n\t\t\t\t\t\t\t postDebitCreditTransaction(creditDebitTransaction,currTransactionList.get(0).getVoucherNumber());\n\t\t\t\t\t\t dao.saveCreditCurrentTransaction(currTransactionList, creditMap);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tpostDebitCreditTransaction(creditDebitTransaction,currTransactionList.get(0).getVoucherNumber());\n\t\t\t\t\t\t\t dao.saveCreditCurrentTransaction(currTransactionList, creditMap);\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\tpostDebitCreditTransaction(creditDebitTransaction,currTransactionList.get(0).getVoucherNumber());\n\t\t\t\t\t\tdao.saveCreditCurrentTransaction(currTransactionList, creditMap);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMap<String, String> recoveryTransMap = new<String, String> HashMap();\n\t\t\t\t\t\trecoveryTransMap.put(\"TOTAL_PRINCIPAL\", \"0\");\n\t\t\t\t\t\trecoveryTransMap.put(\"TOTAL_INTEREST\", \"0\");\n\t\t\t\t\t\trecoveryTransMap.put(\"TOTAL_PENAL_INTEREST\", \"0\");\n\t\t\t\t\t\trecoveryTransMap.put(\"CCB_ACCOUNT\",CCB );\n\t\t\t\t\t\trecoveryTransMap.put(\"BORROWING_PRODUCT\",borrowingProduct );\n\n\t\t\t\t\t\tfor (CurrentTransaction currentTransaction : currTransactionList) {\n\t\t\t\t\t\t\tBigDecimal amount = BigDecimal.ZERO;\n\t\t\t\t\t\t\tBigDecimal transAmount = BigDecimal.ZERO;\n\t\t\t\t\t\t\tswitch (currentTransaction.getTransactionCode()) {\n\t\t\t\t\t\t\tcase PRINCIPAL_BAL:\n\t\t\t\t\t\t\t\tamount = new BigDecimal(recoveryTransMap.get(\"TOTAL_PRINCIPAL\"));\n\t\t\t\t\t\t\t\ttransAmount = currentTransaction.getTransactionAmount().getMoney().getAmount();\n\t\t\t\t\t\t\t\tamount = amount.add(transAmount);\n\t\t\t\t\t\t\t\trecoveryTransMap.put(\"TOTAL_PRINCIPAL\", amount.toString());\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase INTEREST:\n\t\t\t\t\t\t\t\tamount = new BigDecimal(recoveryTransMap.get(\"TOTAL_INTEREST\"));\n\t\t\t\t\t\t\t\ttransAmount = currentTransaction.getTransactionAmount().getMoney().getAmount();\n\t\t\t\t\t\t\t\tamount = amount.add(transAmount);\n\t\t\t\t\t\t\t\trecoveryTransMap.put(\"TOTAL_INTEREST\", amount.toString());\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase PENAL_INTEREST:\n\t\t\t\t\t\t\t\tamount = new BigDecimal(recoveryTransMap.get(\"TOTAL_PENAL_INTEREST\"));\n\t\t\t\t\t\t\t\ttransAmount = currentTransaction.getTransactionAmount().getMoney().getAmount();\n\t\t\t\t\t\t\t\tamount = amount.add(transAmount);\n\t\t\t\t\t\t\t\trecoveryTransMap.put(\"TOTAL_PENAL_INTEREST\", amount.toString());\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tklsResponse.setsTRecoveryTransactions((HashMap<String, String>) recoveryTransMap);\n\t\t\t\t\t\t//For virmati CBS integration\n\t\t\t\t\t\tif(!\"O\".equalsIgnoreCase(bankParameter.getCbsIntegrationMethod().getValue()) && \"V\".equalsIgnoreCase(bankParameter.getOther_cbs())){\n\t\t\t\t\t\t\tlogger.info(\"Transaction will be commited after posting transaction in Virmathi\");\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t EntityManagerUtil.CommitOrRollBackTransaction(true);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tEntityManagerUtil.CommitOrRollBackTransaction(false);\n\t\t\t\t\t\tlogger.error(\"Error occured while doing credit transaction\");\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tthrow new KlsRuntimeException(\"Error occured while doing credit transaction\");\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"End : Handling credit transaction in handleCreditTransaction() method.\");\n\t\treturn klsResponse;\n\t}",
"public boolean doTransaction() {\r\n int nonce = -1;\r\n TransactionOperation transactionOperation = null;\r\n try {\r\n double balance;\r\n \r\n //read the stream for requests from client\r\n byte[] cipherText = (byte [])is.readObject();\r\n \r\n // decrypt the ciphertext to obtain the signed message\r\n ATMSessionMessage atmSessionMessage = (ATMSessionMessage) crypto.decryptRijndael(cipherText, kSession);\r\n if(!(currTimeStamp < atmSessionMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n \r\n //interpret the transaction operation in the request\r\n SignedMessage signedMessage = atmSessionMessage.getSignedMessage();\r\n \r\n \r\n \t\t//verify signature\r\n \t\ttry {\r\n \t\t\tif(!crypto.verify(signedMessage.msg, signedMessage.signature, currAcct.kPub))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"Digital signature failed...\");\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"Message signature valid...\");\r\n \t\t} catch (SignatureException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t} catch (KeyException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n TransactionMessage transactionMessage = (TransactionMessage)signedMessage.getObject();\r\n transactionOperation = transactionMessage.getOperation();\r\n \r\n //print the signed message\r\n System.out.println(\"\\n\" + (new Date()).toString());\r\n System.out.println(signedMessage.toString());\r\n \r\n //strip out the parameters embedded \r\n nonce = atmSessionMessage.getNonce();\r\n double value = transactionMessage.getValue();\r\n \r\n //print the timestamp when the transaction takes place\r\n Date now = new Date();\r\n System.out.println(\"\\n\" + now.toString());\r\n \r\n //re-route the request to the appropriate handling function\r\n if(transactionOperation == TransactionOperation.Deposit) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" DEPOSIT: \" + value);\r\n currAcct.deposit(value);\r\n \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Deposit Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.Withdraw) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" WITHDRAW: \" + value);\r\n \t currAcct.withdraw(value);\r\n \t \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Withdrawal Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.EndSession) \r\n \t {\r\n \t \tSystem.out.println(\"\\nTerminating session with ACCT#: \" + currAcct.getNumber());\r\n \t \treturn false;\r\n \t \t\r\n \t }\r\n \r\n accts.save();\r\n //create a successful reply Success and set the balance\r\n balance = currAcct.getBalance(); \r\n transactionMessage = new TransactionMessage(MessageType.ResponseSuccess,transactionOperation,balance);\r\n atmSessionMessage = new ATMSessionMessage(transactionMessage);\r\n \r\n //set the nonce \r\n atmSessionMessage.setNonce(nonce);\r\n currTimeStamp = atmSessionMessage.getTimeStamp();\r\n //encrypt the response and send it\r\n cipherText = crypto.encryptRijndael(atmSessionMessage, kSession);\r\n os.writeObject((Serializable)cipherText);\r\n \r\n //Logging.....\r\n //get the signed message and encrypt it\r\n \r\n signedMessage.encryptMessage(this.kLog);\r\n \r\n //encrypt the action\r\n //archive the signed message for logging and non-repudiation purposes \r\n SignedAction signedAction = new SignedAction(currAcct.getNumber(), atmSessionMessage.getTimeStamp(), signedMessage);\r\n \r\n //flush out transaction record to the audit file\r\n BankServer.log.write(signedAction);\r\n \r\n\t return true;\r\n }\r\n catch(Exception e){\r\n if(e instanceof TransException) replyFailure(transactionOperation,nonce);\r\n System.out.println(\"Terminating session with ACCT#: \" + currAcct.getNumber());\r\n \t//e.printStackTrace();\r\n \r\n return true;\r\n }\r\n }",
"private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }",
"private void createTransaction() {\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n if(mCategory == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Category_Income_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(etAmount.getText().toString().replaceAll(\",\", \"\"));\n if(amount < 0) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Amount_Invalid));\n return;\n }\n\n int CategoryId = mCategory != null ? mCategory.getId() : 0;\n String Description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n boolean isDebtValid = true;\n // Less: DebtCollect, More: Borrow\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n }\n\n if(isDebtValid) {\n Transaction transaction = new Transaction(0,\n TransactionEnum.Income.getValue(),\n amount,\n CategoryId,\n Description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n long newTransactionId = mDbHelper.createTransaction(transaction);\n\n if (newTransactionId != -1) {\n\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) newTransactionId);\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n mDbHelper.deleteTransaction(newTransactionId);\n }\n } else {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n }\n }\n\n }",
"public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;",
"@ApiOperation(value = \"This end point will allow user to perform a credit transaction on their wallet.\", response = Wallet.class)\n\t@PostMapping(\"/txn/credit\")\n\tpublic Wallet performCreditTxn(@RequestBody TransactionRequest request)\n\t\t\tthrows UserNotFoundException, WalletNotFoundException, NumberFormatException, WalletBalanceLowException, NegativeAmountException {\n\t\thandleNegativeAmounts(request);\n\n\t\tString userid = SecurityContextHolder.getContext().getAuthentication().getName();\n\t\tAssert.notNull(userid, \"No user has logged in so can't send wallet details\");\n\t\treturn walletService.performTransaction(userid, TXN_TYPES.CREDIT, Double.valueOf(request.getAmount()));\n\t}",
"private void deleteTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n boolean isDebtValid = true;\n if(mDbHelper.getCategory(mTransaction.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n List<Debt> debts = mDbHelper.getAllDebts();\n\n Double repayment = 0.0, borrow = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) { // Repayment\n repayment += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n borrow += debt.getAmount();\n }\n }\n\n if(borrow - mTransaction.getAmount() < repayment) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_delete_invalid));\n }\n }\n\n if(isDebtValid) {\n mDbHelper.deleteTransaction(mTransaction.getId());\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n\n cleanup();\n\n // Return to FragmentListTransaction\n getFragmentManager().popBackStackImmediate();\n LogUtils.logLeaveFunction(Tag);\n }\n }",
"public boolean isTransferRequestValid(Customer fromCustomer,Customer toCustomer,RewardCurrency fromRewardCurrency, RewardCurrency toRewardCurrency,TransferPointSetting transferPointSetting) throws InspireNetzException {\n\n MessageWrapper messageWrapper = generalUtils.getMessageWrapperObject(\"\",fromCustomer.getCusLoyaltyId(),\"\",\"\",\"\",fromCustomer.getCusMerchantNo(),new HashMap<String, String>(0),MessageSpielChannel.ALL,IndicatorStatus.YES);\n\n // Check if the customer status is active\n if ( fromCustomer.getCusStatus() != CustomerStatus.ACTIVE ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> The fromCustomer account is not active\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_FROM_CUSTOMER_INACTIVE);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(), CustomerActivityType.TRANSFER_POINT, \"Failed , source customer not active\", fromCustomer.getCusMerchantNo(), \"\");\n\n // throw exception\n throw new InspireNetzException(APIErrorCode.ERR_PARTY_NOT_ACTIVE);\n\n }\n\n\n // Check if the toCustomer is active\n if ( toCustomer.getCusStatus() != CustomerStatus.ACTIVE ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> The toCustomer account is not active\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_TO_CUSTOMER_INACTIVE);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , destination customer not active\",fromCustomer.getCusMerchantNo(),\"\");\n\n // throw exception\n throw new InspireNetzException(APIErrorCode.ERR_PARTY_NOT_ACTIVE);\n\n }\n\n\n // Check if the both fromCustomer and toCustomer are same\n if ( fromCustomer.getCusCustomerNo().longValue() == toCustomer.getCusCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> sourceCustomer and destCustomer cannot be same\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_CUSTOMERS_SAME);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , source and destination customers are same\",fromCustomer.getCusMerchantNo(),\"\");\n\n // throw exception\n throw new InspireNetzException(APIErrorCode.ERR_OPERATION_NOT_ALLOWED);\n\n }\n\n\n // Check if the transferPointSetting is valid\n if ( transferPointSetting == null ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> No TransferPointSetting object found\");\n\n messageWrapper.setSpielName(MessageSpielValue.GENERAL_ERROR_MESSAGE);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , no transfer point setting found\",fromCustomer.getCusMerchantNo(),\"\");\n\n // throw exception\n throw new InspireNetzException(APIErrorCode.ERR_OPERATION_FAILED);\n\n }\n\n\n // Check the validity for the location compatibility\n if ( fromCustomer.getCusLocation().longValue() != toCustomer.getCusLocation().longValue() &&\n transferPointSetting.getTpsTransferCompatibility() != TransferPointSettingCompatibility.ACROSS_LOCATIONS ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> Transfer request across locations are not allowed\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_ACROSS_LOCATION);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , transfer request across mega brands not allowed\",fromCustomer.getCusMerchantNo(),\"\");\n\n // return false\n throw new InspireNetzException(APIErrorCode.ERR_OPERATION_NOT_ALLOWED);\n\n\n }\n\n\n // check if the customer tier is valid\n boolean isTierValid = isCustomerTierValid(fromCustomer);\n\n // If not valid, then throw exception\n if ( !isTierValid ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> Customer tier does not allow transfer\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_CUSTOMER_TIER_NOT_VALID);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , customer tier doesn't allow transfer \",fromCustomer.getCusMerchantNo(),\"\");\n\n // return false\n throw new InspireNetzException(APIErrorCode.ERR_TRANSFER_REQUEST_TIER_NOT_VALID);\n\n }\n\n\n\n\n // Check if the customer has reached max transfer limit\n boolean isMaxTransferValid = isMaxTransfersValid(fromCustomer,transferPointSetting);\n\n // Check if the max transfer condition is valid\n if ( !isMaxTransferValid ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> Customer exceeded maximum limit\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_MAX_TRANSFER_LIMIT_REACHED);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , customer exceeded maximum transfer limit \",fromCustomer.getCusMerchantNo(),\"\");\n\n // return false\n throw new InspireNetzException(APIErrorCode.ERR_MAX_TRANSFER_POINT_COUNT_EXCEEDED);\n\n }\n\n\n // Check if the parties involved are part of a linking\n boolean isPartOfLinking = isCustomersLinked(fromCustomer, toCustomer);\n\n // Check if the customers are part of linking\n if ( isPartOfLinking ) {\n\n // Log the information\n log.info(\"transferPoints -> isTransferRequestValid -> From customer and to customer are linked\");\n\n messageWrapper.setSpielName(MessageSpielValue.TRANSFER_POINT_CUSTOMER_LINKED);\n\n userMessagingService.transmitNotification(messageWrapper);\n\n //log the activity\n customerActivityService.logActivity(fromCustomer.getCusLoyaltyId(),CustomerActivityType.TRANSFER_POINT,\"Failed , source and destination customers are linked \",fromCustomer.getCusMerchantNo(),\"\");\n\n // return false\n throw new InspireNetzException(APIErrorCode.ERR_TRANSFER_PARTIES_LINKED);\n\n }\n\n\n // Check if the customer\n return true;\n\n }",
"public void transact() {\n\t\truPay.transact();\n\n\t}",
"public void debitBankAccount() {\n\t\tint beforeDebit = this.sender.getBankAccount().getAmount();\n\t\tthis.sender.getBankAccount().setAmount(beforeDebit - this.getCost());\n\t\tSystem.out.println(this.getCost() + \" euros is debited from \" + this.sender.getName()\n\t\t\t\t+ \" account whose balance is now \" + this.sender.getBankAccount().getAmount() + \" euros\");\n\t}",
"@Override\n public void processTransaction(CashTransactionParameters transaction) {\n try{\n if(transaction.getTransactionType() == TransactionType.CREDIT)\n cashMoneyWalletModuleManagerImpl.doCreateCashDepositTransaction(transaction);\n else\n cashMoneyWalletModuleManagerImpl.doCreateCashWithdrawalTransaction(transaction);\n\n //Send Broadcast to android wallet so it can refresh the screen\n broadcaster.publish(BroadcasterType.UPDATE_VIEW, CashMoneyWalletBroadcasterConstants.CSH_REFERENCE_WALLET_UPDATE_TRANSACTION_VIEW);\n\n }catch(CantCreateDepositTransactionException e){\n //Send Broadcast to android wallet so it can refresh the screen, indicating an error\n broadcaster.publish(BroadcasterType.UPDATE_VIEW, CashMoneyWalletBroadcasterConstants.CSH_REFERENCE_WALLET_UPDATE_TRANSACTION_VIEW_TRANSACTION_FAILED);\n\n }catch(CantCreateWithdrawalTransactionException e){\n //Send Broadcast to android wallet so it can refresh the screen, indicating an error\n broadcaster.publish(BroadcasterType.UPDATE_VIEW, CashMoneyWalletBroadcasterConstants.CSH_REFERENCE_WALLET_UPDATE_TRANSACTION_VIEW_TRANSACTION_FAILED);\n\n }catch(CashMoneyWalletInsufficientFundsException e){\n //Send Broadcast to android wallet so it can refresh the screen, indicating an error of insufficient funds\n broadcaster.publish(BroadcasterType.UPDATE_VIEW, CashMoneyWalletBroadcasterConstants.CSH_REFERENCE_WALLET_UPDATE_TRANSACTION_VIEW_INSUFICCIENT_FUNDS);\n }\n }",
"public Masary_Error CheckBillType(String BTC, double CusAmount, String CustId, double serv_balance, double masry_balance, double billamount, double fees, Main_Provider provider, double deductedAmount) {\n Masary_Error Status = new Masary_Error();\n try {\n Masary_Bill_Type bill_type = MasaryManager.getInstance().getBTC(BTC);\n double trunccusamount = Math.floor(CusAmount);\n// double deductedAmount = MasaryManager.getInstance().GetDeductedAmount(Integer.parseInt(CustId), Integer.parseInt(BTC), CusAmount, provider.getPROVIDER_ID());\n if ((deductedAmount > serv_balance) || deductedAmount == -1) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-501\", provider);\n } else if (!bill_type.isIS_PART_ACC() && CusAmount < billamount) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-502\", provider);\n } else if (!bill_type.isIS_OVER_ACC() && CusAmount > billamount && billamount != 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-503\", provider);\n } else if (!bill_type.isIS_ADV_ACC() && billamount == 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-504\", provider);\n } else if (!bill_type.isIS_FRAC_ACC() && (CusAmount - trunccusamount) > 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-505\", provider);\n } else if ((CusAmount > masry_balance) || deductedAmount == -2 || deductedAmount == -3 || deductedAmount == -4) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-506\", provider);\n } else {\n Status = MasaryManager.getInstance().GETMasary_Error(\"200\", provider);\n }\n } catch (Exception ex) {\n\n MasaryManager.logger.error(\"Exception \" + ex.getMessage(), ex);\n }\n\n return Status;\n }",
"public TransactionType performTransaction() {\n while(true){\n try{\n TransactionType transactionType = ui.chooseTransactionType();\n\n switch (transactionType){\n case CHECK_BALANCE:\n this.doCheckBalance();\n return transactionType;\n case DEPOSIT:\n this.doDeposit();\n return transactionType;\n\n case WITHDRAWAL:\n this.doWithdrawal();\n return transactionType;\n default:\n return null;\n }\n\n }catch (Exception e){\n ui.displayError(\"Please enter a valid transaction type.\");\n }\n\n }\n\n\n }",
"private void makeTransfer(String withdrawAmt, String depositAcct){\n //assume this will come as numbers only (Keyboard restricted to numbers)\n Double transferAmt = Double.valueOf(withdrawAmt);\n\n //make transfer\n customer.transferFund(currAcctName, depositAcct, transferAmt);\n\n //reset transfer value\n ((EditText)findViewById(R.id.transferAmt)).setText(\"\");\n\n //update balance\n ((TextView) findViewById(R.id.fromAmt)).setText(customer.getBalanceString(currAcctName));\n }",
"TransactionResponseDTO transferTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n\tpublic void processTransaction(Transaction transactionObject) {\n\t\t\n\t\ttrasactionList.addLast(transactionObject);\n\t\t\n\t\tif ( transactionObject.getTransactionType() == 'C'){\n\t\t\t\n\t\t\tbalance -= transactionObject.getTransactionAmount(); \n\t\t\t\n\t\t}\n\t\t\n\t\telse if ( transactionObject.getTransactionType() == 'D'){\n\t\t\t\n\t\t\tbalance += transactionObject.getTransactionAmount(); \n\t\t}\n\t}",
"@Override\n public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable) {\n if (postable instanceof AccountingLine && TemConstants.TRAVEL_ADVANCE_ACCOUNTING_LINE_TYPE_CODE.equals(((AccountingLine)postable).getFinancialDocumentLineTypeCode())) {\n return true; // we're an advance accounting line? then we're debiting...\n }\n return false; // we're not an advance accounting line? then we should return false...\n }",
"@PostMapping(value = \"/transfer\")\n public ResponseEntity<ResponseWrapper> transfer(@RequestBody AccountWrapper accountWrapper) {\n ResponseWrapper wrapper =new ResponseWrapper();\n UserAccount userAccount = userAccountRepository.findByAccountNumber(accountWrapper.getAccountNumber());\n if(Objects.isNull(userAccount)){\n wrapper.setMessage(\"Account With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n if (userAccount.getAmount() < accountWrapper.getAmount()) {\n wrapper.setMessage(\"Amount in your account is less than the amount you want to transfer \");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n //crediting the other user account\n UserAccount userAccount2 = userAccountRepository.findByAccountNumber(accountWrapper.getTransfer_accountNumber());\n if(Objects.isNull(userAccount2)){\n wrapper.setMessage(\"Account To Transfer With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n Float amount = userAccount2.getAmount() + accountWrapper.getAmount();\n userAccount2.setAmount(amount);\n userAccountRepository.save(userAccount2);\n\n //debit the user transferring money\n float amount1 = userAccount.getAmount() - accountWrapper.getAmount();\n userAccount.setAmount(amount1);\n userAccountRepository.save(userAccount);\n\n accountTransactionService.saveTransaction(new AccountTransaction(TRANSFER,accountWrapper.getAccountNumber(),\"Transferring Money\",\n accountWrapper.getAmount(),accountWrapper.getTransfer_accountNumber(),userAccount.getUserID()));\n wrapper.setData(\"Amount transfered successfully\");\n\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }",
"TransactionResponseDTO authorizeTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\t\n\t@Transactional\n\tpublic Boolean transferMoney(TransferDto transferData) throws Exception {\n\t\t\n\t\tUser targetUser = userDao.findByUsername(transferData.getTargetUser().getUsername());\n\t\t\n\t\tBalanceDto balanceData = transferData.getBalance();\n\t\t\n\t\t\n\t\tbalanceData.setType(AccountTransactionType.SUBTRACT);\n\t\t\n\t\taddSubtractBalance(balanceData);\n\t\n\t\tbalanceData.setType(AccountTransactionType.ADD);\n\t\t\n\t\tbalanceData.setAccount(transferData.getTargetAccount());\n\t\t\n\t\t\n\t\taddSubtractBalanceByUser(targetUser, balanceData);\n\t\t\n\t\t\n\t\treturn true;\n\t}",
"public Account doMoneyTransfer(MoneyTransferDTO moneyTransferDTO, Long id) {\n Account origin = accountService.getAccountById(id);\n Account destination = accountService.getAccountById(moneyTransferDTO.getToAccountId());\n\n // check for fraud detection\n //fraudDetectionService.checkMoneyTransfer(origin, moneyTransferDTO);\n fraudDetectionService.checkMoneyTransferV2(origin, moneyTransferDTO);\n\n // check enough funds in origin account\n BigDecimal currentBalance = origin.getBalance().getAmount();\n BigDecimal transferAmount = moneyTransferDTO.getAmount();\n if (transferAmount.compareTo(currentBalance) > 0)\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Amount exceeds balance of the account\");\n\n // check if penalty fee has to be deducted later\n BigDecimal result = currentBalance.subtract(transferAmount);\n boolean applyPenaltyFee =\n currentBalance.compareTo(origin.getMinimumBalance().getAmount()) > 0 &&\n result.compareTo(origin.getMinimumBalance().getAmount()) < 0;\n\n // make the transaction\n Transaction transaction = new Transaction(new Money(transferAmount));\n transaction.setType(Type.MONEY_TRANSFER);\n transaction.setFromAccount(origin);\n transaction.setToAccount(destination);\n //transaction.setAmount(new Money(transferAmount));\n transaction.setAuthorName(moneyTransferDTO.getName());\n transaction.setDescription(moneyTransferDTO.getDescription());\n Transaction newTransaction = transactionService.addTransaction(transaction);\n\n // deduct penalty fee with another transaction if needed\n if (applyPenaltyFee) {\n\n Transaction deductionTransaction = new Transaction(origin.getPenaltyFee());\n transaction.setType(Type.PENALTY_FEE);\n deductionTransaction.setFromAccount(origin);\n //deductionTransaction.setToAccount(null);\n //deductionTransaction.setAmount(origin.getPenaltyFee()); // set amount before accounts\n deductionTransaction.setAuthorName(moneyTransferDTO.getName());\n deductionTransaction.setDescription(\"Penalty fee deduction\");\n transactionService.addTransaction(deductionTransaction);\n }\n\n return accountService.saveAccount(origin);\n }",
"public void debit(int userAccountNumber, double amount) {\r\n getAccount(userAccountNumber).debit(amount);\r\n }",
"TransactionResponseDTO cancelTransaction(TransactionRequestDTO transactionRequestDTO);",
"@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }",
"private void debit(APDU apdu) {\n\n // access authentication\n if ( ! pin.isValidated() )\n ISOException.throwIt\n(SW_PIN_VERIFICATION_REQUIRED);\n\n byte[] buffer = apdu.getBuffer();\n\n byte numBytes =\n (byte)(buffer[ISO7816.OFFSET_LC]);\n\n byte byteRead =\n (byte)(apdu.setIncomingAndReceive());\n\n if ( ( numBytes != 1 ) || (byteRead != 1) )\n ISOException.throwIt\n (ISO7816.SW_WRONG_LENGTH);\n\n // get debit amount\n byte debitAmount =\n buffer[ISO7816.OFFSET_CDATA];\n\n // check debit amount\n if ( ( debitAmount > MAX_TRANSACTION_AMOUNT)\n || ( debitAmount < 0 ) )\n ISOException.throwIt\n (SW_INVALID_TRANSACTION_AMOUNT);\n\n // check the new balance\n if ( (short)( balance - debitAmount ) < (short)0 )\n ISOException.throwIt(SW_NEGATIVE_BALANCE);\n\n balance = (short) (balance - debitAmount);\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT && resultCode == RESULT_OK && data !=\n null) {\n TransactionResponse transactionResponse = data.getParcelableExtra(PayUmoneyFlowManager\n .INTENT_EXTRA_TRANSACTION_RESPONSE);\n\n ResultModel resultModel = data.getParcelableExtra(PayUmoneyFlowManager.ARG_RESULT);\n\n // Check which object is non-null\n if (transactionResponse != null && transactionResponse.getPayuResponse() != null) {\n if (transactionResponse.getTransactionStatus().equals(TransactionResponse.TransactionStatus.SUCCESSFUL)) {\n //Success Transaction\n AddPayment(name, ridequantity, Amount);\n } else {\n Intent intent = new Intent();\n setResult(RESULT_OK, intent);\n finish();\n\n }\n\n // Response from Payumoney\n// String payuResponse = transactionResponse.getPayuResponse();\n//\n//// Response from SURl and FURL\n// String merchantResponse = transactionResponse.getTransactionDetails();\n//\n// new AlertDialog.Builder(this)\n// .setCancelable(false)\n// .setMessage(\"Payu's Data : \" + payuResponse + \"\\n\\n\\n Merchant's Data: \" + merchantResponse)\n// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n// public void onClick(DialogInterface dialog, int whichButton) {\n// dialog.dismiss();\n// }\n// }).show();\n\n } else if (resultModel != null && resultModel.getError() != null) {\n Log.d(TAG, \"Error response : \" + resultModel.getError().getTransactionResponse());\n } else {\n Log.d(TAG, \"Both objects are null!\");\n }\n }\n }",
"public IBankTransfert payment();",
"private void returnDeposit(String paymentInfo) {\n }",
"public boolean requestTransaction(String name,String reason,double amount){\n Transaction t1 = new Transaction(name,reason,amount);\n boolean done=t1.registertransaction();\n \n return done; \n \n}",
"public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }",
"@ModifyTransaction(value = Transactions.RECON)\n\tpublic void modifyReconciliation(IsoBuffer buffer, Data data) {\n\n\t\tbuffer.put(Constants.DE1, \"\");\n\t\tif (buffer.get(Constants.ISO_MSG_TYPE).equals(\n\t\t\t\tConstants.MSG_TYPE_SETTLEMENT)) {\n\t\t\tbuffer.put(Constants.ISO_MSG_TYPE, \"0510\");\n\n\t\t} else if (buffer.get(Constants.ISO_MSG_TYPE).equals(\n\t\t\t\tConstants.MSG_TYPE_ACQ_RECON_ADVICE)) {\n\t\t\tbuffer.put(Constants.ISO_MSG_TYPE, \"0530\");\n\n\t\t} else if (buffer.get(Constants.ISO_MSG_TYPE).equals(\n\t\t\t\tConstants.MSG_TYPE_ACQ_RECON_REPEAT)) {\n\t\t\tbuffer.put(Constants.ISO_MSG_TYPE, \"0530\");\n\n\t\t} else if (buffer.get(Constants.ISO_MSG_TYPE).equals(\n\t\t\t\tConstants.MSG_TYPE_CARD_ISSUER_RECON)) {\n\t\t\tbuffer.put(Constants.ISO_MSG_TYPE, \"0512\");\n\n\t\t} else if (buffer.get(Constants.ISO_MSG_TYPE).equals(\n\t\t\t\tConstants.MSG_TYPE_ISSUER_RECON_ADVICE)) {\n\t\t\tbuffer.put(Constants.ISO_MSG_TYPE, \"0532\");\n\n\t\t} else if (buffer.get(Constants.ISO_MSG_TYPE).equals(\n\t\t\t\tConstants.MSG_TYPE_ISSUER_RECON_REPEAT)) {\n\t\t\tbuffer.put(Constants.ISO_MSG_TYPE, \"0532\");\n\t\t}\n\t\tbuffer.put(Constants.DE66, \"9\"); // Message received but will not be\n\t\t\t\t\t\t\t\t\t\t\t// checked against totals at the\n\t\t\t\t\t\t\t\t\t\t\t// present time. This response code\n\t\t\t\t\t\t\t\t\t\t\t// will always be expected by\n\t\t\t\t\t\t\t\t\t\t\t// BENEFIT, since reconciliation\n\t\t\t\t\t\t\t\t\t\t\t// totals are not validated on-line.\n\n\t\tbuffer.disableField(Constants.DE55);\n\t\tbuffer.disableField(Constants.DE74);\n\t\tbuffer.disableField(Constants.DE75);\n\t\tbuffer.disableField(Constants.DE76);\n\t\tbuffer.disableField(Constants.DE77);\n\t\tbuffer.disableField(Constants.DE78);\n\t\tbuffer.disableField(Constants.DE79);\n\t\tbuffer.disableField(Constants.DE80);\n\t\tbuffer.disableField(Constants.DE81);\n\t\tbuffer.disableField(Constants.DE86);\n\t\tbuffer.disableField(Constants.DE87);\n\t\tbuffer.disableField(Constants.DE88);\n\t\tbuffer.disableField(Constants.DE89);\n\t\tbuffer.disableField(Constants.DE97);\n\t}",
"@Override\n\tpublic boolean debit(Integer id, double amount) {\n\t\tfor(Account account:accountList) {\n\t\t\tif(id.compareTo(account.returnAccountNumber()) == 0 ) {\n\t\t\t\taccount.debit(amount);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }",
"public void subtractCreditTransaction(double withdrawAmount){\n if(!checkAccountOpen()){\n System.out.println(\"Your credit transaction in the amount of -$\" + withdrawAmount +\" has been declined\");\n }\n else {\n this.currentBalance = this.currentBalance - withdrawAmount;\n if(this.currentBalance<0){\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n this.currentBalance = this.currentBalance + withdrawAmount;\n }\n else {\n System.out.println(\"Your credit transaction has been approved!\");\n System.out.println(\"Your current balance is: $\" + currentBalance);\n }\n }\n\n }",
"public void debit(double amountDebit){\n\t\tif(amountDebit < 0)\n\t\t\tthrow new IllegalArgumentException();\n\t\t//Think about throw an exception if you don't allow the inhabitant to have an overdraft ! Here we allow it. \n\t\tthis.money= this.money - amountDebit;\n\t}",
"public void broadCastTransaction(final String mTransaction, int mWallet_id) {\r\n this.mWallet_id = mWallet_id;\r\n try {\r\n mJsonRequest.put(SDKHelper.RAW_TX, mTransaction);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n String mTransactionHistoryUrl = \"\";\r\n if (SDKConstants.WALLET_TYPE== SDKHelper.ZERO){\r\n mTransactionHistoryUrl = SDKHelper.TESTNET_URL_PUSH_TRANSACTION_URL;\r\n }else{\r\n mTransactionHistoryUrl = SDKHelper.MAIN_PUSH_TRANSACTION_URL;\r\n }\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, mTransactionHistoryUrl,\r\n mJsonRequest, responselistner, errorListener) {\r\n /**\r\n * Passing some request headers\r\n * */\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams() throws AuthFailureError {\r\n return super.getParams();\r\n }\r\n\r\n };\r\n SDKControl.getInstance().cancelPendingRequests(new RequestQueue.RequestFilter() {\r\n @Override\r\n public boolean apply(Request<?> request) {\r\n return true;\r\n }\r\n });\r\n SDKControl.getInstance().cancelPendingRequests(SDKHelper.TAG_SEND_TRANS);\r\n jsonObjReq.setRetryPolicy(new DefaultRetryPolicy(SDKHelper.WEBCALL_TIMEOUT, SDKHelper.RETRY_COUNT,\r\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjReq.setShouldCache(false);\r\n // Adding request to request queue\r\n SDKControl.getInstance().addToRequestQueue(jsonObjReq, SDKHelper.TAG_SEND_TRANS);\r\n\r\n }",
"private void transferToBankAccount() {\n ArrayList<Coin> selectedCoins;\n String collection;\n mGoldAmount = 0.0;\n mBankTransferTotal = 0;\n\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n selectedCoins = getSelectedCoins(Data.COLLECTED);\n collection = Data.COLLECTED;\n // Impose 25 coin limit\n if (selectedCoins.size() > (25 - Data.getCollectedTransferred())) {\n displayToast(getString(R.string.msg_25_coin_limit));\n return;\n }\n } else {\n selectedCoins = getSelectedCoins(Data.RECEIVED);\n collection = Data.RECEIVED;\n }\n\n if (selectedCoins.size() == 0) {\n displayToast(getString(R.string.msg_please_select_coins));\n return;\n }\n\n // Transfer selected coins to bank account\n mBankTransferInProgress = true;\n mProgressBar.setVisibility(View.VISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer in progress...\");\n\n for (Coin c : selectedCoins) {\n double value = c.getValue();\n String currency = c.getCurrency();\n double exchange = value * mExchangeRates.get(currency);\n mGoldAmount += exchange;\n Data.removeCoinFromCollection(c, collection, new OnEventListener<String>() {\n\n @Override\n public void onSuccess(String string) {\n mBankTransferTotal++;\n Log.d(TAG, \"[transferToBankAccount] number processed: \" + mBankTransferTotal);\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Get current date\n LocalDateTime now = LocalDateTime.now();\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\n \"yyyy/MM/dd\", Locale.ENGLISH);\n String date = format.format(now);\n\n // Add transaction to firebase\n Transaction transaction = new Transaction(mGoldAmount, date);\n Data.addTransaction(transaction, mBankTransferTotal, collection);\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer complete\");\n displayToast(getString(R.string.msg_transfer_complete));\n }\n }\n\n @Override\n public void onFailure(Exception e) {\n mBankTransferTotal++;\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer failed\");\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n\n } else {\n displayToast(getString(R.string.msg_failed_to_transfer) + c.getCurrency()\n + \" worth \" + c.getValue());\n }\n Log.d(TAG, \"[sendCoins] failed to transfer coin: \" + c.getId());\n }\n });\n }\n }",
"int deposit(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n accountBalance += amount;\n break;\n } else\n return -1;\n }\n // Run the operation to update the balance only for the user's account\n updateAccount(id, accountBalance, account);\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n System.out.println(\"AMOUNT: \" + accountBalance);\n return 1;\n }",
"@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}",
"public static void deposit() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t//Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number:\");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to deposit in cents:\");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt()) amount = Integer.parseInt(Quinterac.s.nextLine());\n\t\t\t\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckDepositValid(accNum, amount);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckDepositValid(accNum, amount);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"abstract void addDepositTransaction(Transaction deposit, Ui ui, String bankType) throws BankException;",
"@Test\n\tpublic void testDeposit() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(04, \"acc1\", 00000, 100.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Deposit Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to deposit money\", testResult);\n\t}",
"public boolean deposit(String accountNumber, double amount) {\r\n\t\tif (!DaoUtility.isAccountNumberValid(accountNumber))\r\n\t\t\treturn false;\r\n\r\n\t\tConnection conn = null;\r\n\r\n\t\ttry {\r\n\t\t\tStatement st;\r\n\t\t\tResultSet rs;\r\n\t\t\tString sql;\r\n\r\n\t\t\tconn = dbConnector.getConnection();\r\n\t\t\tif (conn == null)\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t// atomic operation\r\n\t\t\tst = conn.createStatement();\r\n\r\n\t\t\t// get the aid and old balance\r\n\t\t\tint aid = 0;\r\n\t\t\tdouble oldbalance = 0;\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"select * from tbAccount where acnumber='%s' \",\r\n\t\t\t\t\taccountNumber);\r\n\r\n\t\t\trs = st.executeQuery(sql);\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\taid = rs.getInt(\"aid\");\r\n\t\t\t\toldbalance = rs.getDouble(\"balance\");\r\n\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\r\n\t\t\t\t// If the account is Frozen(isactive=false), then cannot\r\n\t\t\t\t// deposit.\r\n\t\t\t\tif (!isactive) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// ac.balance += amount.\r\n\t\t\t// update tbAccount set balance='new balance' where\r\n\t\t\t// acnumber='acnumber'\r\n\t\t\tdouble newBalance = oldbalance + amount;\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"update tbAccount set balance=%f where acnumber='%s' \",\r\n\t\t\t\t\tnewBalance, accountNumber);\r\n\t\t\tst.addBatch(sql);\r\n\r\n\t\t\t// insert a transaction record\r\n\t\t\t// insert into tbTransaction(aid,trtype,amount,description)\r\n\t\t\t// values( select aid from tbAccount where acnumber='acnumber',\r\n\t\t\t// DEPOSIT_TRANSACTION_TYPE_ID,\r\n\t\t\t// amount, 'deposit 123.4 dollars on 2014-09-19')\r\n\t\t\t//\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\tString currentDate = dateFormat.format(date); // 2014-08-06\r\n\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t+ \" values( %d, \" + \"\t\t\t%d, \"\r\n\t\t\t\t\t\t\t+ \"\t\t\t%f, 'deposit %.2f dollars on %s' ) \", aid,\r\n\t\t\t\t\tDEPOSIT_TRANSACTION_TYPE_ID, amount, amount, currentDate);\r\n\r\n\t\t\tst.addBatch(sql);\r\n\r\n\t\t\t// Execute transaction\r\n\t\t\tint[] nRes = st.executeBatch();\r\n\t\t\tif (nRes[1] > 0)\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"private TransactionRequest initTransactionRequest() {\n TransactionRequest transactionRequestNew = new\n TransactionRequest(System.currentTimeMillis() + \"\", 20000);\n\n //set customer details\n transactionRequestNew.setCustomerDetails(initCustomerDetails());\n\n\n // set item details\n ItemDetails itemDetails = new ItemDetails(\"1\", 20000, 1, \"Trekking Shoes\");\n\n // Add item details into item detail list.\n ArrayList<ItemDetails> itemDetailsArrayList = new ArrayList<>();\n itemDetailsArrayList.add(itemDetails);\n transactionRequestNew.setItemDetails(itemDetailsArrayList);\n\n\n // Create creditcard options for payment\n CreditCard creditCard = new CreditCard();\n\n creditCard.setSaveCard(false); // when using one/two click set to true and if normal set to false\n\n// this methode deprecated use setAuthentication instead\n// creditCard.setSecure(true); // when using one click must be true, for normal and two click (optional)\n\n creditCard.setAuthentication(CreditCard.AUTHENTICATION_TYPE_3DS);\n\n // noted !! : channel migs is needed if bank type is BCA, BRI or MyBank\n// creditCard.setChannel(CreditCard.MIGS); //set channel migs\n creditCard.setBank(BankType.BCA); //set spesific acquiring bank\n\n transactionRequestNew.setCreditCard(creditCard);\n\n return transactionRequestNew;\n }",
"private void credit(APDU apdu) {\n\n // access authentication\n if ( ! pin.isValidated() )\n ISOException.throwIt(\n SW_PIN_VERIFICATION_REQUIRED);\n\n byte[] buffer = apdu.getBuffer();\n\n // Lc byte denotes the number of bytes in the\n // data field of the command APDU\n byte numBytes = buffer[ISO7816.OFFSET_LC];\n\n // indicate that this APDU has incoming data\n // and receive data starting from the offset\n // ISO7816.OFFSET_CDATA following the 5 header\n // bytes.\n byte byteRead =\n (byte)(apdu.setIncomingAndReceive());\n\n // it is an error if the number of data bytes\n // read does not match the number in Lc byte\n if ( ( numBytes != 1 ) || (byteRead != 1) )\n ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);\n\n // get the credit amount\n byte creditAmount =\n buffer[ISO7816.OFFSET_CDATA];\n\n // check the credit amount\n if ( ( creditAmount > MAX_TRANSACTION_AMOUNT)\n || ( creditAmount < 0 ) )\n ISOException.throwIt\n (SW_INVALID_TRANSACTION_AMOUNT);\n\n // check the new balance\n if ( (short)( balance + creditAmount) > MAX_BALANCE )\n ISOException.throwIt\n (SW_EXCEED_MAXIMUM_BALANCE);\n\n // credit the amount\n balance = (short)(balance + creditAmount);\n\n }",
"CarPaymentMethod processCreditCard();",
"@Test\n\tpublic void testChargePinDebitCardWithDeviceInfo() throws Exception {\n\t\tHashMap<String, Object> mapBody = new HashMap<String, Object>();\n\t\tmapBody.put(\"amount\", 1.00);mapBody.put(\"currency\", \"USD\");\n\t\tmapBody.put(\"card\", returnMapCardWithCardPresent());\n\t\t\n\t\tHashMap<String, Object> mapCardContext = new HashMap<String, Object>();\n\t\tmapCardContext.put(\"deviceInfo\", constructMapDeviceInfo());\n\t\tmapBody.put(\"context\", mapCardContext);\n\t\t\n\t\tHttpResponse response = TestUtil.post(CCChargeUrl,\n\t\t\t\tCCChargeHeaderParams, mapBody);\n\t\tHashMap<String, Object> result = validateChargeRes(response, 201, Status.CAPTURED.toString());\n\t}",
"private TransferPointRequest checkTransferRequestEligibility(TransferPointRequest transferPointRequest) {\n Customer fromAccount = transferPointRequest.getFromCustomer();\n\n //get destination account\n Customer toAccount = transferPointRequest.getToCustomer();\n\n //check if account is linked\n transferPointRequest = isAccountLinked(transferPointRequest);\n\n //set request customer no as from account customer no\n transferPointRequest.setRequestorCustomerNo(fromAccount.getCusCustomerNo());\n\n //if accounts are not linked , requestor is eligible for transfer\n if(!transferPointRequest.isAccountLinked()){\n\n //set transfer eligibility to ELIGIBLE\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n\n } else {\n\n //if linked , get the transfer point settings\n TransferPointSetting transferPointSetting = transferPointRequest.getTransferPointSetting();\n\n //check redemption settings\n switch(transferPointSetting.getTpsLinkedEligibilty()){\n\n case TransferPointSettingLinkedEligibity.NO_AUTHORIZATION:\n\n //if authorization is not needed set eligibity to ELIGIBLE\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n\n return transferPointRequest;\n\n case TransferPointSettingLinkedEligibity.PRIMARY_ONLY:\n\n //check the requestor is primary\n if(!transferPointRequest.isCustomerPrimary()){\n\n //if not primary , then set eligibility to INELIGIBLE\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.INELIGIBLE);\n\n } else {\n\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n }\n\n return transferPointRequest;\n\n case TransferPointSettingLinkedEligibity.SECONDARY_WITH_AUTHORIZATION:\n\n //if customer is secondary , set eligibility to APRROVAL_NEEDED and set approver\n //and requestor customer no's\n if(!transferPointRequest.isCustomerPrimary()){\n\n //set eligibility status as approval needed\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.APPROVAL_NEEDED);\n\n //set approver customer no\n transferPointRequest.setApproverCustomerNo(transferPointRequest.getParentCustomerNo());\n\n } else {\n\n //set eligibility to eligible\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.ELIGIBLE);\n\n }\n\n return transferPointRequest;\n\n case TransferPointSettingLinkedEligibity.ANY_ACCOUNT_WITH_AUTHORIZATION:\n\n //set eligibility to approval needed\n transferPointRequest.setEligibilityStatus(RequestEligibilityStatus.APPROVAL_NEEDED);\n\n if(transferPointRequest.isCustomerPrimary()){\n\n //set approver customer no\n transferPointRequest.setApproverCustomerNo(transferPointRequest.getChildCustomerNo());\n\n } else {\n\n //set approver customer no\n transferPointRequest.setApproverCustomerNo(transferPointRequest.getParentCustomerNo());\n\n }\n\n return transferPointRequest;\n\n }\n }\n\n return transferPointRequest;\n\n }",
"@Override\n public boolean depositAmount(TransactionDTO transaction) {\n if(transaction.getAmount()>0){\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n customerDetails.setAccountBalance(customerDetails.getAccountBalance()+transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }else{\n return false;\n }\n }",
"public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}",
"public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }",
"public void setTransactionType(int transactionChoice);",
"public boolean withdraw(CashTransaction transaction)throws IOException {\n if (transaction.getAmount() % 5 != 0)\n {\n JOptionPane.showMessageDialog(null, \"Invalid input\");\n return false;\n }\n\n HashMap<Integer, Integer> billsRetrieved = obtainBills(transaction.getAmount()*-1);\n if (billsRetrieved == null)\n {\n checkAmount();\n return false;\n }\n if (transaction.parse())\n {\n for (int denomination: billsRetrieved.keySet())\n {\n typeOfCash.put(denomination, typeOfCash.get(denomination) - billsRetrieved.get(denomination));\n }\n checkAmount();\n return true;\n }\n return false;\n }",
"public static void transfer() {\n\t\ttry {\n\t\t\tif (!LoginMgr.isLoggedIn()) {\n\t\t\t\tthrow new NotLoggedInException();\n\t\t\t}\n\n\t\t\t// Scanner s = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter account number to transfer to: \");\n\t\t\tString accNum = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNum = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNum)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter account number to transfer from: \");\n\t\t\tString accNumB = \"\";\n\t\t\tif (Quinterac.s.hasNextLine())\n\t\t\t\taccNumB = Quinterac.s.nextLine();\n\n\t\t\tif (!ValidAccListMgr.checkAccNumExist(accNumB)) {\n\t\t\t\tSystem.out.println(\"Please enter a valid account number\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter the amount of money to transfer in cents: \");\n\t\t\tint amount = 0;\n\t\t\tif (Quinterac.s.hasNextInt())\n\t\t\t\tamount = Integer.parseInt(Quinterac.s.nextLine());\n\n\t\t\tString modeName = LoginMgr.checkMode();\n\t\t\tif (modeName.equals(\"machine\")) {\n\t\t\t\tatmCheckTransferValid(accNum, amount, accNumB);\n\t\t\t} else if (modeName.equals(\"agent\")) {\n\t\t\t\tagentCheckTransferValid(accNum, amount, accNumB);\n\t\t\t}\n\n\t\t} catch (NotLoggedInException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"private void pay(){\n //Calculating the new balance\n Integer value = Integer.parseInt(this.txtAmount.getText().toString());\n int result = this.balance - value;\n //The intent to be passed back.\n Intent data = new Intent(TransferActivity.this, MainActivity.class);\n //The bundle to be put into the intent.\n Bundle bundle = new Bundle();\n //Gets time of transaction\n Calendar cal = Calendar.getInstance();\n Date date = cal.getTime();\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n String formattedDate = dateFormat.format(date);\n //Fills bundle the needed data\n bundle.putInt(MainActivity.PARAM_INT_NAME, result);\n bundle.putString(MainActivity.PARAM_STRING_NAME, this.chosenName);\n bundle.putString(MainActivity.PARAM_DATE_NAME, formattedDate);\n data.replaceExtras(bundle);\n //Sets result and ends activity\n setResult(Activity.RESULT_OK, data);\n finish();\n }",
"@Override\n public TransactionModel createTransaction(String custId, LocalDateTime transactionTime, String accountNumber, TransactionType type, BigDecimal amount,String description)\n {\n return transactionDao.createTransaction(custId,accountNumber,transactionTime,type,amount,description);\n }",
"public void testOneDeposit(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Host sends the teller a new account for the incoming customer\n\t\tteller.msgHereIsAccount(new BankAccount(deposit,0));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\tdeposit.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to deposit 100 dollars, instead it is for \" + teller.pendingTransactions.get(deposit), \n\t\t\t\t100.0, teller.pendingTransactions.get(deposit));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 0.0 dollars, leaving bank.\\\", instead it reads: \" + deposit.log.getLastLoggedEvent().toString(),\n\t\t\t\tdeposit.log.containsString(\"Got 0.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 100.0, instead it has \" + teller.accountsListed.get(0).getBalance(), 100.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}",
"private TransferPointRequest processTransferApproval(TransferPointRequest transferPointRequest) throws InspireNetzException {\n Customer requestor = transferPointRequest.getFromCustomer();\n\n Customer approver = customerService.findByCusCustomerNo(transferPointRequest.getApproverCustomerNo());\n\n //if a new request , send approval request and save request\n if(transferPointRequest.getPtrId() == null || transferPointRequest.getPtrId() == 0){\n\n // Log the information\n log.info(\"transferPoints -> New request for point transfer received(Approval needed)\");\n\n //add a new transfer point request\n transferPointRequest = addTransferPointRequest(transferPointRequest);\n\n log.info(\"transferPoints: Sending approval request to approver\");\n\n //send approval request to approver\n partyApprovalService.sendApproval(requestor,approver,transferPointRequest.getPtrId(),PartyApprovalType.PARTY_APPROVAL_TRANSFER_POINT_REQUEST,transferPointRequest.getToLoyaltyId(),transferPointRequest.getRewardQty()+\"\");\n\n //set transfer allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n } else {\n\n //CHECK whether approver has accepted the request\n boolean isTransferAllowed = isPartyApprovedTransfer(transferPointRequest);\n\n if(isTransferAllowed){\n\n log.info(\"transferPoints : Transfer is approved by the linked account\");\n\n //set redemption allowed to true\n transferPointRequest.setTransferAllowed(true);\n\n } else {\n\n log.info(\"transferPoints : Transfer request rejected by linked account\");\n\n //set redemption allowed to false\n transferPointRequest.setTransferAllowed(false);\n\n\n }\n }\n\n return transferPointRequest;\n }",
"public void testOneWithdrawal(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Teller has an account for this customer already \n\t\tteller.accountsListed.add(new BankAccount(withdraw,100));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 100, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t100.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\twithdraw.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to withdraw 100 dollars, instead it is for \" + teller.pendingTransactions.get(withdraw), \n\t\t\t\t-100.0, teller.pendingTransactions.get(withdraw));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 100.0 dollars, leaving bank.\\\", instead it reads: \" + withdraw.log.getLastLoggedEvent().toString(),\n\t\t\t\twithdraw.log.containsString(\"Got 100.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 0.0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}",
"@Test\n\tpublic void testChargePinDebitCardWithoutAmount() throws Exception {\n\t\tHashMap<String, Object> mapBody = new HashMap<String, Object>();\n\t\tmapBody.put(\"amount\", \"\");mapBody.put(\"currency\", \"USD\");\n\t\tmapBody.put(\"card\", returnMapCardWithCardPresent());\n\t\t\n\t\tHttpResponse chargeResponse = TestUtil.post(CCChargeUrl,\n\t\t\t\tCCChargeHeaderParams, mapBody);\n\t\tvalidateErrorRes(chargeResponse, 400, \"invalid_request\", \"PMT-4000\", \"Amount. is invalid.\", \"Amount.\", \"https://developer.intuit.com/v2/docs?redirectID=PayErrors\");\n\t}",
"@Test\n\tpublic void createAccountDebtsTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnDebt.setSelected(true);\n\t\tdata.setRdbtnDebt(rdbtnDebt);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.DEBITS.getAccountType());\n\t\tassertEquals(accountTest, account);\n\t}",
"public boolean deposit(long id, String password, String currency, double amount);",
"public static boolean accountDebitIsPos(String accountType) throws Exception {\n System.String __dummyScrutVar0 = accountType;\n //asset\n if (__dummyScrutVar0.equals(\"0\") || __dummyScrutVar0.equals(\"4\"))\n {\n return true;\n }\n else //expense\n //liability\n //equity //because liabilities and equity are treated the same\n if (__dummyScrutVar0.equals(\"1\") || __dummyScrutVar0.equals(\"2\") || __dummyScrutVar0.equals(\"3\"))\n {\n return false;\n }\n \n return true;\n }",
"public void execute() {\r\n int depositAmount = this.promptDepositAmount(); // amount in cents\r\n if (depositAmount != CANCELED) {\r\n screen.displayMessage(\"\\nPlease insert a deposit envelope containing: \");\r\n screen.displayDollarAmount(depositAmount / 100);\r\n screen.displayMessageLine(\".\");\r\n\r\n if (depositSlot.isEnvelopeReceived()) {\r\n screen.displayMessageLine(\"\\nYour envelope has been received.\");\r\n screen.displayMessageLine(\"The money just deposited will not be available until we verify \" +\r\n \"the amount of any enclosed cash and your checks clear.\");\r\n bankDatabase.credit(this.accountNumber, depositAmount / 100);\r\n } else {\r\n screen.displayMessageLine (\"\\nYou did not insert an envelope. The ATM has canceled your transaction.\");\r\n }\r\n } else {\r\n screen.displayMessageLine( \"\\nCanceling transaction...\");\r\n }\r\n }",
"@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }",
"private void handleTransaction() throws Exception {\r\n\t\tString receiver;\r\n\t\tString amount;\r\n\t\tMessage sendTransaction = new Message().addData(\"task\", \"transaction\").addData(\"message\", \"do_transaction\");\r\n\t\tMessage response;\r\n\r\n\t\tthis.connectionData.getTerminal().write(\"enter receiver\");\r\n\t\treceiver = this.connectionData.getTerminal().read();\r\n\r\n\t\t// tries until a amount is typed that's between 1 and 10 (inclusive)\r\n\t\tdo {\r\n\t\t\tthis.connectionData.getTerminal().write(\"enter amount (1-10)\");\r\n\t\t\tamount = this.connectionData.getTerminal().read();\r\n\t\t} while (!amount.matches(\"[0-9]|10\"));\r\n\r\n\t\t// does the transaction\r\n\t\tsendTransaction.addData(\"receiver\", this.connectionData.getAes().encode(receiver)).addData(\"amount\",\r\n\t\t\t\tthis.connectionData.getAes().encode(amount));\r\n\r\n\t\tthis.connectionData.getConnection().write(sendTransaction);\r\n\r\n\t\tresponse = this.connectionData.getConnection().read();\r\n\t\tif (response.getData(\"message\").equals(\"success\")) {\r\n\t\t\tthis.connectionData.getTerminal().write(\"transaction done\");\r\n\t\t} else {\r\n\t\t\tthis.connectionData.getTerminal().write(\"transaction failed. entered correct username?\");\r\n\t\t}\r\n\t}",
"@Transactional(\"transactionManager\")\r\n\tpublic String checkOut(Bank bank,Transactions transaction,String parm[]) {\r\n\r\n\r\n\r\n\t\t//Time check\r\n\t\tString paymode;\r\n\r\n\t\tdouble amount;\r\n\r\n\t\tif(transaction==null)\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NOT_FOUND,ErrorConstants.STR_TRANSACTION_NOT_FOUND);\r\n\r\n\t\tif(!transaction.getStatus().equals(OrderState.INITIATED))\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_ALREADY_PROCESSED,ErrorConstants.STR_TRANSACTION_ALREADY_PROCESSED);\r\n\r\n\t\tArrayList<String> output = new ArrayList<String>();\r\n\t\ttransaction.setBank_activity_time(new Date());\r\n\t\ttransaction.setReference_id(parm[1]);\r\n\t\ttransaction.setTransaction_status(parm[2]);\r\n\t\tamount = Double.parseDouble(parm[3]);\r\n\t\ttransaction.setTransaction_amount(Double.parseDouble(parm[3]));\r\n\t\tpaymode = parm[4];\r\n\t\ttransaction.setTransaction_currency(parm[4]);\r\n\t\ttransaction.setTransaction_paymode(parm[5]);\r\n\t\ttransaction.setTransaction_other_details(parm[6]);\r\n\t\ttransaction.setTransaction_status_description(parm[7]);\r\n\r\n\t\ttransaction.setMerchant_reconcilation_status(\"Underprocess\");\r\n\t\t//Reconcilation status\r\n\r\n\r\n\t\t//Calculation of Bank amount vcod amount merchant amount etc .. Demo\r\n\t\tMerchant merchant = transaction.getMerchant();\r\n\t\tMerchantContract merchantContract = orderDao.getMerchantContract(merchant, transaction.getTransaction_paymode());\r\n\t\tBankContract bankContract = orderDao.getBankContract(bank, transaction.getTransaction_paymode());\r\n\t\tif(merchantContract==null||bankContract==null) //Change the logic Exceptions !\r\n\t\t\tthrow new CustomDataException(ErrorConstants.TRANSACTION_NO_CONTRACT_FOUND,ErrorConstants.STR_TRANSACTION_NO_CONTRACT_FOUND);\r\n\t\ttransaction.setBank_amount((amount*(bankContract.getRate()))/100);\r\n\t\ttransaction.setVcod_amount((amount*(merchantContract.getRate()))/100);\r\n\t\ttransaction.setMerchantcontract(merchantContract);\r\n\t\ttransaction.setBankcontract(bankContract);\r\n\t\t//Computed on merchant reconiclaition\r\n\t\ttransaction.setMerchant_reconcilation_amount(transaction.getTransaction_amount()-transaction.getBank_amount()-transaction.getVcod_amount());\r\n\r\n\t\t//Completion of order etc ie:update\r\n\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS)||transaction.getTransaction_status().equals(OrderState.FAIL))\r\n\t\t{\r\n\t\t\tif(transaction.getTransaction_status().equals(OrderState.SUCCESS))\r\n\t\t\t{\r\n\t\t\t\ttransaction.setStatus(OrderState.SUCCESS);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\ttransaction.setStatus(OrderState.FAIL);\r\n\t\t}\r\n\r\n\t\torderDao.updateTransactions(transaction);\r\n\r\n\t\tlog.info(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.debug(\"Transaction id : \"+transaction.getTransaction_id());\r\n\t\tlog.info(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.debug(\"Transaction amount : \"+transaction.getTransaction_amount());\r\n\t\tlog.info(\"Bank activity Time : \"+transaction.getBank_activity_time());\r\n\t\tlog.debug(\"Bank activity Time: \"+transaction.getBank_activity_time());\r\n\t\tlog.info(\"Status : \"+transaction.getTransaction_status());\r\n\t\tlog.debug(\"Status \"+transaction.getTransaction_status());\r\n\r\n\t\t//In addition to this we may give some parameters from orders table\r\n\r\n\t\toutput.add(transaction.getMerchant_order_id()); //merchant order id\r\n\t\toutput.add(Integer.toString(transaction.getTransaction_id())); //out transaction id\r\n\t\toutput.add(transaction.getStatus()); //status\r\n\t\toutput.add(Double.toString(transaction.getTransaction_amount())); //Amount\r\n\t\toutput.add(transaction.getTransaction_currency()); // currency\r\n\t\toutput.add(transaction.getTransaction_paymode()); // Paymode\r\n\t\toutput.add(transaction.getTransaction_other_details()); // Other Details\r\n\t\toutput.add(transaction.getTransaction_status_description()); // Reason\r\n\r\n\t\tArrayList<String> outputParamList = output;\r\n\t\t//Encryption \r\n\t\ttry {\r\n\t\t\treturn Library.getParamterInString(outputParamList, merchant.getSecret_key());\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CustomApplicationException(ErrorConstants.INTERNAL_ERROR,ErrorConstants.STR_INTERNAL_ERROR);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic boolean transferAmnt(int toAccNo, double money)\r\n\t\t\tthrows EwalletException {\n\t\tAccount ftTemp =new Account();\r\n\t\tif(temp.getCustBal()>=money) {\r\n\t\tftTemp = dao.loginuser(toAccNo);\r\n\t\tif(ftTemp!=null)\r\n\t\t{\r\n\t\t\tftTemp.setCustBal(ftTemp.getCustBal()+money);\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Transfered :\"+money+\" To Acc No: \"+ftTemp.getAccNum()+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\tftTemp.settDetails(\"Date :\"+tDate+\" Depsoited Amount :\"+money+\" From Acc No: \"+temp.getAccNum()+\" Total Balance :\"+ftTemp.getCustBal());\r\n\t\t\tdao.updatedetails(temp.getAccNum(), temp);\r\n\t\t\tdao.updatedetails(ftTemp.getAccNum(), ftTemp);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\telse if(temp.getCustBal()<money)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Low Balance to transfer\");\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tSystem.out.println(\"No such user account\");\r\n\t\treturn false;\r\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString action = request.getParameter(\"action\");\n\t\t/*\n\t\t * add Account method to add account as saving or current\n\t\t * \n\t\t */\n\n\t\tif (action.equalsIgnoreCase(\"submit2\")) {\n\t\t\tint CustomerId = Integer.parseInt(request.getParameter(\"cid\"));\n\t\t\tString AccountType = request.getParameter(\"at\");\n\t\n\t\t\tdouble DepositAmount = Double.parseDouble(request.getParameter(\"damount\"));\n\t\t\tAccount acc = new Account();\n\t\t\tacc.setCustomerId(CustomerId);\n\t\t\tacc.setAccountType(AccountType);\n\t\t\tacc.setDepositAmount(DepositAmount);\n\t\t\tlog.info(\"Adding account for Customer Id: \" + CustomerId);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tboolean b = service.createAccount(acc);\n\t\t\t\tif (b) {\n\t\t\t\t\tlog.info(\"Account of\" + CustomerId+\"Added To DataBase\");\n\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/AddAccountSuccessPage.jsp\");\n\t\t\t\t\trs.forward(request, response);\n\t\t\t\t} else {\n\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/AddAccountErrorPage.jsp\");\n\t\t\t\t\trs.forward(request, response);\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.error(e);\n\t\t\t\trequest.getRequestDispatcher(\"jsp/AccountIdDoesNotExistsPage.jsp\").forward(request, response);\n\t\t\t}\n\n\t\t}\n\n\t\telse if (action.equalsIgnoreCase(\"transferComplete\")) {\n\t\t\tboolean b;\n\t\t\tboolean c;\n\t\t\tboolean a;\n\t\t\tboolean d;\n\t\t\tdouble tamount = Double.parseDouble(request.getParameter(\"tamount\"));\n\n\t\t\tint SourceAccountID = Integer.parseInt(request.getParameter(\"SourceAccountID\"));\n\n\t\t\tint TargetAccountID = Integer.parseInt(request.getParameter(\"TargetAccountID\"));\n\t\t\tdouble SourceLatestBalance = Double.parseDouble(request.getParameter(\"SourceLatestBalance\"));\n\t\t\tdouble TargetLatestBalance = Double.parseDouble(request.getParameter(\"TargetLatestBalance\"));\n\t\t\tService ser = FactoryService.getService();\n\t\t\tif (SourceLatestBalance > 0) {\n\t\t\t\tlog.info(\"Transfer of amount is Successfull\");\n\t\t\t\ttry {\n\t\t\t\t\tb = ser.updatebalance(SourceLatestBalance, SourceAccountID);\n\t\t\t\t\ta = ser.updatebalance(TargetLatestBalance, TargetAccountID);\n\t\t\t\t\tc = ser.updatetransaction(SourceAccountID, tamount);\n\t\t\t\t\td = ser.updatetranscationtarget(TargetAccountID, tamount);\n\n\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/CashierTransferSuccess.jsp\");\n\t\t\t\t\trs.forward(request, response);\n\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tlog.error(e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/CashierTransferError.jsp\");\n\t\t\t\trs.forward(request, response);\n\t\t\t}\n\n\t\t} else if (action.equalsIgnoreCase(\"transeferamount\")) {\n\t\t\tdouble tamount = Double.parseDouble(request.getParameter(\"TransferAmount\"));\n\t\t\tint srcaccountid = Integer.parseInt(request.getParameter(\"SourceAccountID\"));\n\t\t\tint trgaccountid = Integer.parseInt(request.getParameter(\"TargetAccountID\"));\n\t\t\tlog.info(\"Transferring amount from \"+srcaccountid+\" to \"+trgaccountid);\n\t\t\tif (srcaccountid != trgaccountid) {\n\t\t\t\tService ser = FactoryService.getService();\n\t\t\t\ttry {\n\t\t\t\t\tboolean b = ser.check(srcaccountid, trgaccountid);\n\t\t\t\t\tif (b) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tAccount sourceacc = ser.informationsource(srcaccountid);\n\t\t\t\t\t\tAccount targetacc = ser.informationsource(trgaccountid);\n\t\t\t\t\t\tdouble sourcebal = ser.sourcebalance(tamount, srcaccountid);\n\t\t\t\t\t\tdouble targetbal = ser.targetbalance(tamount, trgaccountid);\n\t\t\t\t\t\tString sourcename = ser.sourcename(srcaccountid);\n\t\t\t\t\t\tString targetname = ser.sourcename(trgaccountid);\n\t\t\t\t\t\trequest.setAttribute(\"sourcename\", sourcename);\n\t\t\t\t\t\trequest.setAttribute(\"tamount\", tamount);\n\t\t\t\t\t\trequest.setAttribute(\"targetname\", targetname);\n\t\t\t\t\t\trequest.setAttribute(\"sourceacc\", sourceacc);\n\t\t\t\t\t\trequest.setAttribute(\"targetacc\", targetacc);\n\t\t\t\t\t\trequest.setAttribute(\"sourcebal\", sourcebal);\n\t\t\t\t\t\trequest.setAttribute(\"targetbal\", targetbal);\n\t\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/CashierTransferOutput.jsp\");\n\t\t\t\t\t\trs.forward(request, response);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/SrcTrgAccountIdNotExists.jsp\");\n\t\t\t\t\t\trs.forward(request, response);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tlog.error(e);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"sameId\", \"SourceId and TargetId Cant Be same\");\n\t\t\t\trequest.getRequestDispatcher(\"jsp/CashierTransferInput.jsp\").forward(request, response);\n\t\t\t}\n\t\t}\n\t}",
"@Post(uri = \"/{accountId}/deposits\", consumes = MediaType.APPLICATION_JSON)\n @Operation(summary = \"Creates deposit\")\n void create(@Parameter(description = \"Account ID\") BigInteger accountId,\n @Parameter(description = \"Deposit model\") BalanceChangeRequest balanceChangeRequest);",
"private int doComp() {\n\t\tDbTime totalTime = pubService.getDbTime();\n\t\tString beginDate = \"\";\n\t\tString endDate = pubService.getTotalDateStr();\n\t\tString yesterdayStr = pubService.getYesterdayStr();\n\t\t\n\t\tReBankAccept reBankAccept = new ReBankAccept();\n\t\treBankAccept.setOrgId(1);\n\t\treBankAccept.setCheckType(\"N\");\n\t\tList<ReBankAccept> reBankAcceptList= sqlSessionTemplate.selectList(\"com.tmount.db.order.dao.ReBankAcceptMapper.selectBySelective\",reBankAccept);\n\t\tSystem.out.println(\"...records...\"+reBankAcceptList.size()+\"...\");\n\t\tfor(ReBankAccept aReBankAccept:reBankAcceptList){\n\t\t\t\n\t\t\tString billOrder = aReBankAccept.getBankAccept()+\"\";\n\t\t\tDate payTime = aReBankAccept.getPayTime();\n\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\t\tgc.setTime(payTime); \n\t\t\tString payDate=df.format(gc.getTime());\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"payDate = \"+ payDate);\n\t\t\tSystem.out.println(\"billOrder = \"+ billOrder);\n\t\t\t\n\t\t\tStringBuffer strbuf = new StringBuffer();\n\t\t\tiRet = settle.QuerySingleOrder(payDate,billOrder,strbuf);\n\t\t\tif (iRet == 0)\n\t\t\t{\n\t\t\t\t//System.out.println(strbuf);\n\t\t\t\tString[] strArr = strbuf.toString().split(\"\\n\");\n\t\t\t\tif(strArr.length!=4){\n\t\t\t\t\tSystem.out.println(\"...strbuf format error...\");\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tString billData = strArr[0];//交易日期\n\t\t\t\tString dealData = strArr[1];//处理日期\n\t\t\t\tString orderStatus = strArr[2];//定单状态 0-已结帐,1-已撤销,2-部分结帐,3-退款,4-未结帐,5-无效状态,6-未知状态\n\t\t\t\tString strAmount = strArr[3];//定单金额\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"billData:[\"+billData+\"]\");\n\t\t\t\tSystem.out.println(\"dealData:[\"+dealData+\"]\");\n\t\t\t\tSystem.out.println(\"orderStatus:[\"+orderStatus+\"]\");\n\t\t\t\tSystem.out.println(\"strAmount:[\"+strAmount+\"]\");\n\t\t\t\t\n\t\t\t\tif(\"0\".equals(orderStatus)){\n\t\t\t\t\tif(\"Y\".equals(aReBankAccept.getPayType())){//已经是支付状态\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tint payCount = sqlSessionTemplate.selectOne(\"com.tmount.db.order.dao.ReBankOrderAcceptMapper.countPayStatusByBankAccept\",aReBankAccept.getBankAccept());\n\t\t\t\t\t\tif(payCount>0){//银行流水对应的商城订单有支付完成的\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{//银行流水对应的商城订单没有支付完成的,对该未结账订单进行 支付(商城的支付服务逻辑)、结账\n\t\t\t\t\t\t\tOrderService orderservice = new OrderService();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlong payId = 0;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tpayId = orderService.userBankOrderPay(aReBankAccept.getBankAccept(),1,\"通过对账程序对本地的订单进行缴费\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"@:***payId***[\"+payId+\"]\");\n\t\t\t\t\t\t\t} catch (ShopBusiException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t} catch (ShopParamException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//此处调用封装支付服务的函数,并将函数返回值赋给payId\n\t\t\t\t\t\t\taReBankAccept.setPayType(\"Y\");\n\t\t\t\t\t\t\taReBankAccept.setPayCommitTime(pubService.getDbTime().getDbTime());\n\t\t\t\t\t\t\taReBankAccept.setPayId(payId);\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\taReBankAccept.setCheckType(\"Y\");\t\n\t\t\t\t\tsqlSessionTemplate.update(\"com.tmount.db.order.dao.ReBankAcceptMapper.updateByPrimaryKeySelective\", aReBankAccept);\n\t\t\t\t\t\n\t\t\t\t\t//入银行结算表 对账成功写结算表\n\t\t\t\t\tBkBankChangeAccept bkBankChangeAccept = new BkBankChangeAccept();\n\t\t\t\t\tbkBankChangeAccept.setBankAccept(aReBankAccept.getBankAccept());\n\t\t\t\t\tbkBankChangeAccept.setOrgId(aReBankAccept.getOrgId());\n\t\t\t\t\tbkBankChangeAccept.setPrice(aReBankAccept.getPrice());\n\t\t\t\t\tbkBankChangeAccept.setPayTime(aReBankAccept.getPayTime());\n\t\t\t\t\tbkBankChangeAccept.setPayId(aReBankAccept.getPayId());\n\t\t\t\t\tsqlSessionTemplate.insert(\"com.tmount.db.order.dao.BkBankChangeAcceptMapper.insertSelective\",bkBankChangeAccept);\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"...iRet...\"+iRet);\n\t\t\t\tSystem.out.println(settle.GetLastErr(iRet));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"...totalTime.getDbTime().getHours()...\"+totalTime.getDbTime().getHours());\n\t\t\t\tSystem.out.println(\"...Long.parseLong(payDate)...\"+Long.parseLong(payDate));\n\t\t\t\tSystem.out.println(\"...Long.parseLong(pubService.getYesterdayStr())...\"+Long.parseLong(pubService.getYesterdayStr()));\n\t\t\t\t//招商银行订单的有效期是到第二天的1点(这里防止有遗漏,设置到两点之后失效)\n\t\t\t\tif(totalTime.getDbTime().getHours()>1&&Long.parseLong(payDate)<= Long.parseLong(pubService.getYesterdayStr())){\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tmoveHis(aReBankAccept);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn 0;\n\t}",
"interface Transaction {\n int BALANCE = 500;\n //Storing Balance\n Object transaction(Object input);\n}",
"public void deposit(String accountType, double amount) {\r\n\t\tif(accountType.equals(\"savings\")) {\r\n\t\t\tthis.savingsBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse if(accountType.equals(\"checking\")) {\r\n\t\t\tthis.checkingBalance += amount;\r\n\t\t\ttotalAmount += amount;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Deposit failed\");\r\n\t\t}\r\n\t}",
"public int TransBroBuy(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\t\tjava.util.Date d=new java.util.Date();\r\n\t\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\t\tString sdate=sd.format(d);\r\n\t\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\t\tif(rs1.next()==true)\r\n\t\t{\r\n\t\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'purchase','broker',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t\t}\r\n\t\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\t\tif(rss.next()==true)\r\n\t\t{\r\n\t\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share+\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint k=DbConnect.getStatement().executeUpdate(\"insert into FINALALLOCATION values(\"+userid+\",\"+compid+\",\"+newbalance+\")\");\r\n\t\t}\r\n\t\treturn 1;\r\n\t}",
"public int TransBuy(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\tjava.util.Date d=new java.util.Date();\r\n\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\tString sdate=sd.format(d);\r\n\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='purchase' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\tif(rs1.next()==true)\r\n\t{\r\n\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='purchase' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'purchase','self',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t}\r\n\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\tif(rss.next()==true)\r\n\t{\r\n\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share+\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint k=DbConnect.getStatement().executeUpdate(\"insert into FINALALLOCATION values(\"+userid+\",\"+compid+\",\"+newbalance+\")\");\r\n\t}\r\n\treturn 1;\r\n}",
"boolean deposit(UUID name, double amount);",
"@Override\n\tpublic ResponseEntity<?> post(@RequestBody Deposit data) {\n\t\tdata.setCategory(service.category.get(data.getCategory_id()).orElse(null));\n\t\tdata.setBankAccount(service.bank.get(data.getBank_account_id()).orElse(null));\n\t\treturn ResponseEntity.ok(service.deposit.post(data));\n\t}",
"public void transferFunds(BankAccount account1, BankAccount account2, double amount){\n if(account1.checkAccountOpen()&&account2.checkAccountOpen()){\n if((account1.getCurrentBalance()-amount)>0) {\n if (isSameAccount(account1, account2)) {\n account1.subtractCreditTransaction(amount);\n account2.addDebitTransaction(amount);\n } else {\n System.out.println(\"This transaction could not be processed. BankAccount owners are not the same.\");\n }\n }\n else {\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n }\n\n\n }\n }",
"public void applyTransaction(Transaction tx, byte[] coinbase) {\n\t\tif (blockchain != null)\n\t\t\tblockchain.addWalletTransaction(tx);\n\n\t\t// TODO: what is going on with simple wallet transfer ?\n\n\t\t// 1. VALIDATE THE NONCE\n\t\tbyte[] senderAddress = tx.getSender();\n\n\t\tAccountState senderAccount = repository.getAccountState(senderAddress);\n\n\t\tif (senderAccount == null) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"No such address: {}\",\n\t\t\t\t\t\tHex.toHexString(senderAddress));\n\t\t\treturn;\n\t\t}\n\n\t\tBigInteger nonce = repository.getNonce(senderAddress);\n\t\tif (nonce.compareTo(new BigInteger(tx.getNonce())) != 0) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"Invalid nonce account.nonce={} tx.nonce={}\",\n\t\t\t\t\t\tnonce.longValue(), new BigInteger(tx.getNonce()));\n\t\t\treturn;\n\t\t}\n\n\t\t// 2.1 PERFORM THE GAS VALUE TX\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\n\t\t// first of all debit the gas from the issuer\n\t\tBigInteger gasDebit = tx.getTotalGasValueDebit();\n\n\t\t// The coinbase get the gas cost\n\t\trepository.addBalance(coinbase, gasDebit);\n\n\t\tbyte[] contractAddress;\n\n\t\t// Contract creation or existing Contract call\n\t\tif (tx.isContractCreation()) {\n\n\t\t\t// credit the receiver\n\t\t\tcontractAddress = tx.getContractAddress();\n\t\t\trepository.createAccount(contractAddress);\n\t\t\tstateLogger.info(\"New contract created address={}\",\n\t\t\t\t\tHex.toHexString(contractAddress));\n\t\t} else {\n\n\t\t\tcontractAddress = tx.getReceiveAddress();\n\t\t\tAccountState receiverState = repository.getAccountState(tx\n\t\t\t\t\t.getReceiveAddress());\n\n\t\t\tif (receiverState == null) {\n\t\t\t\trepository.createAccount(tx.getReceiveAddress());\n\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\tstateLogger.info(\"New account created address={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\t\t\t}\n\t\t}\n\n\t\t// 2.2 UPDATE THE NONCE\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\t\tBigInteger balance = repository.getBalance(senderAddress);\n\t\tif (balance.compareTo(BigInteger.ZERO) == 1) {\n\t\t\trepository.increaseNonce(senderAddress);\n\n\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\tstateLogger.info(\n\t\t\t\t\t\t\"Before contract execution the sender address debit with gas total cost, \"\n\t\t\t\t\t\t\t\t+ \"\\n sender={} \\n gas_debit= {}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()), gasDebit);\n\t\t}\n\n\t\t// actual gas value debit from the sender\n\t\t// the purchase gas will be available for the\n\t\t// contract in the execution state, and\n\t\t// can be validate using GAS op\n\t\tif (gasDebit.signum() == 1) {\n\t\t\tif (balance.compareTo(gasDebit) == -1) {\n\t\t\t\tlogger.info(\"No gas to start the execution: sender={}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trepository.addBalance(senderAddress, gasDebit.negate());\n\t\t}\n\n\t\t// 3. START TRACKING FOR REVERT CHANGES OPTION !!!\n\t\tRepository trackRepository = repository.getTrack();\n\t\ttrackRepository.startTracking();\n\n\t\ttry {\n\n\t\t\t// 4. THE SIMPLE VALUE/BALANCE CHANGE\n\t\t\tif (tx.getValue() != null) {\n\n\t\t\t\tBigInteger senderBalance = repository.getBalance(senderAddress);\n\t\t\t\tBigInteger contractBalance = repository.getBalance(contractAddress);\n\n\t\t\t\tif (senderBalance.compareTo(new BigInteger(1, tx.getValue())) >= 0) {\n\n\t\t\t\t\trepository.addBalance(contractAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()));\n\t\t\t\t\trepository.addBalance(senderAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()).negate());\n\n\t\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\t\tstateLogger.info(\"Update value balance \\n \"\n\t\t\t\t\t\t\t\t+ \"sender={}, receiver={}, value={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(senderAddress),\n\t\t\t\t\t\t\t\tHex.toHexString(contractAddress),\n\t\t\t\t\t\t\t\tnew BigInteger(tx.getValue()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 3. FIND OUT WHAT IS THE TRANSACTION TYPE\n\t\t\tif (tx.isContractCreation()) {\n\n\t\t\t\tbyte[] initCode = tx.getData();\n\n\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\tlogger.info(\"running the init for contract: addres={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getContractAddress()));\n\n\t\t\t\tVM vm = new VM();\n\t\t\t\tProgram program = new Program(initCode, programInvoke);\n\t\t\t\tvm.play(program);\n\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\tsenderAddress, tx.getContractAddress(), coinbase);\n\n\t\t\t} else {\n\n\t\t\t\tbyte[] programCode = trackRepository.getCode(tx\n\t\t\t\t\t\t.getReceiveAddress());\n\t\t\t\tif (programCode != null) {\n\n\t\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\t\tlogger.info(\"calling for existing contract: addres={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\n\t\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\t\tVM vm = new VM();\n\t\t\t\t\tProgram program = new Program(programCode, programInvoke);\n\t\t\t\t\tvm.play(program);\n\n\t\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\t\tsenderAddress, tx.getReceiveAddress(), coinbase);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\ttrackRepository.rollback();\n\t\t\treturn;\n\t\t}\n\t\ttrackRepository.commit();\n\t\tpendingTransactions.put(Hex.toHexString(tx.getHash()), tx);\n\t}",
"private final void d(com.iqoption.core.microservices.billing.response.deposit.d r21) {\n /*\n r20 = this;\n r0 = r20;\n r1 = r20.asp();\n r1 = r1.cCg;\n r2 = \"binding.depositAmountEdit\";\n kotlin.jvm.internal.i.e(r1, r2);\n if (r21 == 0) goto L_0x0158;\n L_0x000f:\n r2 = r0.cFG;\n r3 = 1;\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r2 = r1.getText();\n r2 = r2.toString();\n r4 = r0.cFG;\n r2 = kotlin.jvm.internal.i.y(r2, r4);\n r2 = r2 ^ r3;\n if (r2 == 0) goto L_0x0027;\n L_0x0025:\n goto L_0x0158;\n L_0x0027:\n r2 = r20.ass();\n r4 = 0;\n if (r2 == 0) goto L_0x0068;\n L_0x002e:\n r2 = (java.lang.Iterable) r2;\n r2 = r2.iterator();\n L_0x0034:\n r5 = r2.hasNext();\n if (r5 == 0) goto L_0x0050;\n L_0x003a:\n r5 = r2.next();\n r6 = r5;\n r6 = (com.iqoption.core.features.c.a) r6;\n r6 = r6.getName();\n r7 = r21.getName();\n r6 = kotlin.jvm.internal.i.y(r6, r7);\n if (r6 == 0) goto L_0x0034;\n L_0x004f:\n goto L_0x0051;\n L_0x0050:\n r5 = r4;\n L_0x0051:\n r5 = (com.iqoption.core.features.c.a) r5;\n if (r5 == 0) goto L_0x0068;\n L_0x0055:\n r6 = r5.Xy();\n if (r6 == 0) goto L_0x0068;\n L_0x005b:\n r7 = 0;\n r8 = 0;\n r9 = 1;\n r10 = 0;\n r11 = 0;\n r12 = 19;\n r13 = 0;\n r2 = com.iqoption.core.util.e.a(r6, r7, r8, r9, r10, r11, r12, r13);\n goto L_0x0069;\n L_0x0068:\n r2 = r4;\n L_0x0069:\n r5 = r0.ayL;\n if (r5 == 0) goto L_0x0084;\n L_0x006d:\n r5 = r5.Km();\n if (r5 == 0) goto L_0x0084;\n L_0x0073:\n r5 = r5.aar();\n if (r5 == 0) goto L_0x0084;\n L_0x0079:\n r6 = r21.getName();\n r5 = r5.get(r6);\n r5 = (java.util.ArrayList) r5;\n goto L_0x0085;\n L_0x0084:\n r5 = r4;\n L_0x0085:\n if (r2 != 0) goto L_0x00a5;\n L_0x0087:\n if (r5 == 0) goto L_0x00a5;\n L_0x0089:\n r2 = r20.asr();\n r2 = r2.getItems();\n r2 = kotlin.collections.u.bV(r2);\n r2 = (com.iqoption.deposit.light.d.b) r2;\n if (r2 == 0) goto L_0x00a4;\n L_0x0099:\n r2 = r2.asL();\n if (r2 == 0) goto L_0x00a4;\n L_0x009f:\n r2 = com.iqoption.deposit.f.a(r2);\n goto L_0x00a5;\n L_0x00a4:\n r2 = r4;\n L_0x00a5:\n r6 = r0.cxs;\n r7 = r0.cFE;\n r8 = r4;\n r8 = (java.lang.Double) r8;\n if (r2 != 0) goto L_0x00f4;\n L_0x00ae:\n r9 = r6 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n if (r9 == 0) goto L_0x00f4;\n L_0x00b2:\n if (r7 == 0) goto L_0x00f4;\n L_0x00b4:\n r6 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r6;\n r6 = r6.aaI();\n if (r6 == 0) goto L_0x00cd;\n L_0x00bc:\n r7 = r7.getName();\n r6 = r6.get(r7);\n r6 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d.b) r6;\n if (r6 == 0) goto L_0x00cd;\n L_0x00c8:\n r6 = r6.OL();\n goto L_0x00ce;\n L_0x00cd:\n r6 = r4;\n L_0x00ce:\n if (r6 == 0) goto L_0x00f5;\n L_0x00d0:\n r7 = r0.f(r6);\n if (r7 != 0) goto L_0x00f5;\n L_0x00d6:\n r8 = r6.doubleValue();\n r10 = 0;\n r11 = 0;\n r12 = 1;\n r13 = 0;\n r14 = 0;\n r15 = 0;\n r16 = 0;\n r2 = java.util.Locale.US;\n r7 = \"Locale.US\";\n kotlin.jvm.internal.i.e(r2, r7);\n r18 = 115; // 0x73 float:1.61E-43 double:5.7E-322;\n r19 = 0;\n r17 = r2;\n r2 = com.iqoption.core.util.e.a(r8, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19);\n goto L_0x00f5;\n L_0x00f4:\n r6 = r8;\n L_0x00f5:\n if (r2 == 0) goto L_0x00f8;\n L_0x00f7:\n goto L_0x00fa;\n L_0x00f8:\n r2 = \"\";\n L_0x00fa:\n r0.cFG = r2;\n r2 = (java.lang.CharSequence) r2;\n r1.setText(r2);\n r1 = r2.length();\n r2 = 0;\n if (r1 != 0) goto L_0x010a;\n L_0x0108:\n r1 = 1;\n goto L_0x010b;\n L_0x010a:\n r1 = 0;\n L_0x010b:\n if (r1 == 0) goto L_0x0155;\n L_0x010d:\n r1 = r0.cxs;\n r7 = r1 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n if (r7 != 0) goto L_0x0114;\n L_0x0113:\n r1 = r4;\n L_0x0114:\n r1 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r1;\n if (r1 == 0) goto L_0x011e;\n L_0x0118:\n r1 = r1.aaE();\n if (r1 == r3) goto L_0x0155;\n L_0x011e:\n if (r6 == 0) goto L_0x0122;\n L_0x0120:\n r1 = r6;\n goto L_0x0138;\n L_0x0122:\n if (r5 == 0) goto L_0x0137;\n L_0x0124:\n r5 = (java.util.List) r5;\n r1 = kotlin.collections.u.bV(r5);\n r1 = (com.iqoption.core.microservices.billing.response.deposit.e) r1;\n if (r1 == 0) goto L_0x0137;\n L_0x012e:\n r5 = r1.ZC();\n r1 = java.lang.Double.valueOf(r5);\n goto L_0x0138;\n L_0x0137:\n r1 = r4;\n L_0x0138:\n if (r1 == 0) goto L_0x013b;\n L_0x013a:\n goto L_0x0141;\n L_0x013b:\n r5 = 0;\n r1 = java.lang.Double.valueOf(r5);\n L_0x0141:\n r1 = r0.f(r1);\n if (r1 == 0) goto L_0x014b;\n L_0x0147:\n r4 = r1.getErrorMessage();\n L_0x014b:\n if (r1 == 0) goto L_0x0151;\n L_0x014d:\n r2 = r1.aso();\n L_0x0151:\n r0.u(r4, r2);\n goto L_0x0158;\n L_0x0155:\n r0.u(r4, r2);\n L_0x0158:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.d(com.iqoption.core.microservices.billing.response.deposit.d):void\");\n }",
"public Account transactionMenu(boolean transferOut){\r\n String typeOfAccount = null;\r\n int accountNum = 0;\r\n int numAccounts = -1;\r\n\r\n boolean selectionNotMade = true;\r\n while (selectionNotMade) {\r\n System.out.println(\"Select account type:\");\r\n if (!transferOut) {\r\n System.out.println(\" 1. Credit Card\");\r\n }\r\n System.out.println(\" 2. Line Of Credit\");\r\n System.out.println(\" 3. Chequing\");\r\n System.out.println(\" 4. Savings\");\r\n typeOfAccount = BankMachine.getInput();\r\n switch (typeOfAccount){\r\n case \"1\":\r\n if (!transferOut) {\r\n numAccounts = creditCounter;\r\n break;\r\n }\r\n case \"2\":\r\n numAccounts = lineOfCreditCounter;\r\n break;\r\n case \"3\":\r\n numAccounts = chequingCounter;\r\n break;\r\n case \"4\":\r\n numAccounts = savingCounter;\r\n break;\r\n default:\r\n System.out.println(\"INVALID ENTRY\");\r\n numAccounts = -1;\r\n break;\r\n }\r\n if (numAccounts == 0){\r\n System.out.println(\"You have no accounts of this type\\n\");\r\n } else if (numAccounts != -1){\r\n selectionNotMade = false;\r\n }\r\n }\r\n boolean accountLoop = true;\r\n System.out.println(\"Currently there are \" + numAccounts + \" of these accounts.\");\r\n while (accountLoop){\r\n System.out.println(\"Enter the number of the account you wish to access:\");\r\n String withdrawAccount = BankMachine.getInput();\r\n if (withdrawAccount.matches(\"-?\\\\d+\")){\r\n accountNum = Integer.parseInt(withdrawAccount);\r\n if (accountNum > 0 && accountNum <= numAccounts){\r\n accountLoop = false;\r\n }else{\r\n System.out.println(\"INVALID ENTRY\");\r\n }\r\n }\r\n else{\r\n System.out.println(\"INVALID ENTRY\");\r\n }\r\n }\r\n return getSpecifiedAccount(typeOfAccount, accountNum);\r\n }",
"@Test\n\tpublic void testWithdraw() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);;\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(01, \"acc1\", 00000, 50.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tArrayList<Account> expected = new ArrayList<>();\n\t\texpected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Withdrawl Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"fail withdrawing $50 + fee\", testResult);\n\t}",
"@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}",
"public interface IUserTransactionOperation {\n\n /**\n * Add the new invited transaction into this user's list\n * @param transaction the new invited transaction\n */\n void addInvitedTrans(ITransaction transaction, String userId);\n\n /**\n * Remove the new invited transaction into this user's list\n * @param transaction the invited transaction which is needed to be removed\n */\n void removeInvitedTrans(ITransaction transaction, String userId);\n\n /**\n * Used to receive transaction from one user.\n * @param meeting the transaction information which is used for two user.\n */\n void receiveTransaction(IMeeting meeting, String userId);\n\n\n /**\n * Used to edit the specific information about transaction.\n * @param trans the transaction information which is used for two user.\n * @param tradeItem the item which is users want to trade\n * @param time the meeting time of trading\n * @param place the meeting type of trading\n * @param tradeType the trading type of this transaction\n */\n void editTransaction(ITransaction trans, ItemInterface tradeItem, String time, String place\n , String tradeType, IUserAccount user);\n\n /**\n * Send the one way transaction information to target user.\n * @param target the user who start user want to trade with.\n * @param trans the one way transaction between this user and target user\n */\n void sendTransaction(IUserAccount target, ITransaction trans, IUserAccount user);\n\n /**\n * Confirm this transaction and change the value of confirmRealWorldTrade\n * @param trans the transaction information which is used for two user.\n */\n void confirmRealWorldTrade(IUserAccount user, ITransaction trans);\n\n /**\n * Confirm this transaction and change the value of confirmTrans\n * @param trans the transaction information which is used for two user.\n\n */\n void confirmTrans(ITransaction trans);\n\n void declineTrans(ITransaction trans) ;\n\n /**\n * Add the transaction which is confirmed into this user confirmedTransaction list\n * @param transId the transaction which is confirmed by user and he/she want to add\n */\n void addConfirmedTransaction(int transId, String userId);\n\n /**\n * Remove the transaction which is confirmed into this user confirmedTransaction list\n * @param transId the transaction which is confirmed by user and he/she want to remove\n */\n void removeConfirmedTransaction(int transId, String userId);\n\n /**\n * this method is used for targetUser to perform final confirm of the transaction.\n * @param trans the transaction need to get a final confirm.\n */\n void finalConfirm(ITransaction trans,boolean confirmation, String userId);\n\n void addUserItemRating(IUserAccount user, int ItemId, int rating);\n}",
"private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }",
"@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }",
"@Test\n\tpublic void testChargePinDebitCard() throws Exception {\n\t\tHashMap<String, Object> mapBody = new HashMap<String, Object>();\n\t\tmapBody.put(\"amount\", 1.00);mapBody.put(\"currency\", \"USD\");\n\t\tmapBody.put(\"card\", returnMapCardWithCardPresent());\n\t\t\n\t\tHttpResponse response = TestUtil.post(CCChargeUrl,\n\t\t\t\tCCChargeHeaderParams, mapBody);\n\t\tHashMap<String, Object> result = validateChargeRes(response, 201, Status.CAPTURED.toString());\n\t}",
"private void doBankRequest(final String amount) {\n ParseObject bankRequest = new ParseObject(Constants.CLASS_TRANSACTIONS);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_FROM, mCurrentUser);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n bankRequest.put(Constants.CLASS_TRANSACTIONS_RESOLUTION, false);\n bankRequest.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n mProgressBar.setVisibility(View.INVISIBLE);\n if (e == null) {\n\n bankRequestObject = new JSONObject();\n try {\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_FROM, mUserId);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n } catch (JSONException el) {\n el.printStackTrace();\n }\n\n saveTransaction(amount, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n\n Logger.s(getApplicationContext(), getString(R.string.request_sent_message_txt));\n IntentUtils.startActivity(RequestFundsActivity.this, HomeActivity.class);\n finish();\n } else if (e.getCode() == ParseException.CONNECTION_FAILED || e.getCode() == ParseException.TIMEOUT) {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.network_timeout_message_txt));\n } else {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.general_error_message_txt));\n }\n }\n });\n }",
"@Test\n\tpublic void AccountCredit_test() { Using HamCrest \t\t\n\t\t// Exercise code to run and test\n\t\t//\n\t\tmiCuenta.setHolder(this.arg1);\n\t\t//\n\t\tmiCuenta.setBalance(this.arg2); \n\t\t//\n\t\tmiCuenta.setZone(this.arg3);\n\t\t//\n\t\tmiCuenta.debit(this.arg4);\n\t\tint Debit = miCuenta.getBalance(); \t\t\t\t\n\t\t// Verify\n\t\tassertThat(this.arg5, is(Debit));\n\t\t\n\t}",
"public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }",
"void transactTo_setAccountDisabled(int code, String transactName, ComponentName who, String accountType, boolean disabled, int userId) {\n int i = 1;\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n IBinder binder = ServiceManager.getService(\"device_policy\");\n if (binder != null) {\n if (HWFLOW) {\n Log.i(TAG, \"Transact:\" + transactName + \" to device policy manager service.\");\n }\n _data.writeInterfaceToken(ConstantValue.DESCRIPTOR);\n if (who != null) {\n _data.writeInt(1);\n who.writeToParcel(_data, 0);\n } else {\n _data.writeInt(0);\n }\n _data.writeString(accountType);\n if (!disabled) {\n i = 0;\n }\n _data.writeInt(i);\n _data.writeInt(userId);\n binder.transact(code, _data, _reply, 0);\n _reply.readException();\n }\n _reply.recycle();\n _data.recycle();\n } catch (RemoteException localRemoteException) {\n Log.e(TAG, \"transactTo \" + transactName + \" failed: \" + localRemoteException.getMessage());\n } catch (Throwable th) {\n _reply.recycle();\n _data.recycle();\n }\n }",
"BrainTreeRefundTransactionResult refundTransaction(BrainTreeRefundTransactionRequest request);",
"@Test\n public void customerCanPerformTransferBetweenAccounts() {\n String ownerId = \"ownerId\";\n Account accountFrom = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n Account accountTo = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n\n // Put some money in the from account\n Transaction transaction = new Transaction.Builder().setDescription(\"Test\").setAmount(DollarAmount.fromInt(100)).setType(Transaction.Type.DEPOSIT).build();\n accountFrom.applyTransaction(transaction);\n assertEquals(accountFrom.getAccountBalance(), DollarAmount.fromInt(100));\n\n // Attempt transfer\n Account.transfer(accountFrom, accountTo, DollarAmount.fromInt(30));\n\n // Assert transfer was successful\n assertEquals(DollarAmount.fromInt(70), accountFrom.getAccountBalance());\n assertEquals(DollarAmount.fromInt(30), accountTo.getAccountBalance());\n }",
"private boolean prepareTransaction() {\n\n // Ensure Bitcoin network service is started\n BitcoinNetworkService bitcoinNetworkService = CoreServices.getOrCreateBitcoinNetworkService();\n Preconditions.checkState(bitcoinNetworkService.isStartedOk(), \"'bitcoinNetworkService' should be started\");\n\n Address changeAddress = bitcoinNetworkService.getNextChangeAddress();\n\n // Determine if this came from a BIP70 payment request\n if (paymentRequestData.isPresent()) {\n Optional<FiatPayment> fiatPayment = paymentRequestData.get().getFiatPayment();\n PaymentSession paymentSession;\n try {\n if (paymentRequestData.get().getPaymentRequest().isPresent()) {\n paymentSession = new PaymentSession(paymentRequestData.get().getPaymentRequest().get(), false);\n } else {\n log.error(\"No PaymentRequest in PaymentRequestData - cannot create a paymentSession\");\n return false;\n }\n } catch (PaymentProtocolException e) {\n log.error(\"Could not create PaymentSession from payment request {}, error was {}\", paymentRequestData.get().getPaymentRequest().get(), e);\n return false;\n }\n\n // Build the send request summary from the payment request\n Wallet.SendRequest sendRequest = paymentSession.getSendRequest();\n log.debug(\"SendRequest from BIP70 paymentSession: {}\", sendRequest);\n\n Optional<FeeState> feeState = WalletManager.INSTANCE.calculateBRITFeeState(true);\n\n // Prepare the transaction i.e work out the fee sizes (not empty wallet)\n sendRequestSummary = new SendRequestSummary(\n sendRequest,\n fiatPayment,\n FeeService.normaliseRawFeePerKB(Configurations.currentConfiguration.getWallet().getFeePerKB()),\n null,\n feeState\n );\n\n // Ensure we keep track of the change address (used when calculating fiat equivalent)\n sendRequestSummary.setChangeAddress(changeAddress);\n sendRequest.changeAddress = changeAddress;\n } else {\n Preconditions.checkNotNull(enterAmountPanelModel);\n Preconditions.checkNotNull(confirmPanelModel);\n\n // Check a recipient has been set\n if (!enterAmountPanelModel\n .getEnterRecipientModel()\n .getRecipient().isPresent()) {\n return false;\n }\n\n // Build the send request summary from the user data\n Coin coin = enterAmountPanelModel.getEnterAmountModel().getCoinAmount().or(Coin.ZERO);\n Address bitcoinAddress = enterAmountPanelModel\n .getEnterRecipientModel()\n .getRecipient()\n .get()\n .getBitcoinAddress();\n\n Optional<FeeState> feeState = WalletManager.INSTANCE.calculateBRITFeeState(true);\n\n // Create the fiat payment - note that the fiat amount is not populated, only the exchange rate data.\n // This is because the client and transaction fee is only worked out at point of sending, and the fiat equivalent is computed from that\n Optional<FiatPayment> fiatPayment;\n Optional<ExchangeRateChangedEvent> exchangeRateChangedEvent = CoreServices.getApplicationEventService().getLatestExchangeRateChangedEvent();\n if (exchangeRateChangedEvent.isPresent()) {\n fiatPayment = Optional.of(new FiatPayment());\n fiatPayment.get().setRate(Optional.of(exchangeRateChangedEvent.get().getRate().toString()));\n // A send is denoted with a negative fiat amount\n fiatPayment.get().setAmount(Optional.<BigDecimal>absent());\n fiatPayment.get().setCurrency(Optional.of(exchangeRateChangedEvent.get().getCurrency()));\n fiatPayment.get().setExchangeName(Optional.of(ExchangeKey.current().getExchangeName()));\n } else {\n fiatPayment = Optional.absent();\n }\n\n // Prepare the transaction i.e work out the fee sizes (not empty wallet)\n sendRequestSummary = new SendRequestSummary(\n bitcoinAddress,\n coin,\n fiatPayment,\n changeAddress,\n FeeService.normaliseRawFeePerKB(Configurations.currentConfiguration.getWallet().getFeePerKB()),\n null,\n feeState,\n false);\n }\n\n log.debug(\"Just about to prepare transaction for sendRequestSummary: {}\", sendRequestSummary);\n return bitcoinNetworkService.prepareTransaction(sendRequestSummary);\n }",
"public void authorizeTransaction() {}",
"public boolean debitUsingSlip(String userName, String accountNumber, double balance) {\n\t\t\treturn transactiondao.debitUsingSlip(userName, accountNumber, balance);\r\n\t\t}"
] | [
"0.6899956",
"0.65329784",
"0.63463074",
"0.6224422",
"0.6071603",
"0.60580873",
"0.59640765",
"0.5941383",
"0.5869693",
"0.57725745",
"0.57573384",
"0.5754943",
"0.5725757",
"0.5713487",
"0.5673777",
"0.5661515",
"0.5634616",
"0.5634015",
"0.561148",
"0.5608153",
"0.55551076",
"0.55514634",
"0.5535752",
"0.55334634",
"0.55281115",
"0.5526791",
"0.55220634",
"0.5519159",
"0.5481578",
"0.54814893",
"0.54776746",
"0.5458808",
"0.5438635",
"0.5433822",
"0.54268134",
"0.5421789",
"0.541227",
"0.5404687",
"0.5397864",
"0.53864664",
"0.5385338",
"0.5381437",
"0.53623873",
"0.5360094",
"0.53556186",
"0.5344301",
"0.5341738",
"0.53301835",
"0.5330152",
"0.53162235",
"0.5301343",
"0.5299319",
"0.529703",
"0.52928007",
"0.52806515",
"0.5266942",
"0.526398",
"0.5248834",
"0.52326584",
"0.52243865",
"0.5220806",
"0.52046114",
"0.5194495",
"0.5193281",
"0.5191592",
"0.5191212",
"0.51873654",
"0.5184142",
"0.5180782",
"0.51784647",
"0.5171873",
"0.5159463",
"0.5154983",
"0.5154784",
"0.5153609",
"0.5149027",
"0.51477724",
"0.51471096",
"0.51395404",
"0.5136036",
"0.5136021",
"0.5120438",
"0.511052",
"0.51086307",
"0.5108571",
"0.51010376",
"0.51009655",
"0.5099694",
"0.5093041",
"0.5072154",
"0.50705326",
"0.5067232",
"0.5062066",
"0.5058368",
"0.50560284",
"0.50532454",
"0.5048041",
"0.5038115",
"0.50374496",
"0.5037307"
] | 0.56944895 | 14 |
this comes from the request side but usually represents a dead channel | @Override
public void errorReceived(String msg, Exception t) {
abort();
// abort() calls sendError() which calls unregister()
// so don't bother
// unregister();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void communicationChannelBroken() {\n\n }",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n super.channelActive(ctx);\n \n }",
"@Override\n\tpublic void channelInactive(ChannelHandlerContext ctx) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"channelInactive\");\n\t\tsuper.channelInactive(ctx);\n\t}",
"public Channel method_4090() {\n return null;\n }",
"public ChannelFuture method_4126() {\n return null;\n }",
"public Channel method_4121() {\n return null;\n }",
"public ChannelFuture method_4097() {\n return null;\n }",
"public ChannelFuture method_4092() {\n return null;\n }",
"@Override\n public void channelInactive(ChannelHandlerContext ctx) throws Exception {\n logger.debug(\"client {} inactive\", Connection.this);\n if (!isInitialized || isClosed()) {\n errorOutAllHandler(new TransportException(address, \"Channel has been closed\"));\n // we still want to force so that the future completes\n Connection.this.closeAsync().force();\n } else {\n defunct(new TransportException(address, \"Channel has been closed\"));\n }\n }",
"public Channel method_4112() {\n return null;\n }",
"@Override\n public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) {\n log.error(\"Input Stream {} : Channel Disconnected - Stream Engine RTS process!\", name);\n channelAtomicReference.set(null);\n }",
"public ChannelFuture method_4120() {\n return null;\n }",
"public ChannelFuture method_4130() {\n return null;\n }",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n }",
"public ChannelPromise method_4109() {\n return null;\n }",
"@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, WsClientMessage msg) throws Exception {\n\t}",
"@Override\n\t\t\t\t\t\tpublic void channelActive(ChannelHandlerContext ctx) {\n\t\t\t\t\t\t\tSystem.out.println(RestResult.success(\"channel active!\"));\n\t\t\t\t\t\t}",
"@Override\n public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n }",
"void channelInactive() throws Exception;",
"void channelInactive() throws Exception;",
"public void connectionLost(String channelID);",
"@Override\n public int getChannel()\n {\n return channel;\n }",
"@Override\n public void connectionLost(Throwable cause) {\n }",
"@Override\r\n\tpublic void onChannelSuccess() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void connectionLost(Throwable cause) {\n\t\t\r\n\t}",
"@Override\n public void connectionLost() {\n }",
"@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t\tsuper.channelReadComplete(ctx);\n\t}",
"@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t}",
"public SocketChannel getChannel() { return null; }",
"@Override\n public void connectionLost(Throwable arg0) {\n\n }",
"public ChannelPipeline method_4119() {\n return null;\n }",
"@Override\n\tpublic void channelActive(ChannelHandlerContext ctx) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"channelActive\");\n\t\tsuper.channelActive(ctx);\n\t}",
"public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }",
"@Override\n protected ExchangeUse getExchangeUse() {return ExchangeUse.DEAD;}",
"@Override\n\tpublic void connectionLost(Throwable cause) {\n\t\t\n\t}",
"protected void responseFail(){\n\t\tqueue.clear();\n\t}",
"@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg)\n {\n throw new IllegalStateException(\"InboundMessageHandler doesn't expect channelRead() to be invoked\");\n }",
"protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {}",
"protected Channel getChannel()\n {\n return mChannel;\n }",
"@Override\n public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception {\n super.handleUpstream(ctx, e);\n }",
"@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t\tLog.i(\"MySocketHandler\", \"channelReadComplete\");\n\t\tsuper.channelReadComplete(ctx);\n\t}",
"@Override\n public void connectionLost(Throwable cause) {\n\n }",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n ctx.write(buf.duplicate()).addListener(ChannelFutureListener.CLOSE);\n }",
"public ChannelId method_4117() {\n return null;\n }",
"public boolean pending() {\n return altingChannel.pending();\n }",
"protected void connectionClosed() {}",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n System.out.println(\"【channelActive】。。。\");\n }",
"@Override\n public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {\n ctx.getChannel().getRemoteAddress();\n System.out.println(ctx.getChannel().getRemoteAddress()+\" Disconnected..\");\n Client user = ServerTools.getClientByChannel(ctx.getChannel());\n if(Server.live_clients.contains(user)){\n Server.live_clients.remove(user);\n System.out.println(\"User removed\");\n }\n }",
"@Override\n\tpublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\t\tLog.i(\"channelRead\", ((String) msg));\n\t\tsuper.channelRead(ctx, msg);\n\t}",
"@Override\r\n\tpublic void connectionLost(Throwable t) {\n\t}",
"@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n String body = (String) msg;\n System.out.println(body);\n System.out.println(\"第\"+ ++count + \"次收到服务器回应\");\n }",
"private void close() {\n\t\t\tassert this.sendLock.writeLock().isHeldByCurrentThread();\n\t\t\tthis.dead = true;\n\t\t\tStoreRequest s = writesByRows.remove(this.row);\n\t\t\t// This request was THE only request for its row\n\t\t\tassert this == s;\n\t\t\tlogger.fine(this.toString() + \" sent on \" + new Date(System.currentTimeMillis()) + \" and not replanned\");\n\t\t}",
"protected void checkDeadLock()\r\n/* 134: */ {\r\n/* 135:165 */ if (channel().isRegistered()) {\r\n/* 136:166 */ super.checkDeadLock();\r\n/* 137: */ }\r\n/* 138: */ }",
"@Override\n \tpublic void connectionClosed() {\n \t\t\n \t}",
"@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\n log.info( ctx.channel().id().asLongText()+\"-> channelRead , msg={}\" , msg.getClass().getName());\n\n ctx.fireChannelRead( msg ) ;\n }",
"private void clearHeartBeatReq() {\n if (reqCase_ == 5) {\n reqCase_ = 0;\n req_ = null;\n }\n }",
"@Override\n\tpublic void channelRead(ChannelHandlerContext ctx, Object msg)\n\t\t\tthrows Exception {\n\t\thandleRequestWithsingleThread(ctx, msg);\n\t}",
"private void connectionClosed() {\n if (this.state != SessionState.DISCONNECTING) {\n // this came unexpected\n connectionClosed(new VertxException(\"Connection closed\"));\n }\n }",
"@ForOverride\n public void onNotInUse(InternalSubchannel internalSubchannel) {\n }",
"@Override\n public void userEventTriggered(ChannelHandlerContext channelHandlerContext, Object evt) throws Exception {\n if (evt instanceof IdleStateEvent) {\n\n\n if (((IdleStateEvent) evt).state() == IdleState.READER_IDLE) {\n\n NettyAndroidClient nettyAndroidClient = LUCIControl.luciSocketMap.get(ipadddress);\n LSSDPNodeDB mNodeDB1 = LSSDPNodeDB.getInstance();\n LSSDPNodes mNode = mNodeDB1.getTheNodeBasedOnTheIpAddress(ipadddress);\n //Log.d(\"Scan_Netty\", \"Triggered Heartbeeat check\") ;\n if (nettyAndroidClient==null) {\n\n return;\n }\n if(mNode != null) {\n LibreLogger.d(this, \"HeartBeatHandler Last Notified Time \" + nettyAndroidClient.getLastNotifiedTime() +\n \" For the Ip \" + nettyAndroidClient.getRemotehost() + \"Device Name \" + mNode.getFriendlyname()) ;\n }else{\n LibreLogger.d(this, \"HeartBeatHandler Last Notified Time \" + nettyAndroidClient.getLastNotifiedTime() +\n \" For the Ip \" + nettyAndroidClient.getRemotehost());\n }\n\n /* If we are Missing 6 Alive notification */\n if(( System.currentTimeMillis()- (nettyAndroidClient.getLastNotifiedTime()))>60000){\n /*\n Removing the connection as we have not got any notiication from long time\n */\n\n\t\t\t\t\t/* Commented for New TCP based Discovery , where Ping is not required*/\n //if(!ping(ipadddress))\n {\n /*Commenting As per the HAri Comments*/\n //RemovingTheCorrespondingSceneMapFromCentralDB(channelHandlerContext,ipadddress,mNode);\n\n // Send Commands To UI that Device is Removed .\n Log.d(\"Scan_Netty\", ipadddress + \"Socket removed becuase we did not get notification since last 11 second\");\n Log.d(HeartbeatHandler.class.getName(), ipadddress + \"Socket removed becuase we did not get notification since last 11 second\");\n }\n }\n }\n }\n }",
"@Override\n\t\t\tpublic void connectionLost(Throwable throwable) {\n\t\t\t\tSystem.out.println(\"connectionLost\");\n\t\t\t}",
"@Override\n public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {\n// If the event indicates that\n// the handshake was successful removes the HttpRequestHandler from the\n// ChannelPipeline because no further HTTP messages will be received\n if (evt instanceof WebSocketServerProtocolHandler.HandshakeComplete) {\n ctx.pipeline().remove(HttpRequestHandler.class);\n //通道组的所有通道的写操作,简化了一个通道组里面所有通道的写操作,然后把当前通道也加入通道组\n group.writeAndFlush(\"clent \" + ctx.channel() + \"joined!\");\n group.add(ctx.channel());\n } else {\n super.userEventTriggered(ctx, evt);\n }\n }",
"@Override\n protected void channelRead0(ChannelHandlerContext ctx, Message msg)\n {\n mDispatcher.dispatch(mPeer, msg);\n }",
"public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n/* 313 */ processPendingReadCompleteQueue();\n/* 314 */ ctx.fireChannelReadComplete();\n/* */ }",
"private HeartBeatMessage() {\n initFields();\n }",
"@Override\n\t\tpublic void operationComplete(ChannelFuture future) throws Exception {\n\t\t\tSystem.out.println(\"Channel closed\");\n\t\t\t// @TODO if lost, try to re-establish the connection\n\t\t}",
"public void sendNotModified(ChannelHandlerContext ctx) {\r\n FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_MODIFIED);\r\n setDateHeader(response);\r\n\r\n // Close the connection as soon as the error message is sent.\r\n ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);\r\n }",
"public Channel getChannel() {\n return channel;\n }",
"public void updateChannel(String channel) {\n Log.d(\"BC\", \"update channel \" + channel);\n long startTime = 0l;\n long endTime = 0l;\n Cursor cursor = getContentResolver().query(\n ChannelData.BROKEN_CONTENT_URI,\n null,\n null,\n new String[]{channel},\n null\n );\n if (cursor.getCount() > 0) {\n if (cursor.moveToFirst()) {\n startTime = cursor.getLong(cursor.getColumnIndex(\n ChannelData.PARENT\n ));\n endTime = cursor.getLong(cursor.getColumnIndex(\n ChannelData.ITEM_ID\n ));\n }\n Log.w(TAG, \"Found broken threads in \" + channel + \", \"\n + new Date(startTime) + \" / \"+ new Date(endTime));\n }\n cursor.close();\n cursor = getContentResolver().query(\n Roster.CONTENT_URI,\n new String[]{Roster.LAST_UPDATED},\n \"jid=?\",\n new String[]{channel},\n null\n );\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n startTime = cursor.getLong(\n cursor.getColumnIndex(Roster.LAST_UPDATED));\n IQ iq = new ChannelFetch(channel, startTime);\n try {\n send(iq);\n } catch (RemoteException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n cursor.close();\n DiscoverInfo info = new DiscoverInfo();\n info.setNode(channel);\n info.setType(org.jivesoftware.smack.packet.IQ.Type.GET);\n info.setTo(\"broadcaster.buddycloud.com\");\n try {\n send(info);\n } catch (InterruptedException e) {\n e.printStackTrace(System.err);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void connectionLost(Throwable thrwbl) {\n System.out.println(\"服务器的连接丢失\");\n }",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n ctx.fireChannelActive();\n\n ctx.executor().scheduleAtFixedRate(new Runnable() {\n @Override\n public void run() {\n log.info(\"send heart beat\");\n HeartBeat heartBeat = new HeartBeat();\n ctx.writeAndFlush(heartBeat);\n }\n }, 0, 5, TimeUnit.SECONDS);\n }",
"@Override\n\t\t\tpublic IAMQPExchange exchange() {\n\t\t\t\treturn null;\n\t\t\t}",
"@Override\n\t\t\tpublic IAMQPExchange exchange() {\n\t\t\t\treturn null;\n\t\t\t}",
"@Override\n\tpublic void channelInactive(ChannelHandlerContext ctx) throws Exception {\n\t\tsuper.channelInactive(ctx);\n\t\tif(connectListener != null) {\n\t\t\tconnectListener.onDisconnect(ctx.channel());\n\t\t}\n\t}",
"@Override\n public boolean messagePending() {\n return commReceiver.messagePending();\n }",
"@Override\n\tpublic void channelActive(ChannelHandlerContext ctx) throws Exception {\n\t\tctx.writeAndFlush(firstMessage);\n\t}",
"@Override\n protected void connectionClosed(Peer.CloseReason reason)\n {\n Stream.concat(sendQueue.stream(), blockRequests.stream())\n .filter(pm -> pm.type == StdPeerMessage.REQUEST)\n .forEach(pm -> {\n torrent.cancelBlockRequest(pm.index, pm.begin);\n });\n\n // release messages\n sendQueue.forEach( pmCache::release);\n sendQueue.clear();\n // and active requests\n blockRequests.forEach( pmCache::release);\n blockRequests.clear();\n // peerRequests\n peerBlockRequests.forEach( pmCache::release);\n peerBlockRequests.clear();\n\n peer.setConnectionClosed(reason);\n\n // incoming connections could be not linked yet\n if (torrent != null) {\n torrent.onPeerDisconnect(this);\n }\n\n // todo: release caches via connectionFactory\n }",
"public ChannelProgressivePromise method_4127() {\n return null;\n }",
"public ChannelConfig method_4104() {\n return null;\n }",
"public ChannelPromise method_4101() {\n return null;\n }",
"boolean isBadCommunication();",
"private void handleWhiteboardCleared() {\n for (SocketConnection tobeNotified : SocketManager.getInstance()\n .getNotManagerConnectionList()) {\n tobeNotified.send(this.message);\n }\n }",
"@Override\n\tpublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\t\tctx.write(msg);\n\t}",
"@Override\n public void onConnectionSuspended(int cause) {\n // Do nothing\n }",
"public Channel getChannel()\n {\n return channel;\n }",
"@Override\n\tpublic void handleDownstream(ChannelHandlerContext arg0, ChannelEvent arg1) throws Exception {\n\t\tsuper.handleDownstream(arg0, arg1);\n\t}",
"@Override\n public void onConnectionSuspended(int cause) {\n }",
"@Override\n public void onConnectionSuspended(int cause) {\n }",
"private void sendCurrentState() {\n\ttry {\n\t channel.sendObject(getState());\n\t} catch (IOException e) {\n\t Log.e(\"423-client\", e.toString());\n\t}\n }",
"@Override\n public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {\n if (evt instanceof IdleStateEvent) {\n IdleState state = ((IdleStateEvent) evt).state();\n if (state == IdleState.WRITER_IDLE) {\n // write heartbeat to server\n //ctx.writeAndFlush(HEARTBEAT_SEQUENCE.duplicate());\n System.out.println(\"-----Send KeepAlive-----\");\n/* PacketProto.Packet.Builder builder = newBuilder();\n builder.setPacketType(PacketProto.Packet.PacketType.HEARTBEAT);\n PacketProto.Packet packet = builder.build();\n ctx.writeAndFlush(packet);*/\n ProtoMessage.ProtoMsg.Builder msg = ProtoMessage.ProtoMsg.newBuilder();\n msg.setType(ProtoHead.EMsgHead.KEEP_ALIVE_REQ);\n msg.setSequence(0);\n msg.setSessionId(1);\n ProtoMessage.Request.Builder req = ProtoMessage.Request.newBuilder();\n KeepAliveMsg.KeepAliveReq.Builder keepReq = KeepAliveMsg.KeepAliveReq.newBuilder();\n keepReq.setTime(111);\n req.setKeepAliveReq(keepReq);\n msg.setRequest(req);\n ctx.writeAndFlush(msg.build());\n }\n } else {\n super.userEventTriggered(ctx, evt);\n }\n }",
"private void assertNotConsumed() {\n if (this.consumed) {\n throw new IllegalStateException(\"Response content has been already consumed\");\n }\n }",
"@Override\n\tpublic void connectionClosed() {\n\t}",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.597 -0500\", hash_original_method = \"6CA7282E928AA840C6D25E995C5EBFEA\", hash_generated_method = \"EE2364AE0179C423F2BD973FF5B92F49\")\n \nprivate void replyDisconnected(int status) {\n Message msg = mSrcHandler.obtainMessage(CMD_CHANNEL_DISCONNECTED);\n msg.arg1 = status;\n msg.obj = this;\n msg.replyTo = mDstMessenger;\n mSrcHandler.sendMessage(msg);\n }",
"@Override\n\t\t\t\tpublic void isComposingReceived(LinphoneCore lc, LinphoneChatRoom cr) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public int getResponseQueueLength() {\n return 0;\n }",
"@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, RpcRequest msg) throws Exception {\n\t\tRpcResponse response = new RpcResponse();\n\t\tresponse.setRequestId(msg.getRequestId());\n\t\ttry {\n\t\t\tObject result = handle(msg);\n\t\t\tresponse.setResult(result);\n\t\t} catch (Throwable t) {\n\t\t\tLOGGER.debug(\"handle ocurred error ==> {}\", t);\n\t\t\tresponse.setError(t);\n\t\t}\n\t\tctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);//写完然后关闭channel\n\t}",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"@Override\n public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {\n Channel ch = ctx.getChannel();\n //Player player = (Player) ch.getAttachment();\n Client client = (Client) ch.getAttachment();\n \n if (ch.isConnected()) { // && !client.getPlayer().destroyed() \n RSCPacket packet = (RSCPacket) e.getMessage();\n //player.addPacket(p); // Used to log packets for macro detection\n //engine.addPacket(p); // This one actually results in the packet being processed!\n client.pushToMessageQueue(packet);\n }\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}",
"@Override\n public void channelActive(final ChannelHandlerContext ctx) throws UnknownHostException {\n System.err.println(\"处于活连接\");\n //ctx.writeAndFlush(\"Welcome to secure chat service!\\n\");\n }",
"@Override\n public void connectionLost(Throwable cause) {\n Log.d(TAG, \"Connection lost\");\n }"
] | [
"0.67739916",
"0.670909",
"0.6658206",
"0.6654782",
"0.6623819",
"0.66229934",
"0.6596791",
"0.655772",
"0.6510236",
"0.65058184",
"0.6478751",
"0.6462697",
"0.64125913",
"0.63898027",
"0.63029855",
"0.628535",
"0.620156",
"0.61651474",
"0.614389",
"0.614389",
"0.6126655",
"0.6125631",
"0.6113638",
"0.6061868",
"0.6046604",
"0.6046415",
"0.60406435",
"0.6031514",
"0.6010042",
"0.6008687",
"0.60042846",
"0.60000247",
"0.5965014",
"0.5918894",
"0.59094507",
"0.59088415",
"0.59069794",
"0.5879",
"0.5873871",
"0.58735675",
"0.5868737",
"0.58660924",
"0.58645517",
"0.58528507",
"0.5843808",
"0.58220434",
"0.58133084",
"0.58111805",
"0.5797819",
"0.5791071",
"0.5780927",
"0.57439834",
"0.5734722",
"0.57265246",
"0.5704579",
"0.5690259",
"0.5685042",
"0.56845146",
"0.56773615",
"0.5673094",
"0.5663376",
"0.56621516",
"0.5661967",
"0.5660252",
"0.56479627",
"0.56437606",
"0.56394833",
"0.56393486",
"0.5636415",
"0.5632084",
"0.5623469",
"0.56231564",
"0.56231564",
"0.56145424",
"0.5610755",
"0.5610085",
"0.5605603",
"0.5601982",
"0.55796295",
"0.5579116",
"0.55729824",
"0.55709535",
"0.55692",
"0.5567115",
"0.55620724",
"0.5561611",
"0.5556761",
"0.5556761",
"0.55510443",
"0.5544774",
"0.554391",
"0.5542527",
"0.55367744",
"0.55355793",
"0.55355185",
"0.5531994",
"0.55281836",
"0.552325",
"0.5521886",
"0.5521097",
"0.5520805"
] | 0.0 | -1 |
/ renamed from: a | private final Single<TabSource> m39397a(MainPage mainPage) {
switch (C9424c.f31575a[mainPage.ordinal()]) {
case 1:
mainPage = Single.a(TabSource.ACCOUNT);
C2668g.a(mainPage, "Single.just(TabSource.ACCOUNT)");
return mainPage;
case 2:
mainPage = Single.a(TabSource.RECS);
C2668g.a(mainPage, "Single.just(TabSource.RECS)");
return mainPage;
case 3:
return m39398b();
case 4:
mainPage = Single.a(TabSource.ACTIVITY);
C2668g.a(mainPage, "Single.just(TabSource.ACTIVITY)");
return mainPage;
case 5:
mainPage = Single.a(TabSource.DISCOVERY);
C2668g.a(mainPage, "Single.just(TabSource.DISCOVERY)");
return mainPage;
default:
throw new NoWhenBranchMatchedException();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.6249595",
"0.6242955",
"0.61393225",
"0.6117684",
"0.61140615",
"0.60893875",
"0.6046927",
"0.60248226",
"0.60201806",
"0.59753186",
"0.5947817",
"0.5912414",
"0.5883872",
"0.5878469",
"0.587005",
"0.58678955",
"0.58651674",
"0.5857262",
"0.58311176",
"0.58279663",
"0.58274275",
"0.5794977",
"0.57889086",
"0.57837564",
"0.5775938",
"0.57696944",
"0.57688814",
"0.5752557",
"0.5690739",
"0.5678386",
"0.567034",
"0.56661606",
"0.56595623",
"0.56588095",
"0.56576085",
"0.5654566",
"0.56445956",
"0.56401736",
"0.5638699",
"0.56305",
"0.56179273",
"0.56157446",
"0.5607045",
"0.5605239",
"0.5600648",
"0.5595156",
"0.55912733",
"0.5590759",
"0.5573802",
"0.5556659",
"0.55545336",
"0.5550466",
"0.5549409",
"0.5544484",
"0.55377364",
"0.55291194",
"0.55285007",
"0.55267704",
"0.5525843",
"0.5522067",
"0.5520236",
"0.55098593",
"0.5507351",
"0.5488173",
"0.54860324",
"0.54823226",
"0.5481975",
"0.5481588",
"0.5480086",
"0.5478032",
"0.54676044",
"0.5463578",
"0.54506475",
"0.54438734",
"0.5440832",
"0.5440053",
"0.5432095",
"0.5422814",
"0.5421934",
"0.54180306",
"0.5403851",
"0.5400144",
"0.5400042",
"0.5394655",
"0.53891194",
"0.5388751",
"0.53749055",
"0.53691155",
"0.53590924",
"0.5356525",
"0.5355397",
"0.535498",
"0.5354871",
"0.535003",
"0.5341249",
"0.5326222",
"0.53232485",
"0.53197914",
"0.5316941",
"0.5311645",
"0.5298656"
] | 0.0 | -1 |
/ renamed from: b | private final Single<TabSource> m39398b() {
Single<TabSource> d = RxJavaInteropExtKt.toV1Observable(this.f31574b.observe(), BackpressureStrategy.LATEST).c(1).a().d(new C13217b(this));
C2668g.a(d, "matchSubscreensTracker\n …ubscreenToTabSource(it) }");
return d;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo2508a(bxb bxb);",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void b() {\n }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"@Override\n\tpublic void b2() {\n\t\t\n\t}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"@Override\n\tpublic void b() {\n\n\t}",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public bb b() {\n return a(this.a);\n }",
"@Override\n\tpublic void b1() {\n\t\t\n\t}",
"public void b() {\r\n }",
"@Override\n\tpublic void bbb() {\n\t\t\n\t}",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public abstract void b(StringBuilder sb);",
"public void b() {\n }",
"public void b() {\n }",
"protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }",
"public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }",
"public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public void b() {\n ((a) this.a).b();\n }",
"public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }",
"b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }",
"public t b() {\n return a(this.a);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }",
"private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"public abstract T zzm(B b);",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }",
"public abstract void zzc(B b, int i, int i2);",
"public interface b {\n}",
"public interface b {\n}",
"private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }",
"BSubstitution createBSubstitution();",
"public void b(ahd paramahd) {}",
"void b();",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"B database(S database);",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public abstract C0631bt mo9227aB();",
"public an b() {\n return a(this.a);\n }",
"protected abstract void a(bru parambru);",
"static void go(Base b) {\n\t\tb.add(8);\n\t}",
"void mo46242a(bmc bmc);",
"public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }",
"public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public abstract BoundType b();",
"public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }",
"b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }",
"private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }",
"public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }",
"interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}",
"@Override\n\tpublic void visit(PartB partB) {\n\n\t}",
"public abstract void zzb(B b, int i, long j);",
"public abstract void zza(B b, int i, zzeh zzeh);",
"int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}",
"private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }",
"public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }",
"public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }",
"public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }",
"public abstract void a(StringBuilder sb);",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public abstract void zzf(Object obj, B b);",
"public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}",
"@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public abstract void a(b paramb, int paramInt1, int paramInt2);",
"public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }",
"void mo83703a(C32456b<T> bVar);",
"public void a(String str) {\n ((b.b) this.b).d(str);\n }",
"public void selectB() { }",
"BOperation createBOperation();",
"void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}",
"private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }",
"public void b(String str) {\n ((b.b) this.b).e(str);\n }",
"public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }",
"public abstract void zza(B b, int i, T t);",
"public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }",
"public abstract void zza(B b, int i, long j);",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public abstract void mo9798a(byte b);",
"public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }",
"private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }",
"public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.64558864",
"0.6283203",
"0.6252635",
"0.6250949",
"0.6244743",
"0.6216273",
"0.6194491",
"0.6193556",
"0.61641675",
"0.6140157",
"0.60993093",
"0.60974354",
"0.6077849",
"0.6001867",
"0.5997364",
"0.59737104",
"0.59737104",
"0.5905105",
"0.5904295",
"0.58908087",
"0.5886636",
"0.58828026",
"0.5855491",
"0.584618",
"0.5842517",
"0.5824137",
"0.5824071",
"0.58097327",
"0.5802052",
"0.58012927",
"0.579443",
"0.5792392",
"0.57902914",
"0.5785124",
"0.57718205",
"0.57589084",
"0.5735892",
"0.5735892",
"0.5734873",
"0.5727929",
"0.5720821",
"0.5712531",
"0.5706813",
"0.56896514",
"0.56543154",
"0.5651059",
"0.5649904",
"0.56496733",
"0.5647035",
"0.5640965",
"0.5640109",
"0.563993",
"0.5631903",
"0.5597427",
"0.55843794",
"0.5583287",
"0.557783",
"0.55734867",
"0.55733293",
"0.5572254",
"0.55683887",
"0.55624336",
"0.55540246",
"0.5553985",
"0.55480546",
"0.554261",
"0.5535739",
"0.5529958",
"0.5519634",
"0.5517503",
"0.55160624",
"0.5511545",
"0.5505353",
"0.5500533",
"0.5491741",
"0.5486198",
"0.5481978",
"0.547701",
"0.54725856",
"0.5471632",
"0.5463497",
"0.5460805",
"0.5454913",
"0.5454885",
"0.54519916",
"0.5441594",
"0.5436747",
"0.5432453",
"0.5425923",
"0.5424724",
"0.54189867",
"0.54162544",
"0.54051477",
"0.53998184",
"0.53945845",
"0.53887725",
"0.5388146",
"0.5387678",
"0.53858143",
"0.53850687",
"0.5384439"
] | 0.0 | -1 |
/ renamed from: a | private final TabSource m39394a(Subscreen subscreen) {
switch (C9424c.f31576b[subscreen.ordinal()]) {
case 1:
return TabSource.ACTIVITY;
case 2:
return TabSource.MESSAGES;
default:
throw new NoWhenBranchMatchedException();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void handlerFault(String msg) {
System.out.println("Emailing the error " +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 |
Agrega marcador aobre posicion | private void agregarMarcador(double lat, double lon) {
LatLng coord = new LatLng(lat, lon);
CameraUpdate miUbi = CameraUpdateFactory.newLatLngZoom(coord, 16);
if (mPrueba != null) mPrueba.remove();
mPrueba = mMap.addMarker(new MarkerOptions()
.position(coord)
.title("Reporte")
.snippet("Reportar"));
mPrueba.setDraggable(true);
mPrueba.setTag(0);
mMap.animateCamera(miUbi);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Posicion posicionAlDesarmarMenasor(Posicion posicion) {\n\t\t\t\tPosicion posAux;\n\t\t\t\ttry{\n\t\t\t\t\tposAux=new Posicion(posicion.getFila(),posicion.getColumna()-2);\n\t\t\t\t}catch(ErrorPosicionInvalida e){\n\t\t\t\t\tposAux=new Posicion(posicion.getFila(),posicion.getColumna()+1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn posAux;\n\t\t\t}",
"private void agregarMarcadorAlto() {\n SharedPreferences preferencias = actividadJuego.getSharedPreferences(\"marcadorAlto\", Context.MODE_PRIVATE);\n int puntos = preferencias.getInt(\"puntos\",0);\n\n txtMarcador = new Text(ControlJuego.ANCHO_CAMARA/2,ControlJuego.ALTO_CAMARA-80,\n fontMonster,\"Marcador mayor: \"+puntos,actividadJuego.getVertexBufferObjectManager());\n attachChild(txtMarcador);\n }",
"Position_ordonnee createPosition_ordonnee();",
"public void afegirPosicio() {\n\t\tfor(int i=0; i<cal.length; ++i){\n\t\t\tcal[i] = new Dia(false);\n\t\t\tfor(int j=0; j<3; ++j) cal[i].getTorns()[j].setPosicio(i);\n\t\t}\n\t}",
"SpacesInvaders_recupererMarqueDeLaPosition createSpacesInvaders_recupererMarqueDeLaPosition();",
"public void setPosicion(){\n ejeX = 0;\n ejeY = 0;\n }",
"void establecerPuntoAM(int pos){\n this.emisoraAMActual = pos;\n }",
"Vaisseau_positionner createVaisseau_positionner();",
"public void Ordenamiento() {\n\n\t}",
"private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }",
"public void avancaPosicio(int[] posicions) {\n\n if (Arrays.equals(posicions, Const.FINISH_CODE)) {\n //Acaba la frame del joc\n v.closeFrame();\n return;\n }\n \n jugadors[0].getCentre().setX(posicions[0]);\n jugadors[0].getCentre().setY(posicions[1]);\n jugadors[1].getCentre().setX(posicions[2]);\n jugadors[1].getCentre().setY(posicions[3]);\n\n //Afegeix les noves posicions\n if ((jugadors[0].getCentre().getX() != -1) || (jugadors[0].getCentre().getY() != -1)){\n jugadors[0].addCoordToPath(new Coord(jugadors[0].getCentre()));\n }\n if ((jugadors[1].getCentre().getX() != -1) || (jugadors[1].getCentre().getY() != -1)){\n jugadors[1].addCoordToPath(new Coord(jugadors[1].getCentre()));\n }\n //Avisa a la Vista_Client\n avisarObservadors();\n\n }",
"public PosicaoXY retornarMovimento() {\n int retornoPosX = this.posXY.getPosX();\n int retornoPosY = this.posXY.getPosY();\n switch (movimento) {\n case CIMA: //se for para cima\n if (retornoPosX > 0) { \n retornoPosX -= 1;\n }\n break;\n case BAIXO: //se for para baixo\n if (retornoPosX < this.ambiente.getTamanhoAmbiente() - 1) {\n retornoPosX += 1;\n }\n break;\n case ESQUERDA: //se for para esquerda\n if (retornoPosY > 0) {\n retornoPosY -= 1;\n }\n break;\n case DIREITA://se for para direita\n if (retornoPosY < this.ambiente.getTamanhoAmbiente() - 1) {\n retornoPosY += 1;\n }\n break;\n }\n return new PosicaoXY(retornoPosX, retornoPosY);\n }",
"public void setPosicion(int posicion){\n _posicion = posicion;\n }",
"public logicaEnemigos(){\n\t\t//le damos una velocidad inicial al enemigo\n\t\tsuVelocidad = 50;\n\t\tsuDireccionActual = 0.0;\n\t\tposX = 500 ;\n\t\tposY = 10;\n\t}",
"@Override\npublic int getPosicao() {\n\treturn posicaoBaixoEscada;\n}",
"private void posicionePosicoes() {\n\t\tGroupLayout gl = new GroupLayout(this);\n\n\t\tgl.setAutoCreateContainerGaps(true);\n\t\tgl.setAutoCreateGaps(true);\n\n\t\tsetLayout(gl);\n\n\t\t// Horizontal\n\t\t{\n\t\t\tSequentialGroup sgDados = gl.createSequentialGroup();\n\t\t\tSequentialGroup sgProgresso = gl.createSequentialGroup();\n\n\t\t\tParallelGroup pg = gl.createParallelGroup(Alignment.LEADING);\n\n\t\t\tsgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tsgProgresso.addComponent(lresultado).addComponent(tfResultado);\n\t\t\tpg.addGroup(sgDados).addGroup(sgProgresso);\n\t\t\tgl.setHorizontalGroup(pg);\n\n\t\t}\n\n\t\t// Vertical\n\t\t{\n\t\t\tParallelGroup pgDados = gl.createParallelGroup(Alignment.CENTER);\n\t\t\tParallelGroup pgResultado = gl\n\t\t\t\t\t.createParallelGroup(Alignment.LEADING);\n\n\t\t\tSequentialGroup sg = gl.createSequentialGroup();\n\n\t\t\tpgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tpgResultado.addComponent(lresultado).addComponent(tfResultado);\n\n\t\t\tsg.addGroup(pgDados).addGroup(pgResultado);\n\n\t\t\tgl.setVerticalGroup(sg);\n\n\t\t}\n\n\t}",
"public void cargarDimensionPadre()\r\n/* 230: */ {\r\n/* 231:296 */ if (getMascara(this.dimension).equals(this.dimensionContable.getMascara())) {\r\n/* 232:297 */ this.dimensionContable.setIndicadorMovimiento(true);\r\n/* 233: */ } else {\r\n/* 234:299 */ this.dimensionContable.setIndicadorMovimiento(false);\r\n/* 235: */ }\r\n/* 236:302 */ this.listaDimensionContablePadre = this.servicioDimensionContable.obtenerListaDimensionPadre(this.dimensionContable);\r\n/* 237: */ }",
"public void cargarOpcionesPadre() {\n\t\tOpcionMenu elementoMenu = getElementoMenuActual();\n\t\tif(elementoMenu==null || elementoMenu.getOpcionMenuPadre() == null || elementoMenu.getOpcionMenuPadre().getOpcionMenuPadre() == null) {\n\t\t\tif(elementosMenu != elementosMenuRaiz) {\n\t\t\t\tsetElementosMenu(elementosMenuRaiz);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tOpcionSubMenu subMenu = (OpcionSubMenu) elementoMenu.getOpcionMenuPadre().getOpcionMenuPadre();\n\t\tif(subMenu!=null) {\n\t\t\tsetElementosMenu(subMenu.getHijos());\n\t\t}\n\t}",
"@Override\n\tpublic void posModify() {\n\t\t\n\t}",
"@Override\n\tpublic void posModify() {\n\t\t\n\t}",
"Position_abscisse createPosition_abscisse();",
"@Override\n public void movimiento_especial(){\n\n movesp=ataque/2;\n defensa+=5;\n PP= PP-4;\n }",
"public void morir()\r\n\t{\r\n\t\tif(this.grafico != null)\t\r\n\t\t\tthis.mover(4);\r\n\t}",
"private void ActualizaPosicionesFondos() {\n xFondo-=10; //Es el cursor de la posición\n xFondoBase-=10; //Aqui se puede implementar metodo de modificacion de velocidad de fondo.\n xFondoApoyo-=10;\n if (xFondo == -texturaFondoBase.getWidth()){\n xFondoBase = xFondoApoyo+texturaFondoApoyo.getWidth();\n cambiosFondo++;\n }\n if (xFondo == -(texturaFondoApoyo.getWidth()+texturaFondoBase.getWidth())) {\n xFondoApoyo = xFondoBase+texturaFondoBase.getWidth();\n cambiosFondo++;\n }\n }",
"public void moveM() {\r\n\t\tif (this.barcaIzq)\r\n\t\t\tthis.numMisioneros--;\r\n\t\telse\r\n\t\t\tthis.numMisioneros++;\r\n\r\n\t\tcambiarDeOrilla();\r\n\r\n\t}",
"void establecerPuntoFM(int pos){\n this.emisoraFMActual = pos;\n }",
"public void darCoordenadasIniciales() \r\n\t{\t\r\n\t\tint coordenadasX = 0;\r\n\t\tint coordenadasY = 1;\r\n\t\tint orientacion = 2;\r\n\t\t\r\n\t\tfor (int x = 0; x<palabras.size();x++) \r\n\t\t{\r\n\t\t\tpalabras.get(x).get(0).setX(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasX)));\r\n\t\t\tpalabras.get(x).get(0).setY(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasY)));\r\n\t\t\tpalabras.get(x).get(0).setOrientacion(manejadorArchivos.getPalabras().get(orientacion));\r\n\t\t\t\r\n\t\t\t coordenadasX = coordenadasX +4;\r\n\t\t\t coordenadasY = coordenadasY + 4;\r\n\t\t\t orientacion = orientacion + 4;\r\n\t\t}\r\n\t}",
"@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 iniciarNovaPartida(Integer posicao);",
"public void descolaPosicao();",
"protected void mover(){\r\n\t\r\n\t\t\r\n\t\tint centroX;\r\n\t\tint centroY;\r\n\t\tint radioGiro1;\r\n\t\tint coordX;\r\n\t\tint incrementoY;\r\n\t\tint diferenciaEnX;\r\n\t\t\r\n\t\tif(! this.entroAlCirculo){\r\n\t\t\tdirigirHaciaPunto(this.centroGiroX, (this.centroGiroY - this.radioGiro));\r\n\t\t}\r\n\t\t\r\n\t\telse{\t\t\t\t\r\n\t\t\t\r\n\t\t\tcentroX = this.centroGiroX;\r\n\t\t\tcentroY = this.centroGiroY;\r\n\t\t\tincrementoY = 1;\r\n\t\t\tradioGiro1 = this.radioGiro;\r\n\t\t\t\r\n\t\t\tif(this.x > centroX){\t\t\t\t\t\r\n\t\t\t\tthis.regresando = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.regresando){ //chequea si el avion se sobrepasa de los limites verticales del circulo, si es el caso cambia la direccion\r\n\t\t\t\t\r\n\t\t\t\tif((this.y - incrementoY) < (centroY - radioGiro1)){\r\n\t\t\t\t\tthis.regresando = false;\r\n\t\t\t\t}\r\n\t\t\t\telse{}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\tif((this.y + incrementoY) > (centroY + radioGiro1)){\r\n\t\t\t\t\t\tthis.regresando = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse{}\r\n\t\t\t}\t\t\t\r\n\t\t\tif ((this.y <= (centroGiroY + (radioGiro - incrementoY))) || (this.y >= (centroGiroY - (radioGiro - incrementoY)))){\r\n\t\t\t\t\r\n\t\t\t\tif(this.regresando){\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**calcula la posicion de x de acuerdo al movimiento en y, \r\n\t\t\t\t\t* con la formula de una circunferencia plana\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y - 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = coordX;\r\n\t\t\t\t\tthis.y -= incrementoY;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse{\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y + 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = centroX - diferenciaEnX;\r\n\t\t\t\t\tthis.y += incrementoY;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}",
"private void position(){\n\t\tpositionX=x;//coordonnees(dans la minimap) de la case ou on a clicke ou la fourmiliere(au debut).\n\t\tpositionY=y;\n\t\tboolean posX=false,posY=false;//Ces boolean me servent a savoir s'il a eu des changements sur les coordonnees.\n\t\tif(positionY-zoom/2<=0 ){//si ordonnee negative,ca veut dire qu'on est sorti de la minimap.\n\t\t\tpositionY=0;//pour pas etre hors du tableau on met l'ordonnee a 0\n\t\t\tposY=true;//et on indique qu'on a change les ordonnees.\n\t\t\t\t}\n\t\tif(positionX-zoom/2<=0){//si abscisse negative\n\t\t\tpositionX=0;\n\t\t\tposX=true;//on indique qu'on a change les abscisses.\n\t\t}\n\t\tif(positionY+zoom>=(finY-debutY)+1){//si ordonnee plus grand que la taille de la minimap.\n\t\t\tpositionY=heightCase*(finY-debutY)-zoom*heightCase;//on met donc ordonnees a la fin de la minimap (heightCase*(finY-debutY)) et on enleve la place(px) prise par le zoom. \n\t\t\tposY=true;//et on indique qu'on a change les ordonnees.\n\t\t}\n\t\tif(positionX+zoom>=(finX-debutX)+1){//si abscisse plus grand que la taille de la minimap.\n\t\t\tpositionX=widthCase*(finX-debutX)-zoom*widthCase;\n\t\t\tposX=true;\n\t\t}\n\t\tif(!posX) {//si on a pas change les abscisses\n\t\t\t\tpositionX=widthCase*positionX-zoom*widthCase/2;//pour trouver l'abscisse en px en multiplie positionX par la taille d'une case puis on enleve la place(px) prise par le zoom\n\t\t\t}\n\t\tif(!posY)//si on a pas change les ordonnees.\n\t\t\tpositionY=heightCase*positionY-zoom*heightCase/2;\n\t\t}",
"private void BajarPiezaRapido() {\n if (!Mover(piezaActual, posicionX, posicionY - 1)) {\r\n BajarPieza1posicion();\r\n }\r\n }",
"Position_changerOrdonnee createPosition_changerOrdonnee();",
"private void BajarPiezaAlInstante() {\n int newY = posicionY;\r\n while (newY > 0) {\r\n if (!Mover(piezaActual, posicionX, newY - 1)) {\r\n break;\r\n }\r\n --newY;\r\n }\r\n BajarPieza1posicion();\r\n }",
"Position_changerAbscisse createPosition_changerAbscisse();",
"@Override\npublic int mover() {\n\treturn posicaoTopoEscada;\n}",
"private void mueveObjetos()\n {\n // Mueve las naves Ufo\n for (Ufo ufo : ufos) {\n ufo.moverUfo();\n }\n \n // Cambia el movimiento de los Ufos\n if (cambiaUfos) {\n for (Ufo ufo : ufos) {\n ufo.cambiaMoverUfo();\n }\n cambiaUfos = false;\n }\n\n // Mueve los disparos y los elimina los disparos de la nave Guardian\n if (disparoGuardian.getVisible()) {\n disparoGuardian.moverArriba();\n if (disparoGuardian.getPosicionY() <= 0) {\n disparoGuardian.setVisible(false);\n }\n }\n\n // Dispara, mueve y elimina los disparos de las naves Ufo\n disparaUfo();\n if (disparoUfo.getVisible()) {\n disparoUfo.moverAbajo();\n if (disparoUfo.getPosicionY() >= altoVentana) {\n disparoUfo.setVisible(false);\n }\n }\n\n // Mueve la nave Guardian hacia la izquierda\n if (moverIzquierda) {\n guardian.moverIzquierda();\n }\n // Mueve la nave Guardian hacia la derecha\n if (moverDerecha) {\n guardian.moverDerecha();\n }\n // Hace que la nave Guardian dispare\n if (disparar) {\n disparaGuardian();\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 }",
"private void actualizarEnConsola() {\n\t\tfor(int i=0; i<elementos.size();i++){\n\t\t\tElemento e = elementos.get(i);\n\t\t\tSystem.out.println(e.getClass().getName()+\"- Posicion: , X: \"+e.getPosicion().getX()+\", Y: \"+ e.getPosicion().getY());\n\t\t}\n\t\t\n\t}",
"public void colocarMarcadores(){\n\n if(seeOnMap != 0){\n\n for (int n=0; n<c.getCount(); n++) {\n c.moveToPosition(n);\n Double lat = c.getDouble(c.getColumnIndex(\"lat\"));\n Double lng = c.getDouble(c.getColumnIndex(\"lon\"));\n String name = c.getString(c.getColumnIndex(\"title\"));\n\n map.addMarker(new MarkerOptions().position(new LatLng(lat, lng))\n .title(name));\n }\n }\n }",
"public void mostrarTareasEnPosicionImpar(){}",
"@Override\r\n public void moverAyuda() {\n System.out.println(\"La reina puede mover hacia cualquier dirección en linea recta / diagonal\");\r\n }",
"public void actualiza(){\r\n //pregunto si se presiono una tecla de dirección\r\n if(bTecla) {\r\n int iX = basPrincipal.getX();\r\n int iY = basPrincipal.getY();\r\n if(iDir == 1) {\r\n iY -= getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 2) {\r\n iX += getWidth() / iMAXANCHO;\r\n }\r\n if(iDir == 3) {\r\n iY += getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 4) {\r\n iX -= getWidth() / iMAXANCHO;\r\n }\r\n //limpio la bandera\r\n bTecla = false;\r\n \r\n //asigno posiciones en caso de no salirme\r\n if(iX >= 0 && iY >= 0 && iX + basPrincipal.getAncho() <= getWidth()\r\n && iY + basPrincipal.getAlto() <= getHeight()) {\r\n basPrincipal.setX(iX);\r\n basPrincipal.setY(iY);\r\n } \r\n }\r\n \r\n //Muevo los chimpys\r\n for(Base basChimpy : lklChimpys) {\r\n basChimpy.setX(basChimpy.getX() - iAceleracion);\r\n }\r\n \r\n //Muevo los diddys\r\n for(Base basDiddy : lklDiddys) {\r\n basDiddy.setX(basDiddy.getX() + iAceleracion);\r\n }\r\n\r\n }",
"public void mou(){\n\n this.setY(getY() + getVelocitatY());\n this.setX(getX() + getVelocitatX());\n\n }",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"private Posicion posicionAlDesarmarSuperion(Posicion posicion) {\n\t\tPosicion posAux;\n\t\ttry{\n\t\t\tposAux=new Posicion(posicion.getFila(),posicion.getColumna()-2);\n\t\t}catch(ErrorPosicionInvalida e){\n\t\t\tposAux=new Posicion(posicion.getFila(),posicion.getColumna()+1);\n\t\t}\n\t\t\n\t\treturn posAux;\n\t}",
"SpacesInvaders_positionnerUnNouveauVaisseau createSpacesInvaders_positionnerUnNouveauVaisseau();",
"SpacesInvaders_positionnerUnNouveauVaisseau createSpacesInvaders_positionnerUnNouveauVaisseau();",
"private void moverFondo() {\n ActualizaPosicionesFondos();\n noAleatorio = MathUtils.random(1, 5); // crea los numeros para cambiar los mapas de manera aleatoria\n if (xFondo == -texturaFondoBase.getWidth()){\n //Cambio de fondo base\n texturaFondoBase= mapaAleatorio(noAleatorio);\n modificacionFondoBase= true; //Avisa que ya se modifico los fondos de inicio.\n }\n if (xFondo == -(texturaFondoApoyo.getWidth()+texturaFondoBase.getWidth())){\n //Cambio fondo de apoyo\n texturaFondoApoyo= mapaAleatorio(noAleatorio);\n xFondo= 0; //al pasar el segundo fondo regresa el puntero al primer fondo.\n modificacionFondoBase= true; //Avisa que ya se modifico los fondos de inicio.\n }\n }",
"private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }",
"@Override\n\tpublic void posModify() {\n\t\tgetEntityManager().refresh(instance);\n\t\tcambiarTipoCuenta(instance);\n\t\tgetEntityManager().flush();\n\t\tgetEntityManager().refresh(instance);\n\t\tresultList = null;\n\t\trootNode = null;\n\t}",
"public void moverIzquierda() {\n estado = EstadosPersonaje.IZQUIERDA;\n mover(new Vector2(-1, 0));\n }",
"public DAOPedidoMesa() {\n\t\trecursos = new ArrayList<Object>();\n\t}",
"public void setPosEnEntrante(Position<Arco<E>> pos){\r\n\t\tposV2 = pos;\r\n\t}",
"public void setPosEnArcos(Position<Arco<E>> pos){\r\n\t\tposLA = pos;\r\n\t}",
"public Regras()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1100, 457, 1); \n prepare();\n if(MenuPrincipal.mundo == 1) //se o mundo anterior tiver sido MenuPrincipal\n som1 = MenuPrincipal.som2; //a música ficar com a mesma opção do mundo Menu Principal (a tocar ou sem som)}\n else if(MenuPrincipal.mundo == 3) //se o mundo anterior tiver sido MundoJogo\n som1 = MundoJogo.som3; //a música ficar com a mesma opção do mundo MundoJogo (a tocar ou sem som)\n imgsom2 = MenuPrincipal.imgsom1; //atualiza a imagem da coluna para ser igual à do mundo MenuPrincipal (mute/unmute)\n MenuPrincipal.mundo = 2; //atualizar 'mundo' para indicar que o mundo atual é o mundo Regras\n }",
"@Override\n\tpublic void modificada(Mao m, Participante p) {\n\t\t\n\t}",
"public void moverAPacman(Direccion direccion) {\n // TODO implement here\n }",
"@Override\r\n\tpublic String[][] mostraPosicao(String[][] mapa) {\n\t\treturn null;\r\n\t}",
"private Vector2d generateNewPositionForChild()\n {\n\n Random generator = new Random();\n List<Vector2d> freePositions = new LinkedList<>(); //tutaj przechowywane sa wolne pozycje wokol\n Vector2d position;\n Directions directionToAdd;\n\n for(int i = 0; i<8; i++)\n {\n directionToAdd = new Directions(i); //wykorzystujemy klase directions do generowania pozycji wokol\n position = this.position.add(directionToAdd.move());\n if(map.animalsAt(position).isEmpty())\n {\n freePositions.add(position);\n }\n }\n\n if(freePositions.isEmpty()) //jezeli nie ma wolnych pozycji\n {\n //jesli nie ma wolnych pozycji\n int x = generator.nextInt(8);\n directionToAdd = new Directions(x);\n return this.position.add(directionToAdd.move());\n }\n\n //jezeli mamy wolne pozycje to generujemy dowolna z listy\n int x = generator.nextInt(freePositions.size());\n Vector2d newPosition = freePositions.get(x);\n\n return newPosition;\n }",
"public void setPos(Punto pos) {\n\t\tthis.pos = pos;\n\t}",
"private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}",
"@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}",
"public void setPosEnSaliente(Position<Arco<E>> pos){\r\n\t\tposV1 = pos;\r\n\t}",
"public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}",
"public Dipendente() {\r\n\t\tsetnMat();\r\n\t}",
"public void setPosicionMapa() {\n\t\txmapa = mapaTile.getx();\n\t\tymapa = mapaTile.gety();\n\t}",
"private void aumentaCapacidade(){\n\t\tif(this.tamanho == this.elementos.length){\n\t\t\tObject[] elementosNovos = new Object[this.elementos.length*2];\n\t\t\tfor(int i =0; i<this.elementos.length;i++){\n\t\t\t\telementosNovos[i]=this.elementos[i];\n\t\t\t}\n\t\t\tthis.elementos=elementosNovos;\n\t\t}\n\t}",
"public void attrito(){\n yCord[0]+=4;\n yCord[1]+=4;\n yCord[2]+=4;\n //e riaggiorna i propulsori (che siano attivati o no) ricalcolandoli sulla base delle coordinate dell'astronave, cambiate\n aggiornaPropulsori();\n \n }",
"private void agregarMarcador(double lat, double lon, Meteo maMeteo) {\n if(mMap != null){\n if(marker != null){\n marker.setPosition(new LatLng(lat, lon));\n marker.setTag(maMeteo);\n }else{\n marker = mMap.addMarker(new MarkerOptions().position(new LatLng(lat,lon)));\n marker.setTag(maMeteo);\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(lat, lon)));\n }\n }",
"public void colocarBomba() \r\n {\r\n \tBomba bom;\r\n \tCelda c= miJuego.getNivel(0).getCelda(this.posX, this.posY);\r\n \tif(!dios)\r\n \t{\r\n \t\tif(misBombas.size()>0)\r\n \t\t{\r\n \t\t\tif(c.getBomba()==null){\r\n \t\t\t\tbom=misBombas.remove(misBombas.size()-1);\r\n \t\t\t\tbom.setUbicacion(c);\r\n \t\t\t\tmiJuego.getGui().agregarJuego(bom.getGrafico().getGrafico(),20);\r\n \t\t\t\tbom.getGrafico().setPos(posX, posY);\r\n \t\t\t\tc.colocarBomba(bom);\r\n \t\t\t\tbom=null;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tbom=new Bomba(this);\r\n \t\tbom.setUbicacion(c);\r\n\t\t\tmiJuego.getGui().agregarJuego(bom.getGrafico().getGrafico(),20);\r\n \t\tbom.getGrafico().setPos(posX, posY);\r\n \t\tc.colocarBomba(bom);\r\n \t\tbom=null;\r\n \t}\r\n \r\n }",
"public void asignarPedido(Pedido pedido){\n\t\tdouble costeMin=100000;\n\t\tint pos=0;\n\t\t\n\t\tif (pedido.getPeso()<PESOMAXMOTO) {\n\t\tif(motosDisponibles.size()!=0){\n\t\t \n\t\t\tpos=0;\n\t\t\t//Damos como primer valor el de primera posición\n\t\t\t\n\t\t\tcosteMin=pedido.coste(motosDisponibles.get(0));\n\t\t\t\n\t\t\t//Ahora vamos a calcular el min yendo uno por uno\n\t\t\t\n\t\t\tfor(int i=0; i<motosDisponibles.size(); i++){\n\t\t\t\tif(costeMin>pedido.coste(motosDisponibles.get(i))){\n\t\t\t\t\tcosteMin=pedido.coste(motosDisponibles.get(i));\n\t\t\t\t\tpos=i;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Una vez hallada la moto de menor coste la asignamos\n\t\t\tpedido.setTransporte(motosDisponibles.get(pos));\n\t\t\tmotosDisponibles.removeElementAt(pos);\n\t\t\t\n\t\t \n\t\t}\n\t\telse {\n\t\t\tpedidosEsperandoMoto.add(pedidosEsperandoMoto.size(),pedido);\n\t\t}\n\t\t}\n\t\t\n\t\telse {\n\t\t\tif (furgonetasDisponibles.size()!=0){\n\t\t\tcosteMin = pedido.coste(furgonetasDisponibles.get(0));\n\t\t\tfor(int i=0; i<furgonetasDisponibles.size(); i++){\n\t\t\t\tif(costeMin>pedido.coste(furgonetasDisponibles.get(i))){\n\t\t\t\t\tcosteMin=pedido.coste(furgonetasDisponibles.get(i));\n\t\t\t\t\tpos=i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tpedido.setTransporte(furgonetasDisponibles.get(pos));\n\t\t\tfurgonetasDisponibles.removeElementAt(pos);\n\t\t}\n\t\t\telse{\n\t\t\t\tpedidosEsperandoFurgoneta.add(pedidosEsperandoFurgoneta.size(),pedido);\n\t\t\t}\n\t\t}\n\t}",
"private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }",
"Position_Position createPosition_Position();",
"void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }",
"Position getNewPosition();",
"public void disparoDireccional(int tipo, float posX, float posY) {\n float x = posX - 58;\n float y = posY - 72;\n switch(tipo) {\n case 1: \n crearProyectilG2(x, y, -1, -1);\n crearProyectilG2(x, y, 0, -1); \n crearProyectilG2(x, y, 1, -1);\n break;\n case 2:\n crearProyectilG2(x, y, -1, -1);\n crearProyectilG2(x, y, 0, -1); \n crearProyectilG2(x, y, -1, 0);\n break;\n case 3: \n crearProyectilG2(x, y, -1, -1);\n crearProyectilG2(x, y, -1, 0);\n crearProyectilG2(x, y, -1, 1); \n break;\n case 4:\n crearProyectilG2(x, y, -1, 0); \n crearProyectilG2(x, y, -1, 1);\n crearProyectilG2(x, y, 0, 1);\n break;\n case 5:\n crearProyectilG2(x, y, -1, 1); \n crearProyectilG2(x, y, 0, 1);\n crearProyectilG2(x, y, 1, 1);\n break;\n case 6:\n crearProyectilG2(x, y, 0, 1); \n crearProyectilG2(x, y, 1, 1);\n crearProyectilG2(x, y, 1, 0);\n break;\n case 7:\n crearProyectilG2(x, y, 1, -1); \n crearProyectilG2(x, y, 1, 0);\n crearProyectilG2(x, y, 1, 1);\n break;\n case 8:\n crearProyectilG2(x, y, 0, -1); \n crearProyectilG2(x, y, 1, -1);\n crearProyectilG2(x, y, 1, 0);\n break;\n }\n }",
"@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}",
"private void dibujarMarcador() {\n\n\t\tText tituloMarcador = new Text(\"Marcador\");\n\t\ttituloMarcador.setFont(new Font(16));\n\n\t\tText tituloJuega = new Text(\"Juega\");\n\t\ttituloJuega.setFont(new Font(16));\n\t\t\n\t\tcantidadFichasNegras = new Label();\n\t\tcantidadFichasBlancas = new Label();\n\t\tjugadorActual = new Label();\n\n\t\tGridPane marcador = new GridPane();\n\t\tmarcador.setAlignment(Pos.TOP_CENTER);\n\t\tmarcador.setHgap(20);\n\t\tmarcador.setVgap(20);\n\t\tmarcador.setPadding(new Insets(20));\n\t\tmarcador.add(tituloMarcador, 0, 0, 2, 1);\n\t\tmarcador.add(new Label(\"Negras :\"), 0, 1);\n\t\tmarcador.add(cantidadFichasNegras, 1, 1);\n\t\tmarcador.add(new Label(\"Blancas :\"), 0, 2);\n\t\tmarcador.add(cantidadFichasBlancas, 1, 2);\n\t\tmarcador.add(tituloJuega, 0, 3, 2, 1);\n\t\tmarcador.add(jugadorActual, 0, 4, 2, 1);\n\n\t\tpanel.setPadding(new Insets(5));\n\t\tpanel.setRight(marcador);\n\t}",
"public void addPrimero(Object obj) {\n if (cabeza == null) { //Si la cabeza es nula, entoces se creará un nuevo nodo donde le pasaremos el valor de obj\n cabeza = new Nodo(obj);\n } else { //Si no es nula, signifa que el valor que se ingrese, pasara a ser la nueva cabeza\n Nodo temp = cabeza; //Metemos la cabeza en un nodo temporal\n Nodo nuevo = new Nodo(obj); //Creamos un nuevo nodo, que no está enlazado\n nuevo.enlazarSiguiente(temp); //Y el nuevo nodo lo enlazamos a el nodo Temp, que contenia el valor anterior de la otra cabeza\n cabeza = nuevo; //Y ahora le decimos que la cabeza sera nuevo\n }\n size++; //Cada vez que agreguemos un nuevo nodo el tamaño de nuestra lista tendra que aumentar\n }",
"public void actualiza() {\n //Si el indice de bloque a mover no es -1(no hay que mover bloque)...\n if(bAvanzaBloque) {\n for (Object objeBloque : lnkBloques) {\n Objeto objBloque = (Objeto) objeBloque;\n //Mueves los bloques que hay que mover\n if(objBloque.getVelocidad()!=0) {\n objBloque.abajo();\n }\n }\n }\n //Si la direccion X es true(el proyectil va a la derecha)\n if (bDireccionX) {\n objProyectil.derecha();\n } //Si es false (va ala izquierda)\n else {\n objProyectil.izquierda();\n }\n\n //Si la direccion Y es true(el proyectil va hacia arriba)\n if (!bDireccionY) {\n objProyectil.arriba();\n } //Si es false (va hacia abajo)\n else {\n objProyectil.abajo();\n }\n\n if (iNumBloques == 0) { // Si se acaban los bloques\n iNumBloques = 54; // Se reinicia la variable de los bloques\n iNivel++; // Aumenta el nivel\n // Se reposiciona el proyectil\n objProyectil.reposiciona((objBarra.getX() + objBarra.getAncho() / 2\n - (objProyectil.getAncho() / 2)), (objBarra.getY()\n - objProyectil.getAlto()));\n // Se aumenta la velocidad del proyectil\n objProyectil.setVelocidad(objProyectil.getVelocidad() + 3);\n // Se reposiciona la barra\n objBarra.reposiciona(((getWidth() / 2)\n - (objProyectil.getAncho() / 2)), (getHeight()\n - objBarra.getAlto()));\n // se limpia la lista de bloques\n lnkBloques.clear();\n // se vuelve a llenar y se acomoda\n try {\n acomodaBloques();\n } catch (IOException ioeError) {\n System.out.println(\"Hubo un error al cargar el juego: \"\n + ioeError.toString());\n }\n // se mueve hacia arriba el proyectil\n bDireccionY = false;\n bDireccionX = true;\n }\n\n if (iVidas == 0) {\n bPerdio = true;\n }\n /*if (iVidas == 0) {\n bPerdio = true;\n bPausado = true;\n iNumBloques = 54; // se reinicia la cantidad de bloques\n iNivel = 1; // vuelve al nivel 1\n // La direccion del proyectil sera para arrib\n bDireccionY = false;\n // La direccion que nos interesa es: false: Izq. true: Dererecha\n bDireccionX = true;\n // Se reposiciona el proyectil\n objProyectil.reposiciona((objBarra.getX() + objBarra.getAncho() / 2\n - (objProyectil.getAncho() / 2)), (objBarra.getY()\n - objProyectil.getAlto()));\n // Se reincia la velocidad del proyectil\n objProyectil.setVelocidad(5);\n // Se reposiciona la barra\n objBarra.reposiciona(((getWidth() / 2) \n - (objProyectil.getAncho() / 2)), (getHeight() \n - objBarra.getAlto()));\n // se limpia la lista de bloques\n lnkBloques.clear();\n // se vuelve a llenar y se acomoda\n try {\n acomodaBloques();\n } catch (IOException ioeError) {\n System.out.println(\"Hubo un error al cargar el juego: \"\n + ioeError.toString());\n }\n }\n \n if (!bPerdio) {\n iVidas = 3; // se reinicia la cantidad de vidas\n iScore = 0; // se reincia el score\n }*/\n }",
"public void moverAbajo() {\n estado = EstadosPersonaje.QUIETO;\n mover(new Vector2(0, -1));\n }",
"public ListaPalabras() {\n\n //pos=0;\n }",
"public void revisaColisionMapa() {\n\t\tactualCol = (int)x / tamTile;\n\t\tactualRen = (int)y / tamTile;\n\t\t\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\t\t\n\t\txtemp = x;\n\t\tytemp = y;\n\t\t\n\t\tcalcularEsquinas(x, ydest);\n\t\tif(dy < 0) {\n\t\t\tif(arribaIzq || arribaDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = actualRen * tamTile + claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\tif(dy > 0) {\n\t\t\tif(abajoIzq || abajoDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tcayendo = false;\n\t\t\t\tytemp = (actualRen + 1) * tamTile - claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcalcularEsquinas(xdest, y);\n\t\tif(dx < 0) {\n\t\t\tif(arribaIzq || abajoIzq) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = actualCol * tamTile + clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif(dx > 0) {\n\t\t\tif(arribaDer || abajoDer) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (actualCol + 1) * tamTile - clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!cayendo) {\n\t\t\tcalcularEsquinas(x, ydest + 1);\n\t\t\tif(!abajoIzq && !abajoDer) {\n\t\t\t\tcayendo = true;\n\t\t\t}\n\t\t}\n\t}",
"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 PosicaoMapa pegaPosicaoIndice(int indice)\n\t{\n\t\treturn posicoes.get(indice);\n\t}",
"private void imprimir() {\n\t\ttry {\n\t\t\tPrintWriter pr = new PrintWriter(super.salida);\n\t\t\tfor (Nodo nodo : this.solucion) {\n\t\t\t\tpr.println(nodo.getPosicionX() + \" \" + nodo.getPosicionY());\n\t\t\t}\n\t\t\tpr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void darCoordenadas() {\r\n\t\t\r\n\t\tfor(int x = 0; x<palabras.size(); x++) {\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"V\")) {\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaY++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\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\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"H\") ) {\r\n\t\t\t\t\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaX++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\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}",
"private void positionMinimap(){\n\t\tif(debutX<0)//si mon debutX est negatif(ca veut dire que je suis sorti de mon terrain (ter))\n\t\t\tdebutX=0;\n\t\tif(debutX>ter.length)//si debutX est plus grand que la taille de mon terrain(ter).\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY<0)\n\t\t\tdebutY=0;\n\t\tif(debutY>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\tif(debutX+100>ter.length)\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY+100>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\t//cette fonction est appelee uniquement si le terrain est strictement Superieur a 100\n\t\t// Donc je sais que ma fin se situe 100 cases apres.\n\t\tfinX=debutX+100;\n\t\tfinY=debutY+100;\n\t}",
"public ArrayList<Elemento> getPosicionesAdyacentes(){\n ArrayList <Elemento> result = new ArrayList<>();\n int[] coordenada_i = {0,1,1,1,0,-1,-1,-1};\n int[] coordenada_j = {1,1,0,-1,-1,-1,0,1};\n int nueva_posicion_fila = 0;\n int nueva_posicion_columna = 0;\n for(int k=0; k<8; k++){\n nueva_posicion_fila = fila + coordenada_i[k];\n nueva_posicion_columna = columna + coordenada_j[k];\n \n if((0 <= nueva_posicion_fila) && (nueva_posicion_fila < automata.getAutomata().length) && \n (0<= nueva_posicion_columna) && (nueva_posicion_columna < automata.getAutomata()[0].length)){\n result.add(automata.getElemento(nueva_posicion_fila,nueva_posicion_columna));\n \n }\n \n }\n return result;\n }",
"private void preenchePosicoes(List<Par<Integer,Integer>> posicoes, \n\t\t\tEstadoAmbiente estado) {\n\t\tfor (Par<Integer,Integer> p : posicoes) {\n\t\t\tthis.quadricula[p.primeiro()][p.segundo()] = estado;\n\t\t}\n\t}",
"public Cobra()\r\n {\r\n super();\r\n corpo = new ArrayList<CorpoCobra>();\r\n\r\n porCrescer = 0;\r\n ovosComidos = 0;\r\n vidas = 3;\r\n tonta = 0;\r\n }",
"public PosicionArista() {\n this(new Posicion(), OrientacionArista.Este);\n }",
"private void makePOSMenu() {\r\n\t\tJMenu POSMnu = new JMenu(\"Punto de Venta\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Cotizaciones\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Cotizaciones\", \r\n\t\t\t\t\timageLoader.getImage(\"quote.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Ver el listado de cotizaciones\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F4, 0), Quote.class);\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Compra\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Compras\", \r\n\t\t\t\t\timageLoader.getImage(\"purchase.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F5, 0), Purchase.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Facturacion\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion\", \r\n\t\t\t\t\timageLoader.getImage(\"invoice.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F6, 0), Invoice.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tPOSMnu.setMnemonic('p');\r\n\t\t\tadd(POSMnu);\r\n\t\t}\r\n\t}",
"public Nodo_m_ario(Nodo_m_ario padre, int val, int m) {\n\t\tchiave = val;\n\t\tgrado = m;\n\t\tthis.padre = padre;\n\t\tfigli = new Nodo_m_ario[grado];\n\t\tradice = false;\n\t}",
"public void mueve( double tiempoDeMovimiento, double giro) {\n\t\tif (giro > 0){\n\t\t\tsetPosX( posX + (suVelocidad*4) * Math.sin(suDireccionActual+giro/180.0*Math.PI) * tiempoDeMovimiento );\n\t\t} else {\n\t\t\tsetPosX( posX + suVelocidad * Math.sin(suDireccionActual+giro/180.0*Math.PI) * tiempoDeMovimiento );\n\t\t}\n\t\tsetPosY( posY + suVelocidad * -Math.cos(suDireccionActual/180.0*Math.PI) * tiempoDeMovimiento );\n\n\t\t// el negativo es porque en pantalla la Y crece hacia abajo y no hacia arriba\n\t}",
"public void agregarAlinicio(int el){\n if(!estVacia()){\n inicio=new NodoDoble(el, inicio, null);\n inicio.siguiente.anterior=inicio;\n }else{\n inicio=fin=new NodoDoble(el);\n }\n }",
"private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }",
"public Posizione getPosizione() {\n return posizione;\n }"
] | [
"0.67552775",
"0.6316757",
"0.6281596",
"0.6240726",
"0.6235424",
"0.6200949",
"0.61771834",
"0.6147352",
"0.61412054",
"0.61371225",
"0.6097323",
"0.60509527",
"0.60214454",
"0.60153276",
"0.6009133",
"0.59940284",
"0.5972928",
"0.5972206",
"0.59709525",
"0.59709525",
"0.59539574",
"0.59421366",
"0.59360904",
"0.59081167",
"0.5898189",
"0.5892497",
"0.5872578",
"0.5850843",
"0.58422685",
"0.58394057",
"0.583571",
"0.583222",
"0.5827971",
"0.58274794",
"0.5823589",
"0.58181936",
"0.5813301",
"0.5801765",
"0.57966447",
"0.5777029",
"0.57594097",
"0.57550067",
"0.57324994",
"0.57324106",
"0.57291645",
"0.57186735",
"0.5717171",
"0.57121",
"0.57121",
"0.56970376",
"0.56945693",
"0.5676414",
"0.56684136",
"0.56672585",
"0.5649571",
"0.5634819",
"0.5634007",
"0.56091404",
"0.5597687",
"0.55958164",
"0.55923194",
"0.5575911",
"0.55730313",
"0.5572159",
"0.5562257",
"0.55580145",
"0.5554704",
"0.5552066",
"0.55497223",
"0.55493164",
"0.5546456",
"0.5546112",
"0.5540636",
"0.5532475",
"0.5532266",
"0.5531468",
"0.55284935",
"0.5526507",
"0.55199385",
"0.5517365",
"0.54963607",
"0.54873115",
"0.548708",
"0.54849505",
"0.54847395",
"0.54814005",
"0.5475119",
"0.5474477",
"0.5470401",
"0.5465354",
"0.5454834",
"0.5450007",
"0.5438859",
"0.54374623",
"0.5437035",
"0.54295343",
"0.54257333",
"0.5421726",
"0.54211324",
"0.54207075"
] | 0.54385585 | 93 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.opciones_principal, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.724863",
"0.7203384",
"0.7197011",
"0.71784776",
"0.71090055",
"0.7040796",
"0.7039464",
"0.7013998",
"0.70109546",
"0.6982435",
"0.6946134",
"0.6939684",
"0.6935636",
"0.69193685",
"0.69193685",
"0.6892893",
"0.6884914",
"0.68768066",
"0.68763",
"0.68635243",
"0.68635243",
"0.68635243",
"0.68635243",
"0.6854071",
"0.68483156",
"0.6820635",
"0.6818679",
"0.68139905",
"0.68138844",
"0.68138844",
"0.68068254",
"0.68019366",
"0.67988884",
"0.6792257",
"0.6791312",
"0.67894673",
"0.6785093",
"0.67605865",
"0.67587006",
"0.67494637",
"0.6745356",
"0.6745356",
"0.67428446",
"0.6741961",
"0.6726888",
"0.67248803",
"0.67236483",
"0.67236483",
"0.6722583",
"0.6712873",
"0.6707795",
"0.67058164",
"0.67011815",
"0.669981",
"0.66978544",
"0.6695866",
"0.66877913",
"0.66849333",
"0.66849333",
"0.6684108",
"0.66811496",
"0.6680523",
"0.6678561",
"0.6669383",
"0.66685265",
"0.6664329",
"0.6658405",
"0.6658405",
"0.6658405",
"0.66576266",
"0.6655998",
"0.6655998",
"0.6655998",
"0.6653282",
"0.66530126",
"0.6651592",
"0.6650151",
"0.6648575",
"0.6647844",
"0.6647643",
"0.6647611",
"0.66465765",
"0.6646401",
"0.6644694",
"0.6643749",
"0.6643608",
"0.6640089",
"0.66356236",
"0.6634635",
"0.6633641",
"0.6633641",
"0.6633641",
"0.66333216",
"0.6630465",
"0.66291285",
"0.662822",
"0.66277045",
"0.6625648",
"0.6621995",
"0.6620415",
"0.6620415"
] | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] | [
"0.79039484",
"0.78061193",
"0.7765948",
"0.772676",
"0.76312095",
"0.76217103",
"0.75842994",
"0.7530533",
"0.748778",
"0.7458179",
"0.7458179",
"0.7438179",
"0.74213266",
"0.7402824",
"0.7391232",
"0.73864055",
"0.7378979",
"0.73700106",
"0.7362941",
"0.73555434",
"0.73453045",
"0.7341418",
"0.7330557",
"0.7327555",
"0.7326009",
"0.7318337",
"0.73160654",
"0.73132724",
"0.73037714",
"0.73037714",
"0.73011225",
"0.7297909",
"0.7293188",
"0.72863173",
"0.7282876",
"0.72807044",
"0.72783154",
"0.72595924",
"0.72595924",
"0.72595924",
"0.7259591",
"0.72591716",
"0.7249715",
"0.72243243",
"0.7219297",
"0.7216771",
"0.72042644",
"0.72012293",
"0.7199543",
"0.7193037",
"0.7184855",
"0.7177254",
"0.7168334",
"0.7167477",
"0.71536905",
"0.7153523",
"0.7135821",
"0.7134834",
"0.7134834",
"0.7128953",
"0.7128911",
"0.71241933",
"0.7123363",
"0.71228945",
"0.71219414",
"0.7117495",
"0.71173275",
"0.71169853",
"0.7116851",
"0.7116851",
"0.7116851",
"0.7116851",
"0.71148705",
"0.7112308",
"0.7109725",
"0.71084905",
"0.71055764",
"0.70995593",
"0.7098301",
"0.7096311",
"0.70935965",
"0.70935965",
"0.7086441",
"0.7082852",
"0.70806813",
"0.70801675",
"0.7073609",
"0.70681775",
"0.7061872",
"0.7060011",
"0.7059868",
"0.70513153",
"0.7037599",
"0.7037599",
"0.7036033",
"0.70353055",
"0.70353055",
"0.70322436",
"0.70304227",
"0.70294935",
"0.70187974"
] | 0.0 | -1 |
Handle navigation view item clicks here. | @SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
Button reporte = (Button) findViewById(R.id.button9);
if (id == R.id.nav_report) {
mMap.clear();
reporte.setVisibility(View.VISIBLE);
agregarMarcador(posX, posY);
} else if (id == R.id.nav_mLugares) {
new Thread(new Runnable() {
@Override
public void run() {
misReportes();
runOnUiThread(new Runnable() {
@Override
public void run() {
mMap.clear();
misMarcadores();
}
});
}
}).start();
}/* else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
}*/
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }",
"void onDialogNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }",
"@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\n\t\tLog.d(\"SomeTag\", \"Get click event at position: \" + itemPosition);\r\n\t\tswitch (itemPosition) {\r\n\t\tcase 1:\r\n\t\t\tIntent i = new Intent();\r\n\t\t\ti.setClass(getApplicationContext(), MainActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\tcase 2 :\r\n\t\t\tIntent intent = new Intent(this,WhiteListActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }",
"@Override\n\tpublic void rightNavClick() {\n\t\t\n\t}",
"@Override\n public void OnItemClick(int position) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}",
"@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}",
"@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }",
"@Override\n public void onItemClick(int pos) {\n }",
"@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }",
"private void handleNavClick(View view) {\n final String label = ((TextView) view).getText().toString();\n if (\"Logout\".equals(label)) {\n logout();\n }\n if (\"Profile\".equals(label)) {\n final Intent intent = new Intent(this, ViewProfileActivity.class);\n startActivity(intent);\n }\n if (\"Search\".equals(label)){\n final Intent intent = new Intent(this, SearchActivity.class);\n startActivity(intent);\n }\n if (\"Home\".equals(label)) {\n final Intent intent = new Intent(this, HomeActivity.class);\n startActivity(intent);\n }\n }",
"void onMenuItemClicked();",
"@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.tvSomeText:\n listener.sendDataToActivity(\"MainActivity: TextView clicked\");\n break;\n\n case -1:\n listener.sendDataToActivity(\"MainActivity: ItemView clicked\");\n break;\n }\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}",
"@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}",
"@Override\n public void onItemClick(View view, String data) {\n }",
"abstract public void onSingleItemClick(View view);",
"@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }",
"@Override\n public void itemClick(int pos) {\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView textView = (TextView)view;\n switch(textView.getText().toString()){\n case \"NavBar\":\n Intent nav = new Intent(this, NavDrawerActivity.class);\n startActivity(nav);\n break;\n }\n\n //Toast.makeText(MainActivity.this,\"Go to \" + textView.getText().toString() + \" page.\",Toast.LENGTH_LONG).show();\n }",
"@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}",
"@Override\n public void onItemClick(Nson parent, View view, int position) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }",
"@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }",
"@Override\n\t\tpublic void onClick(View view) {\n\t\t\tif (iOnItemClickListener != null) {\n\t\t\t\tiOnItemClickListener.onItemClick(view, null, getAdapterPosition());\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"public void onItemClick(View view, int position);",
"@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n public void onItemOfListClicked(Object o) {\n UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o);\n navController.navigate(action);\n }",
"@Override\n public void onClick(View view) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_DEFAULT,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_ds_note) {\n // Handle the camera action\n } else if (id == R.id.nav_ds_todo) {\n\n } else if (id == R.id.nav_ql_the) {\n\n } else if (id == R.id.nav_tuychinh) {\n Intent intent = new Intent(this, CustomActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}",
"@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }",
"@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"void onLinkClicked(@Nullable ContentId itemId);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:\n Intent homeIntent = new Intent(this, MainActivity.class);\n startActivity(homeIntent);\n break;\n case R.id.send_email:\n Intent mailIntent = new Intent(this, ContactActivity.class);\n startActivity(mailIntent);\n break;\n case R.id.send_failure_ticket:\n Intent ticketIntent = new Intent(this, TicketActivity.class);\n startActivity(ticketIntent);\n break;\n case R.id.position:\n Intent positionIntent = new Intent(this, LocationActivity.class);\n startActivity(positionIntent);\n break;\n case R.id.author:\n UrlRedirect urlRed = new UrlRedirect(this.getApplicationContext(),getString(R.string.linkedinDeveloper));\n urlRed.redirect();\n break;\n default:\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_main_activity);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@SuppressWarnings(\"ConstantConditions\")\n public void onItemClicked(@NonNull Item item) {\n getView().openDetail(item);\n }",
"void onItemClick(View view, int position);",
"@Override\n public void onClick(View v) {\n startNavigation();\n }",
"void onItemClick(int position);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logs) {\n startActivity(new Intent(this, LogView.class));\n } else if (id == R.id.nav_signOut) {\n signOut();\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onClick(View v) {\n if(listener!=null & getLayoutPosition()!=0)\n listener.onItemClick(itemView, getLayoutPosition());\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}",
"@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tHashMap<String, Object> item = (HashMap<String, Object>) arg0\n\t\t\t\t\t\t.getAdapter().getItem(arg2);\n\n\t\t\t\tIntent intent = new Intent(ViewActivity.this,\n\t\t\t\t\t\tContentActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"_id\", item.get(\"_id\").toString());\n\t\t\t\tbundle.putString(\"_CityEventID\", item.get(\"_CityEventID\")\n\t\t\t\t\t\t.toString());\n\t\t\t\tbundle.putString(\"_type\", String.valueOf(_type));\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }",
"void clickItem(int uid);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_categories) {\n Intent intent = new Intent(getApplicationContext(), CategoryActivity.class);\n startActivity(intent, compat.toBundle());\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"category\");\n\n } else if (id == R.id.nav_top_headlines) {\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"home\");\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent, compat.toBundle());\n } else if (id == R.id.nav_search) {\n // Do nothing\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(View view, int position) {\n\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_orders) {\n\n Intent orderStatusIntent = new Intent(Home.this , OrderStatus.class);\n startActivity(orderStatusIntent);\n\n } else if (id == R.id.nav_banner) {\n\n Intent bannerIntent = new Intent(Home.this , BannerActivity.class);\n startActivity(bannerIntent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }",
"public void onItemClick(View view, int position) {\n\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}",
"void onClick(View item, View widget, int position, int which);",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n Intent intent;\n switch(item.getItemId()){\n case R.id.nav_home:\n finish();\n intent = new Intent(this, NavigationActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_calendar:\n finish();\n intent = new Intent(this, EventHome.class);\n startActivity(intent);\n return true;\n case R.id.nav_discussion:\n return true;\n case R.id.nav_settings:\n intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_app_blocker:\n intent = new Intent(this, AppBlockingActivity.class);\n startActivity(intent);\n return true;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case R.id.nav_home:\n break;\n\n case R.id.nav_favourites:\n\n if (User.getInstance().getUser() == null) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }\n\n Intent intent = new Intent(getApplicationContext(), PlaceItemListActivity.class);\n startActivity(intent);\n\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n Toast.makeText(this, \"gallery is clicked!\", Toast.LENGTH_LONG).show();\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"public void menuClicked(MenuItem menuItemSelected);",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_my_account) {\n startActivity(new Intent(this, MyAccountActivity.class));\n } else if (id == R.id.nav_message_inbox) {\n startActivity(new Intent(this, MessageInboxActivity.class));\n } else if (id == R.id.nav_view_offers) {\n //Do Nothing\n } else if (id == R.id.nav_create_listing) {\n startActivity(new Intent(this, CreateListingActivity.class));\n } else if (id == R.id.nav_view_listings) {\n startActivity(new Intent(this, ViewListingsActivity.class));\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}"
] | [
"0.7882029",
"0.7235578",
"0.6987005",
"0.69458413",
"0.6917864",
"0.6917864",
"0.6883472",
"0.6875181",
"0.68681556",
"0.6766498",
"0.67418456",
"0.67207",
"0.6716157",
"0.6713947",
"0.6698189",
"0.66980195",
"0.66793925",
"0.66624063",
"0.66595167",
"0.6646381",
"0.6641224",
"0.66243863",
"0.6624042",
"0.66207093",
"0.6602551",
"0.6602231",
"0.6599443",
"0.65987265",
"0.65935796",
"0.6585869",
"0.658491",
"0.65811735",
"0.65765643",
"0.65751576",
"0.65694076",
"0.6561757",
"0.65582377",
"0.65581614",
"0.6552827",
"0.6552827",
"0.6549224",
"0.65389794",
"0.65345114",
"0.65337104",
"0.652419",
"0.652419",
"0.6522521",
"0.652146",
"0.6521068",
"0.6519354",
"0.65165275",
"0.65159816",
"0.65028816",
"0.6498054",
"0.6498054",
"0.64969087",
"0.64937705",
"0.6488544",
"0.64867324",
"0.64866185",
"0.64865905",
"0.6484047",
"0.6481108",
"0.6474686",
"0.64628965",
"0.64551884",
"0.6446893",
"0.64436555",
"0.64436555",
"0.64436555",
"0.64436555",
"0.64436555",
"0.64386237",
"0.643595",
"0.64356565",
"0.64329195",
"0.6432562",
"0.6429554",
"0.64255124",
"0.64255124",
"0.64121485",
"0.64102405",
"0.64095175",
"0.64095175",
"0.64094734",
"0.640727",
"0.64060104",
"0.640229",
"0.6397359",
"0.6392996",
"0.63921124",
"0.63899696",
"0.63885015",
"0.63885015",
"0.63873845",
"0.6368818",
"0.6368818",
"0.63643163",
"0.63643163",
"0.63643163",
"0.6358884"
] | 0.0 | -1 |
Default constructor for player | public Player(){
default_init();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Player(){}",
"public Player(){}",
"public Player() {\t\n\t}",
"public Player() {}",
"public Player() {}",
"public Player() {}",
"public Player() {}",
"public Player() {\n this(\"\", \"\", \"\");\n }",
"public Player(){\r\n\r\n }",
"public Player(){\n\n }",
"public AbstractPlayer() {\r\n }",
"public GamePlayer() {}",
"public Player()\n\t{\n\t\tmyName = DEFAULT_NAME;\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}",
"public Multi_Player()\r\n {\r\n \r\n }",
"public Player(String name) {\n this(name, null);\n }",
"public Player()\r\n\t{\r\n\t\tscore = 0;\r\n\t\tsetPlayerName();\r\n\t}",
"public StudentPlayer() {\n super(\"260740998\");\n }",
"public Player() {\r\n\t\tname=null;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n }",
"public RandomPlayer() {\n\t\tsuper(\"Random\");\n\t}",
"public StudentPlayer() {\r\n super(\"260767897\");\r\n }",
"public StudentPlayer() {\n super(\"260719721\");\n }",
"public Player(){\n reset();\n }",
"public StudentPlayer() {\n super(\"260622641\");\n }",
"Player(String playerName) {\n this.playerName = playerName;\n }",
"public TestPlayer()\n {\n }",
"public Player()\n\t{\n\t\tthis.name = \"\";\n\t\tthis.numPlayed = 0;\n\t\tthis.numCompleted = 0;\n\t\tthis.averageTime = new Time(0);\n\t\tthis.bestTime = new Time(0);\n\t\tthis.accuracy = 0;\n\t}",
"public Player(String name) {\r\n this.name = name;\r\n }",
"public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }",
"public PlayableGame() {\r\n\r\n }",
"public Player2(){\n super();\n name=\"110\";\n }",
"public HumanPlayer(String name) {\n super(name);\n }",
"public Player() {\n hand = new Hand();\n }",
"public Player(World world) {\n\n super(world, playerShape);\n addImage(idleImage);\n score = 0;\n lives = 3;\n\n }",
"public Player(String s) //only constructor\n {\n \tsuper(s,1,false);\n \tposition=-1;\n \tship=false;\n \tSetHealth();\n \tSetWealth();\n }",
"public Player(){\r\n\t\tname = \"\";\r\n\t\tchip = 0;\r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}",
"public Player()\n\t{\n\t\tsetUserName(\"\");\n\t\tsetFamilyName(\"\");\n\t\tsetGivenName(\"\");\n\t\tsetGamesPlayed(0);\n\t\tsetGamesWon(0);\n\t\tsetGamesDrawn(0);\n\t}",
"public Player(String name)\n\t{\n\t\tthis.name = name;\n\t}",
"Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}",
"public void initPlayer();",
"public Game() {\n\t\tbPlayer = new Player(false);\n\t\twPlayer = new Player(true);\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Player(String name) {\n this.name = name;\n this.points = 0;\n }",
"Player()\n\t{\n\t\tiHP = 30;\n\t\tstrEquippedWeapon = \"None\";\n\t\tiLocation = 1;\n\t\tblnPlayerState = true;\n\t\tblnPlayerVictory = false;\n\t\tblnSearchedDirt = false;\n\t\tblnSearchedBarrels = false;\n\t\t\n\t}",
"public Player() {\n\t\tscore = 0;\n\t}",
"Player createPlayer();",
"public Player(String name)\n { \n if (name == \"\")\n {\n setName(\"Anonymous\");\n }\n else\n {\n setName(name);\n }\n }",
"public Player()\n // POST: A default Player object is created with all class members set to 0\n\t{\n\t\tthis(2000, 0);\n\t}",
"public computerPlayer(Player player) {\n\t\tsuper(player);\n\t\t\n\t}",
"public Player(String nickname) {\n this(nickname, -1, -1);\n }",
"public Player1() {\n dbg = new DBG(DBG.PLAYERS, \"Player1\");\n }",
"public Player(String name) {\n setName(name);\n setId(++idCounter);\n setHealthPoints(100);\n setYourTurn(false);\n }",
"public FakePlayer() {\n this(Minecraft.getMinecraft().thePlayer.worldObj);\n }",
"public Player(String inName)\n {\n // initialise instance variables\n mName = inName;\n mBrokenRules = new RuleBook();\n }",
"public Player() {\n//\t\thand = new Hand();\n\t\tthis.cardsInhand = new ArrayList<Card>();\n\t}",
"public Player(String name)\n {\n // initialise instance variables\n this.name = name;\n // start out with $100 in your wallet\n wallet = new Wallet(100);\n inventory = new HashMap<String, Item>();\n currentRoom = null;\n olcc = new OLCC();\n\n }",
"Player(String name){\n\t\tthis.name = name;\n\t}",
"public Player(Game game){\r\n this.game = game;\r\n }",
"public Player(String Name)\n {\n // initialise instance variables\n score = 0;\n energy = 100;\n this.name = Name;\n items = new ArrayList<>();\n }",
"public Player(String name) {\n this.NAME = name;\n this.ownedCountries = new ArrayList<>();\n this.totArmyCount = 0;\n this.PlayerTurn = false;\n }",
"public Player(String name) {\n\t\tthis.name = name;\n\t\tscore = 0;\n\t}",
"public Player(Position position) {\n this.position = position;\n this.image = new Image(\"O\");\n }",
"public Player()\r\n\t{\r\n\t\tpCards = new String[DECK_SIZE];\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}",
"public Player(String name) {\r\n\t\tthis.name=name;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n\t}",
"public DefensivePlayers(){}",
"public Player(String name, int x, int y) {\n \t\t\n \t\tsuper(x*Main.gridSize, y*Main.gridSize);\n \t\t\n \t\tsetMaxHP(100);\n \t\tsetMaxPP(100);\n \t\t\n \t\tsetLevel(1);\n \t\tsetExp(0);\n \t\t\n \t\tsetScene(0, 0);\n \t\t\n \t\tthis.name = name;\n \t}",
"public Player() {\n\t\tsetDimensions(16, 16);\n\t\tsetLocation(512 + 16, 512 + 16);\n\t\tsetKeyBindings();\n\t}",
"public Player(String name)\n\t{\n\t\tthis.money = START_MONEY;\n\t\tthis.name = name;\n\t}",
"public Player(){\n this.health = 9;\n this.orientation = Orientation.FACING_NORTH;\n evaluateSprite();\n }",
"public Player(String type){\n \n this.type = type;\n }",
"public ComputerPlayer()\r\n {\r\n x = 0;\r\n }",
"public FootballPlayerV3()\n {\n }",
"public HexComputerPlayer1(String name) {\n // invoke superclass constructor\n super(name); // invoke superclass constructor\n }",
"public Player(Keyboard input) {\n\t\tthis.input = input;\n\t}",
"public Pawn(Player player) {\n super(player);\n }",
"public Player(String name) {\n this.name = name;\n gameDeck = new Deck(false);\n wonDeck = new Deck(false);\n }",
"public Player(String username)\n\t{\n\t\tm_username = username;\n\t\tm_requests = new HashMap<String, RequestType>();\n\t}",
"public playGame()\n {\n // initialise instance variables\n //no constructor\n }",
"void initializePlayer();",
"public Player(Othello othello, char player) {\n\t\tthis.othello=othello;\n\t\tthis.player=player;\n\t\tthis.type = null;\n\t}",
"public Game() {}",
"public PlayerImplementation(String name) {\n super(name);\n p1 = this; // hack for easy access to player\n\n // TODO find a better place to put these\n this.getDispatcher().getRole().addBehaviorTemplate(FrankKillsVictim.makeLatent());\n\n // prevent player from making toasts or random approaches\n removeBehavior(GroupChat.class);\n removeBehavior(ApproachBehavior.class);\n removeBehavior(RandomizedMoveTo.class);\n removeBehavior(UseRandomAnnotatedItem.class);\n }",
"public Player2(State state){\n super(state);\n name=\"110\";\n }",
"Player(String Name){\n\t\tthis.Name=Name;\n\t\tdate=new Date();\n\t\tthis.Score=Score;\n\t\tScore=0;\n\t}",
"public Game() \n {\n Logger.setLogger(null);\n createInstances();\n parser = new Parser();\n player = new Player();\n userInputs = new ArrayList<String>();\n }",
"public Player (String name) {\n this.name = name;\n score = 0;\n usedWords = new HashSet<>();\n }",
"public Player() {\n\n\t\tnumberOfPlayers++;\n\t\tthis.playerNumber = \"Player \" + numberOfPlayers; \n\t\tthis.balance = 500.00; \n\t\tthis.numberOfLoans = 0;\n\t\tthis.score = 0;\n\t\tthis.inRound = true; \n\t}",
"public Player(String name){\r\n\t\tthis.name = name;\r\n\t\tDie die = new Die();\r\n\t\tthis.die = die;\r\n\t}",
"public Player(String nickname, String color) {\n //Creating objects\n this.nickname = nickname;\n this.resources = new Assets();\n this.strengths = new Strengths();\n this.leaderCards = new ArrayList<>();\n this.familyMembers = new ArrayList<>();\n this.pickDiscounts = new HashMap<>();\n this.diceOverride = new HashMap<>();\n this.defaultHarvestBonus = new Assets();\n this.defaultProductionBonus = new Assets();\n this.color = color;\n this.cards = new HashMap<>();\n DEFAULT_TOWERS_COLORS.forEach(towerColor -> this.pickDiscounts.put(towerColor, new Assets()));\n pickDiscounts.put(BLACK_COLOR, new Assets());\n getLog().log(Level.INFO, \"New empty player %s created.\", nickname);\n }",
"public Player(Level level, double x, double y){\n\t\tsuper(level ,x, y);\n\t\tsprite = sprite.player;\n\t\twidth = sprite.getWidth();\n\t\theight = sprite.getHeight();\n\t\tspeed = 1.5;\n\t}",
"public Player() {\n\t\t\n\t\tif (Main.role == 0) this.role = Role.Attacker;\n\t\tif (Main.role == 1) this.role = Role.Defender;\n\t\t\n\t\tnavigator = Main.nav;\n\t\t\n\t\tballGrabber = new BallGrab();\n\t\t\n\t\tballPlatform[0] = Main.upperRightX + 35; //120\n\t\tballPlatform[1] = Main.upperRightY - 8; //165\n\t\t\n\t\tstartingCorner = Main.startingCorner;\n\t\t\n\t\t\n\t}",
"public Player() {\n\t\timg = new ImageIcon(\"rick.jpg\");\n\t\tplayer = img.getImage();\n\t\ttileX = 1;\n\t\ttileY = 1;\n\t\tsetCastraveti(0);\n\t}",
"Player(int id, String name){\n\t\tthis();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}",
"public UserPlayer(){\n this.playerNum = 0;\n this.isLead = false;\n this.playerHand = new Hand();\n this.suitUserChose = null;\n }",
"public Command(int Player) {\r\n\t\tmyPlayer = Player;\r\n\t}",
"public Game()//Method was given\n {\n parser = new Parser();\n player = new Player();\n }",
"public Game() {\n\n\t}",
"public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }",
"void createPlayer(Player player);",
"public LabyrinthComputerPlayer2(String name) {\n // invoke superclass constructor\n super(name);\n }",
"public RandomPlayer(String name)\r\n\t{\r\n\t\tsuper.setName(name);\r\n\t\tguessHistory=new ArrayList<Code>();\r\n\t}",
"public MusicPlayer() {\n player = new BasicPlayer();\n controller = (BasicController) player;\n volume = -1.0; // indicates that gain has yet to be initialized\n }"
] | [
"0.8741055",
"0.8741055",
"0.86036736",
"0.8596959",
"0.8596959",
"0.8596959",
"0.8596959",
"0.8475882",
"0.8435791",
"0.8401393",
"0.8335466",
"0.8283448",
"0.80054766",
"0.7964496",
"0.7919893",
"0.7917908",
"0.7807834",
"0.778589",
"0.7780201",
"0.77786666",
"0.77736944",
"0.77639735",
"0.77543265",
"0.7742511",
"0.7720874",
"0.76745963",
"0.7672734",
"0.766609",
"0.76380223",
"0.76051825",
"0.7592248",
"0.7589996",
"0.7587357",
"0.75864077",
"0.75852406",
"0.7582738",
"0.75789845",
"0.7562085",
"0.7555336",
"0.7543456",
"0.75336957",
"0.7529306",
"0.7528712",
"0.75151277",
"0.74848056",
"0.7476197",
"0.7475262",
"0.7472365",
"0.73930156",
"0.7387298",
"0.7384835",
"0.7382578",
"0.73790026",
"0.7372139",
"0.73705846",
"0.7368402",
"0.7355181",
"0.733015",
"0.7326561",
"0.7323895",
"0.73180825",
"0.7307631",
"0.73055154",
"0.7295708",
"0.72867405",
"0.72866255",
"0.72792643",
"0.7278703",
"0.7273083",
"0.7264329",
"0.7246966",
"0.7236681",
"0.7236579",
"0.7235935",
"0.72320795",
"0.7215647",
"0.72107196",
"0.72012",
"0.719429",
"0.7174151",
"0.71697706",
"0.7160311",
"0.71594256",
"0.71382445",
"0.71278787",
"0.7125183",
"0.7123485",
"0.7111671",
"0.7087539",
"0.7082256",
"0.7080242",
"0.7061002",
"0.7060001",
"0.7055401",
"0.70445156",
"0.70430326",
"0.7035014",
"0.70288694",
"0.70285094",
"0.7014972"
] | 0.8609861 | 2 |
Initialises all defaults for the player | private void default_init(){
id = 0;
xPos = 0;
yPos = 0;
hp = 100;
name="";
character_id = 1;
weapons = new ArrayList<>();
weaponEntryTracker = new LinkedList<>();
isJumping = false;
isFalling = false;
initial_y= -1;
stateOfMovement = 0;
for(int i = 0; i < 3; i++){
this.weapons.add(new Pair<>(NO_WEAPON_ID, (short) 0));
}
this.weapons.set(0,new Pair<>(PISTOL_ID,DEFAULT_PISTOL_AMMO));
currentWeapon = this.weapons.get(0);
bulletsFired = new ArrayList<>();
shootingDirection = 1;
energy = 0;
sprint = false;
score = 0;
roundsWon = 0;
ready = false;
audioHandler = new AudioHandler();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Player(){\n default_init();\n }",
"public void initPlayer();",
"public static void init()\n {\n all = new HashMap<String, Player>();\n all.put(\"oli\", new Player(null));\n }",
"void initializePlayer();",
"private void initVars(){\n this.dice = new Dice();\n this.playing = true;\n this.currentPlayer = 0;\n this.turn = 0;\n this.xPlayers=new ArrayList<>(); \n this.players = new Player[4];\n this.diceRoller=true;\n this.xTokens=new ArrayList<>();\n this.winners=new ArrayList<>();\n this.computerPlayer= new Autoplay();\n this.gameResults = \"\";\n this.debug = false;\n }",
"public static void setGlobalsToDefaults(){\r\n\t\tGlobals.globalvars.put(\"gamestage\", \"none\");\r\n\t\tGlobals.globalvars.put(\"cleft\", 0);\r\n\t\t\r\n\t\tInteger[] prematch = {64, 20};\r\n \tGlobals.cdpresets.put(\"pregame\", prematch);\r\n \tInteger[] getready = {5, 1200};\r\n \tGlobals.cdpresets.put(\"prepare\", getready);\r\n \tInteger[] battle = {10, 1200};\r\n \tGlobals.cdpresets.put(\"fight\", battle);\r\n \t\r\n \tGlobals.countdowns.clear();\r\n \tGlobals.lobby.clear();\r\n\t}",
"public static void setDefaults() {\r\n\t\tString temp = \"\";\r\n\t\tString[] sa;\r\n\t\tString prefix = \"\";\r\n\t\tString suffix = \"\";\r\n\r\n\t\t//Reset the skins so no more than one is selected when processed.\r\n\t\tclearSkin();\r\n\t\t\t\t\r\n\t\t//Loop through the entire sounds array list to find all the settings.\r\n\t\tfor (int i = 0; i < defaults.size(); i++) {\r\n\t\t\t//When found, set the variable in main to that string..\r\n\t\t\ttemp = (String) defaults.get(i);\r\n\t\t\t\r\n\t\t\tsa = splitString('=', temp);\r\n\t\t\t\r\n\t\t\tprefix = sa[0];\r\n\t\t\tsuffix = sa[1];\r\n\r\n\t\t\t//Find the properties and set them to the desired values.\r\n\t\t\tif (prefix.equalsIgnoreCase(\"sounds\")) {\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"true\")) Main.sounds = true;\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"false\")) Main.sounds = false;\r\n\t\t\t} else if (prefix.equalsIgnoreCase(\"skin\")){\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"iowa\")) Main.skinIsIowa = true;\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"isu\")) Main.skinIsIowaState = true;\r\n\t\t\t\tif (suffix.equalsIgnoreCase(\"uni\")) Main.skinIsNorthernIowa = true;\r\n\t\t\t} else if (prefix.equalsIgnoreCase(\"winscore\")){\r\n\t\t\t\tMain.winScore = suffix;\r\n\t\t\t} else if (prefix.equalsIgnoreCase(\"losescore\")){\r\n\t\t\t\tMain.loseScore = suffix;\r\n\t\t\t} else if (prefix.equalsIgnoreCase(\"sounddir\")){\r\n\t\t\t\tMain.soundDir = suffix;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }",
"private void init_settings() {\n\t\tSettings.setDifficulty(Difficulty.NORMAL);\n\t\tSettings.setGravity(BowmanConstants.DEFAULT_GRAVITY);\n\t}",
"public void initialise_new_game() {\n\n data.read_from_file(\"maxus2.txt\");\n\n mySound.initialise();\n\n pacman.init();\n ghost.init();\n\n score.initialise();\n }",
"private void initPlayMode() {\n initPlayModeView();\n initPlayModeController();\n }",
"@Override\r\n\tpublic void playerInit(GameEngine engine, int playerID) {\r\n\t\towner = engine.getOwner();\r\n\t\treceiver = engine.getOwner().receiver;\r\n\t\tnumColors[playerID] = 4;\r\n\t\tojamaHard[playerID] = 4;\r\n\t\tcountdownDecremented[playerID] = true;\r\n\t\tojamaChecked[playerID] = false;\r\n\r\n\t\tif(engine.getOwner().replayMode == false) {\r\n\t\t\tloadOtherSetting(engine, engine.getOwner().modeConfig);\r\n\t\t\tloadPreset(engine, engine.getOwner().modeConfig, -1 - playerID, \"spf\");\r\n\t\t\tversion = CURRENT_VERSION;\r\n\t\t} else {\r\n\t\t\tloadOtherSetting(engine, engine.getOwner().replayProp);\r\n\t\t\tloadPreset(engine, engine.getOwner().replayProp, -1 - playerID, \"spf\");\r\n\t\t\tversion = owner.replayProp.getProperty(\"avalanchevs.version\", 0);\r\n\t\t}\r\n\t}",
"private void initialParameters()\n\t{\n\t\tasteroidList = new ArrayList<Asteroid>();\n\t\tfor(int i = 0 ; i < INITIAL_ASTEROIDS ; i++)\n\t\t\tasteroidList.add(new Asteroid(getRandomLocationX(), getRandomLocationY(), SCREEN_WIDTH, SCREEN_HEIGHT));\n\t\t\n\t\t//========== Game Status ===========\n\t\trunning \t= true;\n\t\tisWin \t\t= false;\n\t\tisGameOver \t= false;\n\t\t\n\t\t//========== Game Craft ===========\t\t\n\t\tcraft = new Craft(SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH, SCREEN_HEIGHT);\n\t}",
"@Override\n\tpublic void init() {\n\t\tloadSpritesheet();\n\t\tloadSounds();\n\t\tinitIntro();\n\t}",
"public void initGame() {\n\r\n\t\tscore = 0;\r\n\t\tshipsLeft = MAX_SHIPS;\r\n\t\tasteroidsSpeed = MIN_ROCK_SPEED;\r\n\t\tnewShipScore = NEW_SHIP_POINTS;\r\n\t\tnewUfoScore = NEW_UFO_POINTS;\r\n\t\tShip.initShip();\r\n\t\tinitPhotons();\r\n\t\tstopUfo();\r\n\t\tstopMissle();\r\n\t\tinitAsteroids();\r\n\t\tinitExplosions();\r\n\t\tplaying = true;\r\n\t\tpaused = false;\r\n\t\tphotonTime = System.currentTimeMillis();\r\n\t}",
"public void initialize() {\n\t\tthis.avatar = new Avatar();\n\t\tthis.pellet = new Pellet(HEIGHT, WIDTH);\n\t\tthis.wall = new Wall(HEIGHT, WIDTH);\n\n\t\t// notifies the user about the controls\n\t\tSystem.out.println(\"\\nGame controls:\");\n\t\tSystem.out.println(\"w --> move up, s --> move down, a --> move left, d --> move right\");\n\t\tSystem.out.println(\"e --> exit the game\");\n\t\t\n\t\t// display the initial score and location\n\t\tSystem.out.println(\"\\nAvatar location: \" + avatar.getLocation().getX() + \",\" + avatar.getLocation().getY());\n System.out.println(\"Points: \" + avatar.getScore());\n\t}",
"private void initDefaults() {\n _nodeFadeSourceColor = _defNodeFadeSourceColor;\n _nodeFadeDestinationColor = _defNodeFadeDestinationColor;\n\n _nodeStrokeSourceColor = _defNodeStrokeSourceColor;\n _nodeStrokeDestinationColor = _defNodeStrokeDestinationColor;\n\n _nodeStrokeSourceWidth = _defNodeStrokeSourceWidth;\n _nodeStrokeDestinationWidth = _defNodeStrokeDestinationWidth;\n\n _supportEdgeFadeSourceColor = _defSupportEdgeFadeSourceColor;\n _supportEdgeFadeDestinationColor = _defSupportEdgeFadeDestinationColor;\n\n _refuteEdgeFadeSourceColor = _defRefuteEdgeFadeSourceColor;\n _refuteEdgeFadeDestinationColor = _defRefuteEdgeFadeDestinationColor;\n\n _edgeStrokeSourceWidth = _defEdgeStrokeSourceWidth;\n _edgeStrokeDestinationWidth = _defEdgeStrokeDestinationWidth;\n\n _curvedLines = _defCurvedLines;\n\n _manualBackgroundColor = _defManualBackgroundColor;\n\n _realTimeSliderResponse = _defRealTimeSliderResponse;\n }",
"private void init() {\n this.playing = true;\n this.hand.clear();\n this.onTable = 0;\n this.points = 0;\n }",
"public void init() {\n\n if (Gdx.app.getPreferences(\"properties\").contains(\"MasterVolume\")) {\n MasterVolume = Gdx.app.getPreferences(\"properties\").getFloat(\"MasterVolume\");\n } else {\n Gdx.app.getPreferences(\"properties\").putFloat(\"MasterVolume\", MasterVolume);\n }\n\n if (Gdx.app.getPreferences(\"properties\").contains(\"MusicVolume\")) {\n MusicVolume = Gdx.app.getPreferences(\"properties\").getFloat(\"MusicVolume\");\n } else {\n Gdx.app.getPreferences(\"properties\").putFloat(\"MusicVolume\", MusicVolume);\n }\n\n if (Gdx.app.getPreferences(\"properties\").contains(\"SoundVolume\")) {\n SoundVolume = Gdx.app.getPreferences(\"properties\").getFloat(\"SoundVolume\");\n } else {\n Gdx.app.getPreferences(\"properties\").putFloat(\"SoundVolume\", SoundVolume);\n }\n\n Gdx.app.getPreferences(\"properties\").flush();\n\n Click = Gdx.audio.newSound(Gdx.files.internal(\"Music/Sound/menu-clik.wav\"));\n\n }",
"public void initMultiPlayer() {\n\t\tWorld.clear();\n\t\tstate = STATE.MENU;\n\t\tconfig[0] = new PlayerConfig(\"LEFTIE\", Keyboard.KEY_W, Keyboard.KEY_S,\n\t\t\t\tKeyboard.KEY_D, 0);\n\t\tconfig[1] = new PlayerConfig(\"RIGHTIE\", Keyboard.KEY_UP,\n\t\t\t\tKeyboard.KEY_DOWN, Keyboard.KEY_LEFT, 1);\n\n\t\tbat1 = new Bat(100, Screen.getCenterY() - Bat.HEIGHT / 2, config[0]);\n\n\t\tbat2 = new Bat(Screen.getWidth() - 100, Screen.getCenterY()\n\t\t\t\t- Bat.HEIGHT / 2, config[1]);\n\t\tfetchControlInput(config[0], new Callback() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tWorld.clear();\n\t\t\t\tfetchControlInput(config[1], new Callback() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinitGame();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}",
"public void init() {\n Assets.init();\n titleAnimation = new Animation(Assets.titleMoving, 180);\n startButton = new MenuButton((game.getWidth()/2 - 100), 220, 100, 200, MenuButtonType.START, this);\n highscoreButton = new MenuButton((game.getWidth()/2 - 100), 370, 100, 200, MenuButtonType.HIGHSCORE, this);\n backButton = new NavigationButton(37, 720, 120, 60, NavigationButton.NavButtonType.BACK, this.getGame());\n tutorialButton = new MenuButton((game.getWidth()/2 - 100), 520, 100, 200, MenuButtonType.INSTRUCTIONS, this);\n \n showTutorial = false;\n }",
"public void initDefaultValues() {\n }",
"public void initGame() {\n board.init(); // clear the board contents\n currentPlayer = Seed.CROSS; // CROSS plays first\n currentState = GameState.PLAYING; // ready to play\n }",
"private void initPlayerTypes(){\n\t\tplayerModes = new HashMap <Piece, PlayerMode>();\n\t\tfor(Piece p: this.pieces) playerModes.put(p, PlayerMode.MANUAL);\n\t}",
"private HumanGamePlayerOnKeyboard initializePlayer() {\n\t\tHumanGamePlayerOnKeyboard player = new HumanGamePlayerOnKeyboard();\n\t\tplayer.setPlayerName(HUMAN_PLAYER_NAME);\n\t\treturn player;\n\t}",
"private void init() \n\t{\n\t\tgoalReached = false;\n\t\tGdx.input.setInputProcessor(this);\n\t\tcameraHelper = new CameraHelper();\n\t\tlives = Constants.LIVES_START;\n\t\tlivesVisual = lives;\n\t\ttimeLeftGameOverDelay = 0;\n\t\tinitLevel();\n\n\t}",
"private void init() {\n\t\n\t\tthis.setSize(DEFAULT_W, DEFAULT_H);\n\t\tthis.setLocation(DEFAULT_X, DEFAULT_X);\n\t\tthis.setTitle(DEFAULT_TITLE);\n\n\t}",
"private void init() {\n display = new Display(title, getWidth(), getHeight());\n Assets.init();\n player = new Player(getWidth() / 2, getHeight() - 100, 1, 60, 40, this);\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 6; j++) {\n aliens.add(new Alien(150 + 50 * j, 50 + 50 * i, 1, 40, 40, this));\n }\n }\n display.getJframe().addKeyListener(keyManager);\n }",
"private void setDefaults() {\n\t\tequipActions = new String[] { \"Remove\", null, \"Operate\", null, null };\n\t\tmodelId = 0;\n\t\tname = null;\n\t\tdescription = null;\n\t\tmodifiedModelColors = null;\n\t\toriginalModelColors = null;\n\t\tmodifiedTextureColors = null;\n\t\toriginalTextureColors = null;\n\t\tmodelZoom = 2000;\n\t\tmodelRotation1 = 0;\n\t\tmodelRotation2 = 0;\n\t\tmodelRotationY = 0;\n\t\tmodelOffset1 = 0;\n\t\tmodelOffset2 = 0;\n\t\tstackable = false;\n\t\tvalue = 1;\n\t\tmembersObject = false;\n\t\tgroundOptions = new String[5];\n\t\tinventoryOptions = new String[5];\n\t\tmaleModel = -1;\n\t\tanInt188 = -1;\n\t\tmaleOffset = 0;\n\t\tfemaleModel = -1;\n\t\tanInt164 = -1;\n\t\tfemaleOffset = 0;\n\t\tanInt185 = -1;\n\t\tanInt162 = -1;\n\t\tanInt175 = -1;\n\t\tanInt166 = -1;\n\t\tanInt197 = -1;\n\t\tanInt173 = -1;\n\t\tstackIDs = null;\n\t\tstackAmounts = null;\n\t\tcertID = -1;\n\t\tcertTemplateID = -1;\n\t\tanInt167 = 128;\n\t\tanInt192 = 128;\n\t\tanInt191 = 128;\n\t\tanInt196 = 0;\n\t\tanInt184 = 0;\n\t\tteam = 0;\n\n\t\topcode140 = -1;\n\t\topcode139 = -1;\n\t\topcode148 = -1;\n\t\topcode149 = -1;\n\n\t\tsearchableItem = false;\n\t}",
"public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }",
"public void init()\n\t{\n\t\tpaused = false;\n\t\tbg.play();\n\t\tdeath.setVolume(10);\n\t\texplosion.setVolume(20);\n\t\tsetGameOver(false);\n\t\tscore = 0;\n\t\tlives = 3;\n\t\tgameTime = 0;\n\t\tgameObj = new GameWorldCollection();\n\t\tshipSpawned = false;\n\t\tsound = true;\n\t\ttotalNPS = 0;\n\t\tcollisionVectorPS = new Vector<ICollider>();\n\t\tcollisionVectorNPS\t = new Vector<ICollider>();\n\t\tcollisionVectorAsteroid = new Vector<ICollider>();\n\t\ttrash\t\t\t\t\t= new Vector<ICollider>();\n\t\tnotifyObservers();\t\n\t}",
"public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }",
"protected void initialize() {\n \tsetShowStartScreen(false);\n \t\n \t// do not preload resources, for this very simple game\n \t// preloadResources();\n \t\n \t// Max number of balls is just 17\n \tchains.setMaxBalls(17);\n }",
"public void initGame() {\n // clear the board contents\n board.init();\n // CROSS speelt eerst\n currentPlayer = Mark.CROSS;\n currentState = GameState.PLAYING;\n // ready for start\n }",
"private void initializeGame() {\n score = 0;\n scoreTimer = 0;\n rockTimer = 0;\n touchActive = false;\n gameOver = false;\n gameWon = false;\n currentSpeed = 1;\n gameLevel = 1;\n speedTimer = 0;\n }",
"public void initializeScoringVariables(){\n\t\tgame.setMovement(moveDistance);\n\t\tgame.setRight(correctGuess);\n\t\tgame.setWrong(incorrectGuesses);\n\t\tgame.setTime(duration(startTime,endTime));\n\t}",
"private static void initializeGame()\n {\n minSecret = 1;\n maxSecret = 100;\n secretNumber = newSecretNumber(minSecret,maxSecret);\n guessesLeft = 10;\n guessRange = 10;\n bestGuess = maxSecret + 1;\n extraGuesses = 5;\n isPlaying = true;\n safeLineUsed = false;\n showDebugInfo = false;\n\n }",
"protected void initVars() {}",
"@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }",
"public void initialize(){\n\t screens.put(ScreenType.Game, new GameScreen(this));\n screens.put(ScreenType.Menu, new MenuScreen(this));\n }",
"public void initializePlayer() {\n radioPlayer = new MediaPlayer();\n\n isPaused = true;\n\n radioPlayer.setWakeMode(owner.getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);\n radioPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n radioPlayer.setOnErrorListener(this);\n radioPlayer.setOnCompletionListener(this);\n radioPlayer.setOnInfoListener(this);\n }",
"protected void initVars() {\n prefFile = \"./server.ini\";\n mimeFile = \"./mime.ini\";\n }",
"private void initKeys() { \n //add left, down, right, up\n playerKeys.add(new keyList(KeyInput.KEY_J, KeyInput.KEY_K, KeyInput.KEY_L, KeyInput.KEY_I));\n }",
"public void init()\r\n {\r\n m_active = false;\r\n m_entryTimes = new HashMap<String, Long>();\r\n m_tsm = BotAction.getBotAction().getTSM();\r\n m_tsm.setOperatorLevel(ER_LEVEL);\r\n registerSettings();\r\n m_tsm.addTSChangeListener(this);\r\n m_botAction.setPlayerPositionUpdating(500);\r\n }",
"public static void init() {\n\t\tdrive = Drive.getInstance();\n\t\toi = OI.getInstance();\n\t\tshooter = Shooter.getInstance();\n\t\tarmservo = ArmServo.getInstance();\n\t\t//pneumatic = Pneumatic.getInstance();\n\t\tarmMotor = ArmMotor.getInstance();\n\t\tramp = RampMotor.getInstance();\n\t\tif(shooter == null) {\n\t\t\tSystem.out.println(\"Shooter in NULL in init\");\n\t\t}\n\t\t\n\t}",
"private void init() {\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager); //lets us access keyboard\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\tAssets.init();\n\t\t\n\t\tgameCamera = new GameCamera(this, 0,0);\n\t\thandler = new Handler(this);\n\t\t\n\t\tgameState = new GameState(handler);\n\t\tmenuState = new MenuState(handler);\n\t\tsettingState = new SettingState(handler);\n\t\tmapState = new mapState(handler);\n\t\tmansionState = new mansionState(handler);\n\t\tparkState = new parkState(handler);\n\t\tjazzState = new jazzState(handler);\n\t\tmansionGardenState = new mansionGardenState(handler);\n\t\tmansionArcadeState = new mansionArcadeState(handler);\n\t\tmansionStudyState = new mansionStudyState(handler);\n\t\tjazzPRoomState = new jazzPRoomState(handler);\n\t\tState.setState(menuState);\n\t}",
"Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}",
"private void setPlayer() {\n player = Player.getInstance();\n }",
"public PlayerSetup() {\n\t\tgetNumPlayers();\n\t\tcreatePlayers();\n\t\t\n\t\tSystem.out.println(\"\\n\" + Players.getInstance().toString() );\n\t}",
"Player()\n\t{\n\t\tiHP = 30;\n\t\tstrEquippedWeapon = \"None\";\n\t\tiLocation = 1;\n\t\tblnPlayerState = true;\n\t\tblnPlayerVictory = false;\n\t\tblnSearchedDirt = false;\n\t\tblnSearchedBarrels = false;\n\t\t\n\t}",
"public void initialize(Context context) {\n\t\tif (m_Initialized) return;\n\t\tm_Initialized = true;\n\t\t\n\t\t//Get preference and load\n\t\tSharedPreferences Preference = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE);\n\t\tloadMisc(Preference);\n\t\tloadPlayers(Preference);\n\t}",
"public void initialize()\n {\n \t// Luodaan manager-luokat\n EffectManager.getInstance();\n MessageManager.getInstance();\n CameraManager.getInstance();\n\n // Luodaan pelitilan eri osat\n backgroundManager = new BackgroundManager(wrapper);\n \tweaponManager = new WeaponManager();\n hud = new Hud(context, weaponManager);\n touchManager = new TouchManager(dm, surfaceView, context, hud, weaponManager);\n gameMode = new GameMode(gameActivity, this, dm, context, hud, weaponManager);\n \n // Järjestellään Wrapperin listat uudelleen\n wrapper.sortDrawables();\n wrapper.generateAiGroups();\n \n // Merkitään kaikki ladatuiksi\n allLoaded = true;\n }",
"public Player()\n\t{\n\t\tmyName = DEFAULT_NAME;\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}",
"public static void initPlayer() {\n\t\tuser = game.getUsers().get(game.getUserTurn());\n\t\tlblBudgetText.setText(user.getBudget()+\"\");\n\t\tdisplayUserTeam();\n\t}",
"private void initializePlayers()\n\t{\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\t// Distribute personality cards\n\t\t\tplayer.setPersonalityCard(board.getPersonalityCardDeck().pickTopCard());\n\t\t\t\n\t\t\t// Distribute money\n\t\t\tboard.getBankAccount().transfertAmountTo(player, nbGoldStartPerPlayer, false);\n\t\t\t\n\t\t\t// Distribute minions\n\t\t\tfor(int i = 0; i < nbMinionsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addMinion(new Minion());\n\t\t\t}\n\t\t\t\n\t\t\t// Distribute buildings\n\t\t\tfor(int i = 0; i < nbBuildingsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addBuilding(new Building());\n\t\t\t}\n\t\t}\n\n\t\t// Distribute player cards\n\t\tfor(int i = 0; i < nbInitCards; i++)\n\t\t{\n\t\t\tfor(Player player : playerList)\n\t\t\t{\n\t\t\t\tplayer.getPlayerCardDeck().addCard(board.getPlayerCardDeck().pickTopCard());\n\t\t\t}\n\t\t}\n\t}",
"public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}",
"public void initializeDefault() {\n\t\tthis.numAuthorsAtStart = 5;\n\t\tthis.numPublicationsAtStart = 20;\n\t\tthis.numCreationAuthors = 0;\n\t\tthis.numCreationYears = 10;\n\n\t\tyearInformation = new DefaultYearInformation();\n\t\tyearInformation.initializeDefault();\n\t\tpublicationParameters = new DefaultPublicationParameters();\n\t\tpublicationParameters.initializeDefault();\n\t\tpublicationParameters.setYearInformation(yearInformation);\n\t\tauthorParameters = new DefaultAuthorParameters();\n\t\tauthorParameters.initializeDefault();\n\t\ttopicParameters = new DefaultTopicParameters();\n\t\ttopicParameters.initializeDefault();\n\t}",
"boolean InitialisePlayer (String path_name);",
"@BeforeEach\n void init() {\n player = Mockito.mock(Player.class);\n level = Mockito.mock(Level.class);\n pointCalculator = Mockito.mock(PointCalculator.class);\n game = new SinglePlayerGame(player, level, pointCalculator);\n }",
"void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }",
"@SuppressWarnings(\"static-access\")\n\tprivate void init() {\n\t\tdisplay= new Display(title,width,height);\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\n\t\t\n\t\t//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Declarare imagini~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n Assets.init();\n \n\t\tgameState= new GameState(this);\n\t\tgameStateAI= new GameStateAI(this);\n\t\tmenuState = new MenuState(this);\n\t\tsettingsState= new SettingsState(this);\n\t\tState.setState(menuState);\t\n\t\t\n\t\n\t}",
"protected void initialize() {\n \tstartTime = System.currentTimeMillis();\n \tintake.setLeftPower(power);\n \tintake.setRightPower(power);\n }",
"private void init() {\n\t\t\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager);\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\t\n\t\t//Adding the mouseManager to the canvas reduces glitches\n\t\tdisplay.getCanvas().addMouseListener(mouseManager); \n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\t\n\t\t\n\t\tVisuals.init();\n\n\t\tManager.init(this); // Setting up our manager singleton\n\n\t\tgameCamera = new GameCamera(0, 0);\n\t\tgameTimer = new GameTimer();\n\n\t\tgameState = new GameState();\n\t\t//We want to initialise the states we may switch to for easy access\n\t\t//The main menu state\n\t\tState menuState = new MenuState();\n\t\t//The state for the settings menu\n\t\tState settingState = new SettingState();\n\t\t\n\t\tState.setState(gameState); //This sets the state of the program to our game\n\t\t\n\t}",
"private void setUp() {\n players.forEach(player -> player.draw(GameConstants.STARTING_HAND_SIZE.value()));\n }",
"public void robotInit() {\n RobotMap.init();\r\n CommandBase.init();\r\n //Add autonomous prefs\r\n Preferences p = Preferences.getInstance();\r\n if (!p.containsKey(\"AutonInitialDelay\")) {\r\n p.putDouble(\"AutonInitialDelay\", kDefaultInitialDelay);\r\n }\r\n if (!p.containsKey(\"AutonTimeout\")) {\r\n p.putDouble(\"AutonTimeout\", kDefaultTimeout);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondOn\")) {\r\n p.putBoolean(\"HangerLastSecondOn\", kDefaultLastSecondOn);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondTimeout\")) {\r\n p.putDouble(\"HangerLastSecondTimeout\", kDefaultLastSecondTimeout);\r\n }\r\n }",
"public Player() {\r\n\t\tname=null;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n }",
"public Multi_Player()\r\n {\r\n \r\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic void init()\n\t{\n\t\tscore = 0;\n\t\tlives = 3;\n\t\tgameTime = 0;\n\n\t\t\t/*initialize an array of array lists\n\t\t\tfor storing game objects currently in world\t\t\t\n\t\t\tAsteroids: index 0\n\t\t\tPlayer ship: index 1\n\t\t\tNon player ship: index 2\n\t\t\tenemy missile: index 3\n\t\t\tfriendly missile: index 4\n\t\t\tSpace station: index 5\n\t\t\t*/\t\t\n\t\t\tgameObj = new ArrayList[6];\n\t\t\tfor(int i = 0; i<gameObj.length; i++)\n\t\t\t{\n\t\t\t\tgameObj[i] = new ArrayList<GameObject>();\n\t\t\t}\n\t}",
"private void initialize() {\n\t\tdisenioVentana();\n\n\t\tdisenioMenu();\n\n\t\tdisenio_Cuerpo();\n\n\t}",
"@Override\n protected void initSettings (GameSettings settings) {\n settings.setWidth(15 * 70);\n settings.setHeight(10* 70);\n settings.setVersion(\"0.1\");\n settings.setTitle(\"Platformer Game\");\n settings.setMenuEnabled(true);\n settings.setMenuKey(KeyCode.ESCAPE);\n }",
"public void init() {\n if (!getLocation().isTileMap()) {\n //Debug.signal( Debug.NOTICE, null, \"PlayerImpl::init\");\n this.animation = new Animation(this.wotCharacter.getImage(), ClientDirector.getDataManager().getImageLibrary());\n this.sprite = (Sprite) this.wotCharacter.getDrawable(this);\n this.brightnessFilter = new BrightnessFilter();\n this.sprite.setDynamicImageFilter(this.brightnessFilter);\n }\n this.movementComposer.init(this);\n }",
"private void setInititalValues() {\n drone.setTranslateX(INITIAL_X_POSITION);\n drone.setTranslateY(INITIAL_Y_POSITION);\n drone.setTranslateZ(INITIAL_Z_POSITION);\n\n // set initial orientation to z-axis (into the screen)\n setxOrientation(0);\n setyOrientation(0);\n setzOrientation(1);\n setYawAngle(0);\n setRollAngle(0);\n setPitchAngle(0);\n setSpeed(TelloDefaultValues.DEFAULT_SPEED);\n }",
"public Player getDefaultPlayer(){\n return jugPorDef;\n }",
"private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}",
"private void initialize()\n {\n for(int i=0;i<4;i++)\n {\n foundationPile[i]= new Pile(Rank.ACE);\n foundationPile[i].setRules(true, false, false, false, true,false, true);\n } \n for(int i=0;i<7;i++)\n {\n tableauHidden[i] = new Pile();\n tableauVisible[i] = new Pile(Rank.KING);\n tableauVisible[i].setRules(false, true, false, false, false,false, true);\n } \n deck.shuffle();\n deck.shuffle();\n dealGame();\n }",
"public void init() {\n\t\tbg = new MyImg(\"gamepage/endgame/bg.png\");\n\t\tbut0 = new MyImg(\"paygame/qdbut.png\");\n\t\tbut1 = new MyImg(\"paygame/qxbut.png\");\n\t}",
"@Override\r\n\tpublic void gameInit() \r\n\t{\r\n\t\tfont = new Font(\"Courier\", Font.BOLD, 14);\r\n\t\tfontInfo = this.getFontMetrics(font);\r\n\t\tkeys = new KeyValues();\r\n\t\t\r\n\t\tbackground.loadImage(\"/images/sky.png\");\r\n\t\ttileset = new TileSet(10,10,32,32);\r\n\t\ttileset.loadTiles(\"/images/test_tiles.png\");\r\n\t\tmap = new Map(tileset, 20, 50);\r\n\t\tmap.readMap(\"res/maps/testmap2.txt\");\r\n\t\t\r\n\t\tcamera.setDimensions(getScreenWidth(), getScreenHeight());\r\n\t\tcamera.setXRange(0, map.getWidth() - getScreenWidth());\r\n\t\tcamera.setYRange(0, map.getHeight() - getScreenHeight());\r\n\t}",
"public static void initialize()\n\t{\n\t\t// USB\n\t\tdriveJoystick = new EJoystick(getConstantAsInt(USB_DRIVE_STICK));\n\t\tcontrolGamepad = new EGamepad(getConstantAsInt(USB_CONTROL_GAMEPAD));\n\n\t\t// Power Panel\n\t\tpowerPanel = new PowerDistributionPanel();\n\n\t\t//Compressor\n\t\tcompressor = new Compressor(Constants.getConstantAsInt(Constants.PCM_CAN));\n\t\tcompressor.start();\n\t}",
"public void init()\n\t// throws GameException\n\t{\n\t\tnextPlayer = Game.FIRST_PLAYER;\n\t\tsomeoneQuit = false;\n\t\tonePlayerLeft = null;\n\t\tisGameNew = true;\n\t\twinningPlayer = Game.GAME_NOT_OVER;\n\t\tinitializeCMNGame();\n\t\t// if (WINS.size() <= 0)\n\t\t// throw new GameException (\"Unacceptable input C = \" + CC +\n\t\t// \", M = \" + MM + \", N = \" + NN +\n\t\t// \".\\nExiting...\");\n\t}",
"public void initMultiPlayer() {\r\n\t\tnew ConnectThread().start();\r\n\t}",
"private void initialize() {\n \t\tfor (Module module : UserType.getCurrentUserType().getModules()) {\n \t\t\tif (module.getModuleClass() != null) {\n \t\t\t\tregisterModule(module);\n \t\t\t}\n \t\t}\n \t\tif (GeneralPreferences.getLanguage() != null && GeneralPreferences.getLanguage().equals(Language.FRENCH)) {\n \t\t\tLocale.setDefault(Locale.FRANCE);\n \t\t} else {\n \t\t\tLocale.setDefault(Locale.US);\n \t\t}\n \t\tFlexoHelp.configure(GeneralPreferences.getLanguage() != null ? GeneralPreferences.getLanguage().getIdentifier() : \"ENGLISH\",\n \t\t\t\tUserType.getCurrentUserType().getIdentifier());\n \t}",
"private void initialize() {\n\t\tplayerMap = new HashMap<>();\n\t\ttypeMap = new HashMap<>();\n\t\tfor (ProductType type : ProductType.values()) {\n\t\t\tMap<ProductState, Map<Integer, Set<Product>>> stateMap = new HashMap<>();\n\t\t\tfor (ProductState state : ProductState.values()) {\n\t\t\t\tMap<Integer, Set<Product>> map = new HashMap<>();\n\t\t\t\tstateMap.put(state, map);\n\t\t\t}\n\t\t\ttypeMap.put(type, stateMap);\n\t\t}\n\t}",
"public static void initialize(Player p) {\n game.setPlayer(p);\n shop1.setPlayer(p);\n shop1.menu();\n\n }",
"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}",
"private void fillValues() {\n // TODO\n //copy global config\n //copy player\n Player[] newPlayers = new Player[2];\n if (globalConfiguration.isFirstPlayerHuman()){\n newPlayers[0] = new ConsolePlayer(globalConfiguration.getPlayers()[0].getName());\n }else{\n newPlayers[0] = new RandomPlayer(globalConfiguration.getPlayers()[0].getName());\n }\n if (globalConfiguration.isSecondPlayerHuman()){\n newPlayers[1] = new ConsolePlayer(globalConfiguration.getPlayers()[1].getName());\n }else{\n newPlayers[1] = new RandomPlayer(globalConfiguration.getPlayers()[1].getName());\n }\n //create local config\n this.localConfig = new Configuration(globalConfiguration.getSize(),\n newPlayers, globalConfiguration.getNumMovesProtection());\n\n this.localAudio = AudioManager.getInstance().isEnabled();\n\n //fill in values\n this.sizeFiled.setText(String.valueOf(localConfig.getSize()));\n this.numMovesProtectionField.setText(String.valueOf(localConfig.getNumMovesProtection()));\n this.durationField.setText(String.valueOf(DurationTimer.getDefaultEachRound()));\n\n if (localConfig.isFirstPlayerHuman()){\n this.isHumanPlayer1Button.setText(\"Player 1: Human\");\n }else{\n this.isHumanPlayer1Button.setText(\"Player 1: Computer\");\n }\n\n if (localConfig.isSecondPlayerHuman()){\n this.isHumanPlayer2Button.setText(\"Player 2: Human\");\n }else{\n this.isHumanPlayer2Button.setText(\"Player 2: Computer\");\n }\n\n if (localAudio){\n this.toggleSoundButton.setText(\"Sound FX: Enabled\");\n }else{\n this.toggleSoundButton.setText(\"Sound FX: Disabled\");\n }\n }",
"private void init() {\n display = new Display(title, getWidth(), getHeight()); \n Assets.init();\n player = new Player(getWidth() / 2 - 50, getHeight() - 50, 100, 30, this);\n rayo = new Rayo(getWidth() / 2 - 10, player.y - player.height , 10, 30, 0, 0, this);\n borrego = new Borrego(-80, 60 , 50, 20, 0, 0, this);\n generateEnemies();\n generateFortalezas();\n bombas= new ArrayList<Bomba>();\n \n \n display.getJframe().addKeyListener(keyManager);\n }",
"public Level(){\n\t\tlevel_image_pattern = \"default\";\n\t\t\n\t\timages = new HashMap <String, Image>();\n\t\tpickables = new ArrayList<Pickable>();\n\t\tplayer_initial_position = new int[2];\n\t\tplayer_initial_position[0] = 0;\n\t\tplayer_initial_position[1] = 0;\n\t\t\n\t\tconfig = Config.getInstance();\n\t\t\n\t}",
"@Override\n public void initialisePlayer(World world) {\n // To be implemented.\n \tthis.numRow = world.numRow;\n \tthis.numCol = world.numColumn;\n \tthis.world = world;\n \tthis.enemyShots = new ArrayList<Coordinate>();\n \t/*this.shots = this.world.shots;*/\n \tthis.shipLocations = this.world.shipLocations;\n \tthis.guesses = new ArrayList<Guess>();\n \tthis.parityList = new ArrayList<Coordinate>();\n \ttargeting = false;\n \tthis.hitGuesses = new ArrayList<Guess>();\n \tfillParityList();\n \t\n \n \t\n \t\n }",
"public void init() {\n state = new GameState();\n gameFrame.addKeyListener(state.getKeyListener());\n gameFrame.addMouseListener(state.getMouseListener());\n gameFrame.addMouseMotionListener(state.getMouseMotionListener());\n gameFrame.addFocusListener(new FocusAdapter() {\n @Override\n public void focusLost(FocusEvent e) {\n state.resetKeys();\n }\n });\n gameFrame.addMouseWheelListener(e -> {\n if (Map.map != null) {\n if (e.getWheelRotation() < 0)\n Map.zoomIn();\n else\n Map.zoomOut();\n }\n });\n //Pause Key Setting\n gameFrame.addKeyListener(new KeyAdapter() {\n @Override\n public void keyPressed(KeyEvent e) {\n keyPressed = true;\n if (e.getKeyCode() == KeyEvent.VK_ESCAPE && !gameFinished)\n pause();\n if (e.getKeyCode() == KeyEvent.VK_F1)\n GameFrame.testMode = !GameFrame.testMode;\n }\n });\n gameFrame.addMouseListener(new MouseAdapter() {\n @Override\n public void mouseClicked(MouseEvent e) {\n keyPressed = true;\n }\n });\n\n gameFrame.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n if (e.getKeyChar() >= 'a' && e.getKeyChar() <= 'z')\n Cheater.keyPressed(e.getKeyChar());\n }\n });\n }",
"private void setupPlayerUI() {\r\n // for now hide the player\r\n setPlayerVisible(false);\r\n\r\n // disable unnecesary buttons\r\n setButtonEnabled(mButtonPlayerSeekBackward, false);\r\n setButtonEnabled(mButtonPlayerSeekForward, false);\r\n setButtonEnabled(mButtonPlayerSkipBackward, false);\r\n\r\n setButtonEnabled(mButtonPlayerRepeat, false);\r\n }",
"@Override\n public void init() {\n swerveDebug(500, \"SwerveAutoTEST::init\", \"STARTing init for TETS\");\n\n // Run initialization of other parts of the class\n // Note that the class will connect to all of our motors and servos\n super.init();\n\n crater = Boolean.TRUE;\n\n\n // Robot and autonomous settings are read in from files in the core class init()\n // Report the autonomous settings\n showAutonomousGoals();\n\n swerveLog( \"X S6\", ourSwerve.getOrientLog());\n\n swerveDebug(500, \"SwerveAutoTEST::init\", \"DONE\");\n }",
"protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}",
"public static void initialize()\n\t{\n\n\t\tint[] actualPlayers = new int[4]; // indices of the existing players\n\t\tint index = 0;\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif (players[i].exist)\n\t\t\t\tactualPlayers[index++] = i;\n\t\t}\n\n\t\tif (playerNum == 4)\n\t\t{\n\t\t\tplayers[2].x = 16;\n\t\t\tplayers[2].y = 30;\n\t\t\tplayers[1].x = 16;\n\t\t\tplayers[1].y = 10;\n\t\t\tplayers[3].x = 37;\n\t\t\tplayers[3].y = 10;\n\t\t\tplayers[4].x = 37;\n\t\t\tplayers[4].y = 30;\n\t\t}\n\t\telse if (playerNum == 2)\n\t\t{\t\t\t\n\t\t\tplayers[actualPlayers[0]].x = 16;\n\t\t\tplayers[actualPlayers[0]].y = 20;\n\t\t\tplayers[actualPlayers[1]].x = 37;\n\t\t\tplayers[actualPlayers[1]].y = 20;\t\t\t \n\t\t}\n\t\telse if (playerNum == 3)\n\t\t{\n\t\t\tplayers[actualPlayers[0]].x = 16;\n\t\t\tplayers[actualPlayers[0]].y = 20;\n\t\t\tplayers[actualPlayers[1]].x = 37;\n\t\t\tplayers[actualPlayers[1]].y = 10;\n\t\t\tplayers[actualPlayers[2]].x = 37;\n\t\t\tplayers[actualPlayers[2]].y = 30;\t\n\t\t}\n\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tplayers[i].square = new boolean[HEIGHT + 2][WIDTH + 2];\n\t\t\tif (players[i].exist)\n\t\t\t{\n\t\t\t\tplayers[i].alive = true;\n\t\t\t\tplayers[i].square[players[i].y][players[i].x] = true;\n\t\t\t}\n\t\t\tplayers[i].dir = 'a'; // 'a' means no direction yet\n\t\t}\n\n\t\tstarting = false;\n\n\t}",
"protected void initialize() {\n \ttime.start();\n \tRobot.camera.setExposureManual(20);\n \tzach();\n\t\tSystem.out.println(\"josh\");\n\t\t\n }",
"public void gameInit() {\n lobbyRoom.sendPortToAll();\n lobbyRoom.sendPlayers(game.getCars());\n lobbyRoom.sendTrack(game.getTrack());\n lobbyRoom.sendPowerupManager(game.getManager());\n this.running = true;\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}",
"public GameSoundPlayer() {\r\n mainThemeSoundPlayer = new SoundPlayer(\"src/main/resources/sounds/menu.mp3\", 0.7, -1);\r\n newGameThemeSoundPlayer = new SoundPlayer(\"src/main/resources/sounds/newMenu.mp3\", 1, 1);\r\n\r\n playBack1 = new SoundPlayer(\"src/main/resources/sounds/play1.mp3\", 1, -1);\r\n playBack2 = new SoundPlayer(\"src/main/resources/sounds/play2.mp3\", 1, -1);\r\n playBack3 = new SoundPlayer(\"src/main/resources/sounds/play3.mp3\", 1, -1);\r\n playBack4 = new SoundPlayer(\"src/main/resources/sounds/play4.mp3\", 1, -1);\r\n playBack5 = new SoundPlayer(\"src/main/resources/sounds/play5.mp3\", 1, -1);\r\n endGame = new SoundPlayer(\"src/main/resources/sounds/endGame.mp3\", 1, 1);\r\n\r\n for (BONUSES_SOUNDS sound : BONUSES_SOUNDS.values()) {\r\n switch (sound) {\r\n case ALLDIE:\r\n allDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case EXTRASPEED:\r\n extraSpeedPlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case MAKESLOWER:\r\n makeSlowerPlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case BONUSFIRE:\r\n bonusFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case BONUSJUMP:\r\n bonusJumpPlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case BONUSJUMPSTART:\r\n jumpStartPlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n }\r\n }\r\n for (FIRE_SOUNDS sound : FIRE_SOUNDS.values()) {\r\n switch (sound) {\r\n case DARK:\r\n darkFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case FENIX:\r\n fenixFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case BONE:\r\n boneFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case GHOST:\r\n ghostFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case ARCHANGEL:\r\n archFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case BEHEMOTH:\r\n begemFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case CHAMPION:\r\n champFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case PEGASUS:\r\n pegasFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case THUNDERBIRD:\r\n thunderFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case TROGLODYTE:\r\n troglFirePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n }\r\n }\r\n for (DIE_SOUNDS sound : DIE_SOUNDS.values()) {\r\n switch (sound) {\r\n case DARK:\r\n darkDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case FENIX:\r\n fenixDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case BONE:\r\n boneDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case GHOST:\r\n ghostDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case ARCHANGEL:\r\n archDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case BEHEMOTH:\r\n begemDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case CHAMPION:\r\n champDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case PEGASUS:\r\n pegasDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case THUNDERBIRD:\r\n thunderDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n case TROGLODYTE:\r\n troglDiePlayer = new SoundPlayer(sound.getUrl(), sound.getVolume(), sound.getCycleCount());\r\n break;\r\n }\r\n }\r\n }",
"public void initializeMixer() {\n\t\tinitializeSlidersAndTextFields();\n\t\tinitializeTooltips();\n\t\tinitializeRecorderListener();\n\t}",
"private void initLevel(){\r\n\t\tBetterSprite doodleSprite = (BetterSprite)(getGroup(\"doodleSprite\").getSprites()[0]);\r\n\t\tinitControls(doodleSprite);\r\n\t\tinitEvents();\r\n\t}",
"public Player() {\t\n\t}"
] | [
"0.7280511",
"0.7280047",
"0.7088572",
"0.7011876",
"0.68636733",
"0.6843378",
"0.6840524",
"0.6802228",
"0.67798215",
"0.67643195",
"0.6725063",
"0.67188966",
"0.6699058",
"0.6577474",
"0.65359193",
"0.65357447",
"0.6513288",
"0.6479414",
"0.6457315",
"0.6442749",
"0.6436157",
"0.6434146",
"0.64267534",
"0.6408185",
"0.6393798",
"0.6384718",
"0.63836336",
"0.63677394",
"0.6356854",
"0.634379",
"0.6323731",
"0.6303411",
"0.6297836",
"0.6296804",
"0.6293939",
"0.62893903",
"0.62640417",
"0.62609756",
"0.6254725",
"0.6245838",
"0.6209066",
"0.61980146",
"0.61891985",
"0.61826503",
"0.6175148",
"0.61660975",
"0.61501074",
"0.61477184",
"0.6147151",
"0.6131448",
"0.61175203",
"0.61118203",
"0.6109093",
"0.61049634",
"0.610266",
"0.6082927",
"0.6073912",
"0.6071886",
"0.6061002",
"0.6059219",
"0.603905",
"0.60365087",
"0.6036092",
"0.60311294",
"0.6028432",
"0.6023347",
"0.60203344",
"0.6016817",
"0.60154337",
"0.60139257",
"0.6009732",
"0.60019046",
"0.59835815",
"0.5980686",
"0.59793717",
"0.59769976",
"0.59731054",
"0.59667563",
"0.5962678",
"0.59547234",
"0.5945547",
"0.5940314",
"0.5939941",
"0.59309494",
"0.5930432",
"0.5929844",
"0.59263206",
"0.59228927",
"0.59177566",
"0.5916743",
"0.5908358",
"0.5905074",
"0.59021527",
"0.5902135",
"0.58999664",
"0.5897766",
"0.5896157",
"0.58946764",
"0.5889799",
"0.5884405"
] | 0.6799173 | 8 |
Constructor used by networking to rebuild player object after it has been sent via network | public Player(byte id, short xPos, short yPos, byte hp, String name, ArrayList<Pair<Byte, Short>> weapons, ArrayList<Bullet> bullets, LinkedList<Byte> trakedWeapons, boolean jumpState, boolean fallState, short initial_y, byte currentWeapon,short currWeaponammo, short shootingDirection, boolean sprint, int score, byte roundsWon, boolean ready,int stateOfMovement,byte charId){
this.id =id;
this.score = score;
this.ready = ready;
this.xPos = xPos;
this.yPos = yPos;
this.hp = hp;
this.weapons = weapons;
this.name = name;
character_id = 1;
this.weaponEntryTracker = trakedWeapons;
this.isJumping=jumpState;
this.isFalling=fallState;
this.bulletsFired = bullets;
this.currentWeapon = new Pair<>(currentWeapon,currWeaponammo);
this.initial_y = initial_y;
this.shootingDirection = shootingDirection;
this.sprint = sprint;
this.roundsWon = roundsWon;
this.stateOfMovement = stateOfMovement;
this.character_id = charId;
audioHandler = new AudioHandler();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Player(){\n reset();\n }",
"public Player() {\t\n\t}",
"public Player(){}",
"public Player(){}",
"public Multi_Player()\r\n {\r\n \r\n }",
"public Player() {}",
"public Player() {}",
"public Player() {}",
"public Player() {}",
"Player(String playerName) {\n this.playerName = playerName;\n }",
"public RemotePlayerServer(Player p) {\n this.localPlayer = p;\n }",
"public Player(){\r\n\r\n }",
"public Player(){\n default_init();\n }",
"public Player(String username)\n\t{\n\t\tm_username = username;\n\t\tm_requests = new HashMap<String, RequestType>();\n\t}",
"public Robber() {\n\t\t// robberPlayers = (ArrayList<Player>) GSC.players.clone();\n\t}",
"public Player() {\n fleetMap = new Map();\n battleMap = new Map();\n sunkShipNum = 0;\n }",
"public Player(){\n\n }",
"public Player() {\n hand = new Hand();\n }",
"public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }",
"public Player() {\n//\t\thand = new Hand();\n\t\tthis.cardsInhand = new ArrayList<Card>();\n\t}",
"public Player(){\r\n\t\tname = \"\";\r\n\t\tchip = 0;\r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}",
"public GamePlayer() {}",
"public Player()\r\n\t{\r\n\t\tpCards = new String[DECK_SIZE];\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}",
"public UserPlayer(){\n this.playerNum = 0;\n this.isLead = false;\n this.playerHand = new Hand();\n this.suitUserChose = null;\n }",
"public AbstractPlayer() {\r\n }",
"public void preparePlayer1()\n {\n Player1 p1 = new Player1();\n addObject(p1, 200, 600);\n }",
"public Player1() {\n dbg = new DBG(DBG.PLAYERS, \"Player1\");\n }",
"public ServerPlayers() {\n sockets = new ArrayList<Socket>();\n }",
"public Player()\r\n {\r\n playerItem = new ArrayList();\r\n }",
"public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }",
"public Player() {\n this(\"\", \"\", \"\");\n }",
"public Player()\r\n\t{\r\n\t\tscore = 0;\r\n\t\tsetPlayerName();\r\n\t}",
"public Player(String s) //only constructor\n {\n \tsuper(s,1,false);\n \tposition=-1;\n \tship=false;\n \tSetHealth();\n \tSetWealth();\n }",
"Player createPlayer();",
"public Player(String name)\n {\n // initialise instance variables\n this.name = name;\n // start out with $100 in your wallet\n wallet = new Wallet(100);\n inventory = new HashMap<String, Item>();\n currentRoom = null;\n olcc = new OLCC();\n\n }",
"public Player()\n {\n playerItem = new ArrayList();\n }",
"private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }",
"public Game()//Method was given\n {\n parser = new Parser();\n player = new Player();\n }",
"public Player(Game game){\r\n this.game = game;\r\n }",
"public Player(String inName)\n {\n // initialise instance variables\n mName = inName;\n mBrokenRules = new RuleBook();\n }",
"public PlayersHolder() {\n randomRoomPlayers = new LinkedBlockingQueue<>();\n freePlayersRoom = new FreePlayers();\n }",
"public computerPlayer(Player player) {\n\t\tsuper(player);\n\t\t\n\t}",
"public Player(Player p){\n this.dead = p.dead;\n this.hiddenTreasures = p.hiddenTreasures;\n this.level = p.level;\n this.name = p.name;\n this.pendingBadConsequence = p.pendingBadConsequence;\n this.visibleTreasures = p.visibleTreasures;\n }",
"public Player()\n {\n inventory = new ArrayList<Item>();\n currentRoom=0;\n }",
"public Player()\n\t{\n\t\tthis.name = \"\";\n\t\tthis.numPlayed = 0;\n\t\tthis.numCompleted = 0;\n\t\tthis.averageTime = new Time(0);\n\t\tthis.bestTime = new Time(0);\n\t\tthis.accuracy = 0;\n\t}",
"public Player(JsonObject jsonPlayer) {\n this.nickname = jsonPlayer.get(\"nickname\").getAsString();\n this.nRedAmmo = jsonPlayer.get(\"nRedAmmo\").getAsInt();\n this.nBlueAmmo = jsonPlayer.get(\"nBlueAmmo\").getAsInt();\n this.nYellowAmmo = jsonPlayer.get(\"nYellowAmmo\").getAsInt();\n this.points = jsonPlayer.get(\"points\").getAsInt();\n\n this.weaponList = new ArrayList<>();\n JsonArray jsonWeaponList = jsonPlayer.get(\"weaponList\").getAsJsonArray();\n for (int i = 0; i < jsonWeaponList.size(); i++) {\n Weapon w = new Weapon(jsonWeaponList.get(i).getAsJsonObject());\n this.weaponList.add(w);\n }\n\n this.powerUpList = new ArrayList<>();\n JsonArray jsonPowerUpList = jsonPlayer.get(\"powerUpList\").getAsJsonArray();\n for (int i = 0; i < jsonPowerUpList.size(); i++) {\n PowerUp p = new PowerUp(jsonPowerUpList.get(i).getAsJsonObject());\n this.powerUpList.add(p);\n }\n\n this.damages = new ArrayList<>();\n JsonArray jsonDamages = jsonPlayer.get(\"damages\").getAsJsonArray();\n for (int i = 0; i < jsonDamages.size(); i++) {\n String s = jsonDamages.get(i).getAsString();\n this.damages.add(s);\n }\n\n this.marks = new ArrayList<>();\n JsonArray jsonMarks = jsonPlayer.get(\"marks\").getAsJsonArray();\n for (int i = 0; i < jsonMarks.size(); i++) {\n String s = jsonMarks.get(i).getAsString();\n this.marks.add(s);\n }\n\n this.nDeaths = jsonPlayer.get(\"nDeaths\").getAsInt();\n this.xPosition = jsonPlayer.get(\"xPosition\").getAsInt();\n this.yPosition = jsonPlayer.get(\"yPosition\").getAsInt();\n this.isDead = jsonPlayer.get(\"isDead\").getAsBoolean();\n this.nMoves = jsonPlayer.get(\"nMoves\").getAsInt();\n this.nMovesBeforeGrabbing = jsonPlayer.get(\"nMovesBeforeGrabbing\").getAsInt();\n this.nMovesBeforeShooting = jsonPlayer.get(\"nMovesBeforeShooting\").getAsInt();\n this.playerStatus = new PlayerStatus(jsonPlayer.get(\"playerStatus\").getAsJsonObject());\n }",
"public void preparePlayer2()\n {\n Player2 p2 = new Player2();\n addObject(p2, 878, 600);\n }",
"public Player (Deck mainDeck) {\n this.mainDeck = mainDeck;\n }",
"public Player(int playerNumber, Map map, CommandRelay commandRelay, MapObserver observer, UnitObserver unitObserver, StructureObserver structureObserver, StatusObserver statusObserver, PlayerObservator playerObservator, int startingX, int startingY){\n\n this.playerNumber = playerNumber;\n customID=new CustomID(IdType.PLAYER, String.valueOf(playerNumber));\n\n// entities = new EntityOwnership(customID, commandRelay, startingX, startingY); //TODO should entity ownership know Player?\n\n entities = new EntityOwnership(customID, commandRelay,startingX, startingY); //TODO should entity ownership know Player?\n entities.setMapObserver(observer);\n entities.setUnitObserver(unitObserver);\n\n keymap = new HashMap<KeyCode, String>();\n\n // Defualt keys\n keymap.put(KeyCode.NUMPAD2, \"SOUTH\");\n keymap.put(KeyCode.NUMPAD8, \"NORTH\");\n keymap.put(KeyCode.NUMPAD7, \"NW\");\n keymap.put(KeyCode.NUMPAD1, \"SW\");\n keymap.put(KeyCode.NUMPAD9, \"NE\");\n keymap.put(KeyCode.NUMPAD3, \"SE\");\n\n\n\n resources = new ResourceOwnership(customID);\n resources.addResource(new Resource(ResourceType.ENERGY, 100));\n resources.addResource(new Resource(ResourceType.ORE, 100));\n resources.addResource(new Resource(ResourceType.FOOD, 100));\n this.playerMap = map; // TODO for the moment global map is shared, later each player will have own map\n this.registerMapObserver(observer);\n this.registerUnitObserver(unitObserver);\n this.registerStructureObserver(structureObserver);\n this.registerStatusObserver(statusObserver);\n this.registerPlayerObserver(playerObservator);\n }",
"public PacketGrabber() {\n //Log.d(TAG, \"PacketGrabber created...\");\n //gameState = -1;\n }",
"public Player() {\r\n\t\tname=null;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n }",
"public void initPlayer();",
"void createPlayer(Player player);",
"public PlayerServices(){\n playerList = new ArrayList<>();\n }",
"public TestPlayer()\n {\n }",
"public Player() {\r\n\t\tthis.gemPile = new int[4];\r\n\t\tthis.hand = new ArrayList<Card>();\r\n\t\tthis.bag = new ArrayList<Card>();\r\n\t\tthis.discard = new ArrayList<Card>();\r\n\t\tthis.lockedCards = new ArrayList<Card>();\r\n\t\tthis.toUse = new ArrayList<Integer>();\r\n\t\tnewTurn();\r\n\t}",
"public Player2(){\n super();\n name=\"110\";\n }",
"public Player(String type){\n \n this.type = type;\n }",
"public Player2(State state){\n super(state);\n name=\"110\";\n }",
"public ComputerPlayer()\r\n {\r\n x = 0;\r\n }",
"private void setPlayer() {\n player = Player.getInstance();\n }",
"public Player(String name) {\n this.NAME = name;\n this.ownedCountries = new ArrayList<>();\n this.totArmyCount = 0;\n this.PlayerTurn = false;\n }",
"public abstract Player freshCopy();",
"public Player(){\r\n cards = new ArrayList<String>();\r\n indexes = new ArrayList<Integer>();\r\n }",
"public Game() {\n\t\tbPlayer = new Player(false);\n\t\twPlayer = new Player(true);\n\t\t// TODO Auto-generated constructor stub\n\t}",
"Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}",
"public Command(int Player) {\r\n\t\tmyPlayer = Player;\r\n\t}",
"public Player() {\n\n\t\tnumberOfPlayers++;\n\t\tthis.playerNumber = \"Player \" + numberOfPlayers; \n\t\tthis.balance = 500.00; \n\t\tthis.numberOfLoans = 0;\n\t\tthis.score = 0;\n\t\tthis.inRound = true; \n\t}",
"public DefensivePlayers(){}",
"public Player(String playerId) {\n\t\tthis.playerid = playerId;\n\t\tthis.pieceType = null;\n\t}",
"public PlayerImplementation(String name) {\n super(name);\n p1 = this; // hack for easy access to player\n\n // TODO find a better place to put these\n this.getDispatcher().getRole().addBehaviorTemplate(FrankKillsVictim.makeLatent());\n\n // prevent player from making toasts or random approaches\n removeBehavior(GroupChat.class);\n removeBehavior(ApproachBehavior.class);\n removeBehavior(RandomizedMoveTo.class);\n removeBehavior(UseRandomAnnotatedItem.class);\n }",
"public Player(String Name)\n {\n // initialise instance variables\n score = 0;\n energy = 100;\n this.name = Name;\n items = new ArrayList<>();\n }",
"public ServerMessage(String message, Player player) {\n this.message = message;\n this.player = player;\n }",
"public Player(Othello othello, char player) {\n\t\tthis.othello=othello;\n\t\tthis.player=player;\n\t\tthis.type = null;\n\t}",
"@Override\n\tpublic void setPlayer(Player player) {\n\n\t}",
"private void createPlayer() {\r\n try {\r\n mRadioPlayer = new RadioPlayer(getApplication(), mDeezerConnect,\r\n new WifiAndMobileNetworkStateChecker());\r\n mRadioPlayer.addPlayerListener(this);\r\n setAttachedPlayer(mRadioPlayer);\r\n } catch (DeezerError e) {\r\n handleError(e);\r\n } catch (TooManyPlayersExceptions e) {\r\n handleError(e);\r\n }\r\n }",
"@Override\r\n public void init(NexPlayer nexPlayer) {\r\n mNexPlayer = nexPlayer;\r\n initBinder();\r\n }",
"Player(String name){\n\t\tthis.name = name;\n\t}",
"public ExtendedPlayer(EntityPlayer player)\n\t{\n\t\t// TODO: Do I need to worry that this constructor might be overwriting stored values?\n\t\tthis.player = player;\n\t\tthis.authyCell = \"\";\n\t\tthis.playerEmail = \"\";\n\t\tthis.authyID = \"\";\t\t\t\t\t\t\n\t\tthis.authySuccessDate = null;\t\t\t// By default user has never successfully completed 2FA phase.\n\t\tthis.playerAwaitingAuthy = false;\t\t// By default player is not enforced to perform 2FA.\n\t\tthis.authyCountryCode = \"1\"; \t\t\t// Default to US for the country of the phone number.\n\t\tthis.authySecuredDoorLocation = new int[] {0};\n\t\tthis.pushRequestUUID = \"\";\n\t\tthis.pushRequestStatus = \"\";\n\t}",
"public Player(Player p)\r\n {\r\n this(p.isCompletingGame, p.averageTime, p.fastestTime, p.gamesCompleted, p.rank, p.title, p.username);\r\n }",
"public Player(String name) {\r\n this.name = name;\r\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() {\n\t\tsetDimensions(16, 16);\n\t\tsetLocation(512 + 16, 512 + 16);\n\t\tsetKeyBindings();\n\t}",
"public Player()\n\t{\n\t\tmyName = DEFAULT_NAME;\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}",
"public Player(Room room)\n {\n // initialise instance variables\n anteriorRoom = new Stack<Room>();\n currentRoom = room; \n }",
"public Game() \n {\n Logger.setLogger(null);\n createInstances();\n parser = new Parser();\n player = new Player();\n userInputs = new ArrayList<String>();\n }",
"Game() {\n _randomSource = new Random();\n\n _players = new Player[2];\n _input = new BufferedReader(new InputStreamReader(System.in));\n _players[0] = new HumanPlayer(BP, this);\n _players[1] = new MachinePlayer(WP, this);\n _playing = false;\n }",
"public Player(String name) {\n this.name = name;\n this.badges = new LinkedList<>();\n }",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"public Player(Position position) {\n this.position = position;\n this.image = new Image(\"O\");\n }",
"public Player()\n\t{\n\t\tsetUserName(\"\");\n\t\tsetFamilyName(\"\");\n\t\tsetGivenName(\"\");\n\t\tsetGamesPlayed(0);\n\t\tsetGamesWon(0);\n\t\tsetGamesDrawn(0);\n\t}",
"public PlayableGame() {\r\n\r\n }",
"public Player() { \n grid = new Cell[GRID_DIMENSIONS][GRID_DIMENSIONS]; //size of grid\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n grid[i][j] = new Cell(); //creating all Cells for a new grid\n }\n }\n \n fleet = new LinkedList<Boat>(); //number of boats in fleet\n for (int i = 0; i < NUM_BOATS; i++) {\n Boat temp = new Boat(BOAT_LENGTHS[i]); \n fleet.add(temp);\n }\n shipsSunk = new LinkedList<Boat>();\n }",
"public Player(String password) {\n\t\tsuper(/* Settings.HOSTED ? */Settings.START_PLAYER_LOCATION);\n\t\tsetHitpoints(Settings.START_PLAYER_HITPOINTS);\n\t\tthis.password = password;\n\t\tappearence = new Appearence();\n\t\tsof = new SquealOfFortune();\n\t\tcurrencypouch = new CurrencyPouch();\n\t\tpouch = new MoneyPouch();\n\t\tinventory = new Inventory();\n\t\tequipment = new Equipment();\n\t\tskills = new Skills();\n\t\tcombatDefinitions = new CombatDefinitions();\n\t\tfarmingManager = new FarmingManager();\n\t\tprayer = new Prayer();\n\t\tbank = new Bank();\n\t\ttoolbelt = new Toolbelt(this);\n\t\tsecondbank = new Bank();\n\t\tpreset = new BankPreset(this);\n\t\tpreset2 = new BankPreset(this);\n\t\tpreset3 = new BankPreset(this);\n\t\tpreset4 = new BankPreset(this);\n\t\tkeybindfunctions = new KeybindFunctions(this);\n\t\tcontrolerManager = new ControlerManager();\n\t\tmusicsManager = new MusicsManager();\n\t\temotesManager = new EmotesManager();\n\t\tfriendsIgnores = new FriendsIgnores();\n\t\tdominionTower = new DominionTower();\n\t\tcharges = new ChargesManager();\n\t\tauraManager = new AuraManager();\n\t\tlendManager = new LendingManager();\n\t\tquestManager = new QuestManager();\n\t\texquestManager = new EXQuestManager();\n\t\tpetManager = new PetManager();\n\t\tperksManager = new PerksManager();\n\t\trunEnergy = 100;\n\t\tallowChatEffects = true;\n\t\tmouseButtons = true;\n\t\tcompleted = true;\n\t\tpouches = new int[4];\n\t\trolls = new int[300];\n\t\tfor (int i = 0; i < rolls.length; i++)\n\t\t\trolls[i] = -1;\n\t\tresetBarrows();\n\t\tSkillCapeCustomizer.resetSkillCapes(this);\n\t\townedObjectsManagerKeys = new LinkedList<String>();\n\t\tpasswordList = new ArrayList<String>();\n\t\tipList = new ArrayList<String>();\n\t\tsetCreationDate(Utils.currentTimeMillis());\n\t}",
"public Prayer(Player player) {\n this.player = player;\n }",
"public Player_ex1(String playerName){\n this.name = playerName;\n winner = false;\n }",
"void initializePlayer();",
"public HexComputerPlayer1(String name) {\n // invoke superclass constructor\n super(name); // invoke superclass constructor\n }",
"public Pawn(Player player) {\n super(player);\n }",
"public Player()\n // POST: A default Player object is created with all class members set to 0\n\t{\n\t\tthis(2000, 0);\n\t}",
"public Player(Server loginServer, Socket socket) {\n\t\tsuper(\"Player\");\n\t\tserver = loginServer;\n\t\tconnection = socket;\t\n\t\ttry {\n\t\t\tconnection.setSoTimeout(0);\n\t\t\tcomOut = new ObjectOutputStream(connection.getOutputStream());\n\t\t\tcomOut.flush();\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Couldn't getOutputStream\");\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t} catch (IOException e1) {\n\t\t\t\tSystem.err.println(\"Closing Failed\");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tcomIn = new ObjectInputStream(connection.getInputStream());\n\t\t} catch (IOException e) {\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t} catch (IOException e1) {\n\t\t\t\tSystem.err.println(\"Closing Failed\");\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tSystem.err.println(\"Couldn't getInputStream\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tname = null;\n\t}"
] | [
"0.70515364",
"0.70152855",
"0.6987408",
"0.6987408",
"0.6950799",
"0.68929946",
"0.68929946",
"0.68929946",
"0.68929946",
"0.6877821",
"0.68577933",
"0.6848003",
"0.6842951",
"0.68145907",
"0.6810061",
"0.67826194",
"0.6757031",
"0.67513615",
"0.67326516",
"0.67140406",
"0.6674699",
"0.6651098",
"0.66345215",
"0.6625879",
"0.6619077",
"0.66044766",
"0.65812254",
"0.65798104",
"0.6572086",
"0.6571698",
"0.65432096",
"0.6537211",
"0.6522445",
"0.65200174",
"0.6515886",
"0.6514092",
"0.65075433",
"0.6504471",
"0.6492537",
"0.647741",
"0.6473383",
"0.64654183",
"0.6438299",
"0.64335865",
"0.6420295",
"0.64189607",
"0.64141166",
"0.64092726",
"0.6406347",
"0.6386857",
"0.63665813",
"0.6360527",
"0.6351349",
"0.63497305",
"0.6320146",
"0.6305769",
"0.62998825",
"0.6295962",
"0.6295618",
"0.6279159",
"0.6278774",
"0.62761116",
"0.6263239",
"0.62598044",
"0.6256476",
"0.62466884",
"0.62378794",
"0.6226683",
"0.6224131",
"0.6220411",
"0.6216267",
"0.62155074",
"0.6212671",
"0.6200681",
"0.61944324",
"0.61871886",
"0.61800426",
"0.61674315",
"0.61663496",
"0.61611825",
"0.61586803",
"0.615783",
"0.61488485",
"0.6146786",
"0.6145066",
"0.61444026",
"0.61387813",
"0.61373204",
"0.6136333",
"0.6132686",
"0.61113554",
"0.61097646",
"0.6105782",
"0.61036503",
"0.6101815",
"0.6099891",
"0.6098815",
"0.60968924",
"0.609644",
"0.60942185",
"0.6091355"
] | 0.0 | -1 |
Initialises player health, bullets and movement before each round of the game starts | public void init(){
hp = DEFAULT_MAX_HEALTH;
bulletsFired = new ArrayList<>();
initial_y = -1;
//Sets the byte to identify the state of movement
//For animation purposes in the renderer
//0 = stationary
//1 = jumping
//2 = moving left
//3 = jumping left
//4 = right
//5 = Jumping right
//6 = crouching
//8 = crouching left
//10 = crouching right
stateOfMovement = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void default_init(){\n id = 0;\n xPos = 0;\n yPos = 0;\n hp = 100;\n name=\"\";\n character_id = 1;\n weapons = new ArrayList<>();\n weaponEntryTracker = new LinkedList<>();\n isJumping = false;\n isFalling = false;\n initial_y= -1;\n stateOfMovement = 0;\n for(int i = 0; i < 3; i++){\n this.weapons.add(new Pair<>(NO_WEAPON_ID, (short) 0));\n }\n this.weapons.set(0,new Pair<>(PISTOL_ID,DEFAULT_PISTOL_AMMO));\n currentWeapon = this.weapons.get(0);\n bulletsFired = new ArrayList<>();\n shootingDirection = 1;\n energy = 0;\n sprint = false;\n score = 0;\n roundsWon = 0;\n ready = false;\n audioHandler = new AudioHandler();\n }",
"private void init() \n\t{\n\t\tgoalReached = false;\n\t\tGdx.input.setInputProcessor(this);\n\t\tcameraHelper = new CameraHelper();\n\t\tlives = Constants.LIVES_START;\n\t\tlivesVisual = lives;\n\t\ttimeLeftGameOverDelay = 0;\n\t\tinitLevel();\n\n\t}",
"public void MarioInit() {\n\t\tcurrentLevel = levelOne;\n\t\tMario = new Entity(100, 400, 27, 50, Id.player, playerGImage);\n\t\tPhysics = new PhysicsEngine (Mario);\n\t\tPhysics.windowWidth = WINDOW_WIDTH;\n\t\tPhysics.setWinningSpace(currentLevel.winningSpace);\n\t\tfor (Entity a: currentLevel.hitboxes) {\n\t\t\tPhysics.addImmovable(a);\n\t\t}\n\t\tMario.xVel = 0;\n\t\tMario.yVel = 0;\n\t\tMario.xVelMax = 6;\n\t\tMario.yVelMax = 10;\n\t\tMario.xDirection = Mario.yDirection = Mario.lastDirection = \"\";\n\t}",
"public void startGame() {\n\t\timages = new ImageContainer();\n\t\ttimer = new Timer(15, this);\n\t\ttimer.setRepeats(true);\n\t\tlevelStartTimer = new Timer(2000, this);\n\t\thighScore = new HighScore();\n\t\tpacmanAnimation = new PacmanAnimation(images.pacman, new int[] { 3, 2,\n\t\t\t\t0, 1, 2 });\n\t\tactualLevel = 1;\n\t\tinitNewLevel();\n\t}",
"public void initGame() {\n\r\n\t\tscore = 0;\r\n\t\tshipsLeft = MAX_SHIPS;\r\n\t\tasteroidsSpeed = MIN_ROCK_SPEED;\r\n\t\tnewShipScore = NEW_SHIP_POINTS;\r\n\t\tnewUfoScore = NEW_UFO_POINTS;\r\n\t\tShip.initShip();\r\n\t\tinitPhotons();\r\n\t\tstopUfo();\r\n\t\tstopMissle();\r\n\t\tinitAsteroids();\r\n\t\tinitExplosions();\r\n\t\tplaying = true;\r\n\t\tpaused = false;\r\n\t\tphotonTime = System.currentTimeMillis();\r\n\t}",
"public void OnStart(){\n\t\t//create the random space background and put its priority behind everything else\n\t\tswitch ((int) (Math.random() * 3)){\n\t\t\tcase 0:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_med,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_asteroids,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tbackground = new Background(R.drawable.spaceback_nebula,new Point(0,0),-1);\n\t\t\t\tbreak;\n\t\t}\n\t\t//generate asteroids\n\t\tinitAsteroids((int)(Math.random()*3));\n\t\t//create a border for the background (draw on top)\n\t\tnew Border(background,1000);\n\t\t//create the player\n\t\tplayer = new Player(new Point(-300,300), 1);\n\t\t//create a target reticule for the player\n\t\ttarget = new Target(player);\n\t\t\n\t\t//load sounds\n\t\tGameState.State().LoadSound(R.raw.shoot, \"shoot\");\n\t\tGameState.State().LoadSound(R.raw.accelerate, \"accelerate\");\n\t\tGameState.State().LoadSound(R.raw.engine, \"engine\");\n\t\tGameState.State().LoadSound(R.raw.explosion, \"explosion\");\n\t\tGameState.State().LoadSound(R.raw.death, \"death\");\n\t\t\n\t\thasStarted = true;\n\t\t\n\t\trespawnCount = 0.0f;\n\t\trespawnTime = 4f;\n\t}",
"public ProjectGame() {\n\n super(\"BulletHell\", 1200, 900);\n die = new Event();\n backgroundMusic = new SoundManagerClass();\n playButton.setPositionX(420);\n playButton.setPositionY(180);\n quitButton.setPositionX(623);\n quitButton.setPositionY(181);\n //x = 0;\n reduceLife = new Event();\n fadeOutEvent = new Event();\n PickedUpEvent = new Event();\n die.setEventType(\"playerDeath\");\n fadeOutEvent.setEventType(\"FadeOut\");\n reduceLife.setEventType(\"Collision\");\n collidedEvent = new Event();\n collidedEvent.setEventType(\"CollidedEvent\");\n throwKnife = new Event();\n throwKnife.setEventType(\"throwKnife\");\n\n\n keyIcon.setPositionX(200);\n keyIcon.setPositionY(40);\n\n knifeIcon.setPositionX(205);\n knifeIcon.setPositionY(95);\n\n currentLevel = 0;//0 = base , 3=brigham's level\n\n\n PickedUpEvent.setEventType(\"CoinPickedUp\");\n\n this.addEventListener(myQuestManager, collidedEvent.getEventType());\n\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n background.setScaleX(5);\n background.setScaleY(5);\n\n\n player = new Player(\"player\", \"resources/player_sheet.png\", \"idle_right\");\n player.setSpriteSheetJson(\"resources/player_sheet.json\");\n player.setDelay(100);\n\n player.getLifeArray().get(0).setPositionX(390);\n player.getLifeArray().get(0).setPositionY(40);\n player.getLifeArray().get(1).setPositionX(420);\n player.getLifeArray().get(1).setPositionY(40);\n player.getLifeArray().get(2).setPositionX(450);\n player.getLifeArray().get(2).setPositionY(40);\n // player.setHasPhysics(true);\n keyCount = 0;\n knifeCount = 4;\n // player.setHasPhysics(true);\n\n // platform.setPositionX(50);\n // platform.setPositionY(550);\n\n\n // platform1.setPositionX(150);\n // platform1.setPositionY(150);\n\n\n player.setPositionX(550);\n player.setPositionY(700);\n\n pressE = new Sprite(\"pressE\", \"pressE.png\");\n player.addChild(pressE);\n pressE.setPositionY(-50);\n\n\n coin.setPositionY(250);\n coin.setPositionX(660);\n\n findKey.setPositionX(500);\n findKey.setPositionY(-20);\n\n getToRoom.setPositionX(500);\n getToRoom.setPositionY(-20);\n\n killTurtle.setPositionX(500);\n killTurtle.setPositionY(-20);\n\n\n //Rectangle2D rect = new Rectangle2D.Float(600,400,700,500);\n //coverList = new ArrayList<Rectangle2D>(); //list of cover sprites\n //coverList.add(rect);\n\n ///////////////////////////////////////LEVEL 0 ////////////////////////////////////////////////////////////////\n\n if (currentLevel == 0) {\n\n tutorial = new TutorialLevel1(\"Tutorial\");\n tutorial.run();\n addChild(tutorial);\n\n myLevel = new Level0(\"Room1\");\n myLevel.run();\n addChild(myLevel);\n\n\n myLevel1 = new Level1(\"Room2\");\n myLevel1.run();\n myLevel1.hide();\n addChild(myLevel1);\n\n myLevel2 = new ahmedslevel(\"Room3\", player);\n myLevel2.run();\n myLevel2.hide();\n addChild(myLevel2);\n\n myLevel3 = new BrighamLevel(\"Room4\");\n myLevel3.run();\n myLevel3.hide();\n addChild(myLevel3);\n\n level4 = new AlternatingSpikesLevel(\"Room6\");\n level4.run();\n level4.hide();\n addChild(level4);\n\n bossLevel = new BossLevel(\"Room5\", player);\n bossLevel.run();\n bossLevel.hide();\n addChild(bossLevel);\n\n\n\n tutorial.mapDoorToRoom(0,myLevel);\n myLevel.mapDoorToRoom(0, myLevel1);\n myLevel1.mapDoorToRoom(0, myLevel2);\n myLevel2.mapDoorToRoom(0, myLevel3);\n myLevel3.mapDoorToRoom(0, level4);\n level4.mapDoorToRoom(0, bossLevel);\n //myLevel3.mapDoorToRoom(0,bossLevel);\n\n\n currentRoom = tutorial;\n\n //myLevel1.mapDoorToRoom(0,myLevel2);\n\n //myLevel2.run();\n //myLevel2.hide();\n\n\n //myLevel2.mapDoorToRoom(0,myLevel3);\n //myLevel3.run();\n //myLevel3.hide();\n currentQuestObjective = 0;\n\n }\n\n if (currentLevel == 4) {\n\n\n bossLevel = new BossLevel(\"Room4\", player);\n bossLevel.run();\n currentRoom = bossLevel;\n\n\n }\n\n enemies = currentRoom.enemies;\n pickpocketEnemy = null;\n\n transitionY = 615;\n transitionYCurrent = 615;\n\n\n backgroundMusic.playSoundEffect(\"resources/oceanOperator.wav\", 100);\n\n }",
"@Override\n public void init() {\n GetSprite(\"/images/bullet.png\");\n MusicUtils.StopASounds(\"/music/Laser_Shoot.wav\");\n Level().play(\"/music/Laser_Shoot.wav\");\n }",
"@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }",
"public void init()\n\t{\n\t\tpaused = false;\n\t\tbg.play();\n\t\tdeath.setVolume(10);\n\t\texplosion.setVolume(20);\n\t\tsetGameOver(false);\n\t\tscore = 0;\n\t\tlives = 3;\n\t\tgameTime = 0;\n\t\tgameObj = new GameWorldCollection();\n\t\tshipSpawned = false;\n\t\tsound = true;\n\t\ttotalNPS = 0;\n\t\tcollisionVectorPS = new Vector<ICollider>();\n\t\tcollisionVectorNPS\t = new Vector<ICollider>();\n\t\tcollisionVectorAsteroid = new Vector<ICollider>();\n\t\ttrash\t\t\t\t\t= new Vector<ICollider>();\n\t\tnotifyObservers();\t\n\t}",
"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 doInitializations(JFrame menu){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false; //sonst läuft Spieler nach Neustart einfach los\n\t\tattack = false;\n\t\tattack2 = false;\n\t\t\n\t\tlevel = 1;\n\t\troom = 1;\n\t\tlast = System.nanoTime();\n\t\tgameover = 0;\n\t\t\n\t\tactors = new CopyOnWriteArrayList<Sprite>();\n\t\tattacks = new CopyOnWriteArrayList<Object>();\n\t\t\n\t\tlib = SpriteLib.getInstance();\n\t\t\n\t\t\n\t\tsoundlib = new SoundLib();\n\t\tsoundlib.loadSound(\"Hintergrund\", \"sound/Greensleeves.wav\");\n\t\tsoundlib.loadSound(\"Angriff\", \"sound/Angriff.wav\");\n\t\tsoundlib.loadSound(\"Zauber\", \"sound/Zauber.wav\");\n\t\tif(sound_running == true){\n\t\tsoundlib.loopSound(\"Hintergrund\");\n\t\t}\n\t\t\t\n\t\t////1 = Coins, 2 = Mana, 3 = Shop, 4 = Rüstung, 5 = Waffe, 6 = NPC\n\t\tplayer = new Player(lib.getSprite(\"resources/pics/player.gif\", 12, 1), 50, 50, 100, this);\n\t\tenemy = new Enemy(lib.getSprite(\"resources/pics/enemy.gif\", 4, 1), 100, 500, 10, 100, this);\n\t\tenemy3 = new IceEnemy(lib.getSprite(\"resources/pics/Eisgegner.gif\", 4, 1), 500, 50, 10, 100, this);\n\t\tenemy4 = new FireEnemy(lib.getSprite(\"resources/pics/Feuergegner.gif\", 4, 1), 600, 50, 10, 100, this);\n\t\tenemy2 = new Enemy(lib.getSprite(\"resources/pics/enemy.gif\", 4, 1), 300, 200, 10, 100, this);\n\t\tcoin = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 700, 400, 1, 100, this);\n\t\tcoin2 = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 670, 400, 1, 100, this);\n\t\tcoin3 = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 640, 400, 1, 100, this);\n\t\tcoin4 = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 610, 400, 1, 100, this);\n\t\tcoin5 = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 580, 400, 1, 100, this);\n\t\tcoin6 = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 100, 50, 1, 100, this);\n\t\tcoin7 = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 140, 50, 1, 100, this);\n\t\tcoin8 = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 180, 50, 1, 100, this);\n\t\tcoin9 = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 220, 50, 1, 100, this);\n\t\tcoin10 = new Item(lib.getSprite(\"resources/pics/coin.gif\", 1, 1), 260, 50, 1, 100, this);\n\t\tmana = new Item(lib.getSprite(\"resources/pics/mana.gif\", 1, 1), 470, 500, 2, 100, this);\n\t\tshop = new Item(lib.getSprite(\"resources/pics/shop.gif\", 1, 1), 400, 500, 3, 100, this);\n\t\tnpc = new Item(lib.getSprite(\"resources/pics/npc.gif\", 1, 1), 100, 100, 6, 100, this);\n\t\tschildeis = new Item(lib.getSprite(\"resources/pics/IceArmour.gif\", 1, 1), 100, 200, 4, 100, this);\n\t\tschildfeuer = new Item(lib.getSprite(\"resources/pics/FireArmour.gif\", 1, 1), 150, 200, 9, 100, this);\n\t\tschwerteis = new Item(lib.getSprite(\"resources/pics/IceSword.gif\", 1, 1), 100, 150, 5, 100, this);\n\t\tschwertfeuer = new Item(lib.getSprite(\"resources/pics/FireSword.gif\", 1, 1), 150, 150, 10, 100, this);\n\t\thealthpack = new Item(lib.getSprite(\"resources/pics/healthpack.gif\", 1, 1), 500, 100, 7, 100, this);\n\t\tquest = new Quest(lib.getSprite(\"resources/pics/quest.gif\", 1, 1), 500, 200, 2, 100, this); //Münz-Quest\n\t\tquest2 = new Quest(lib.getSprite(\"resources/pics/quest.gif\", 1, 1), 100, 250, 1, 100, this); //Mathe-Münz-Quest\n\n\t\tactors.add(enemy); \n\t\tactors.add(enemy2); \n\t\tactors.add(enemy3);\n\t\tactors.add(enemy4); \n\t\tactors.add(coin); \n\t\tactors.add(coin2); \n\t\tactors.add(coin3); \n\t\tactors.add(coin4); \n\t\tactors.add(coin5);\n\t\tactors.add(coin6); \n\t\tactors.add(coin7); \n\t\tactors.add(coin8); \n\t\tactors.add(coin9); \n\t\tactors.add(coin10);\n\t\tactors.add(mana);\n\t\tactors.add(shop);\n\t\tactors.add(npc);\n\t\tactors.add(schwerteis);\n\t\tactors.add(schildeis);\n\t\tactors.add(schwertfeuer);\n\t\tactors.add(schildfeuer);\n\t\tactors.add(healthpack);\n\t\tactors.add(quest);\n\t\tactors.add(quest2);\n\t\tactors.add(player);\n\t\t\n\t\tcheckpointx = 50;\n\t\tcheckpointy = 50;\n\n\t\t\n\t\tplayer.setOldCoins(100);\n\t\tplayer.setOldXP(0);\n\t\tplayer.setOldMana(0);\n\t\tplayer.setOldWeapon(0);\n\t\tplayer.setOldArmour(0);\n\t\tplayer.setCoins(100);\n\t\tplayer.setXP(0);\n\t\tplayer.setOldMaxhealth(100);\n\t\t\n\t\tplayer.setSkillHealth1(false);\n\t\tplayer.setSkillHealth2(false);\n\t\tplayer.setSkillStrength1(false);\n\t\tplayer.setSkillStrength2(false);\n\t\t\n\t\tplayer.setOldSkillHealth1(false);\n\t\tplayer.setOldSkillHealth2(false);\n\t\tplayer.setOldSkillStrength1(false);\n\t\tplayer.setOldSkillStrength2(false);\n\t\t\n\t\t\n\t\tskillsOnce = false;\n\t\t\n\t\t//Erstellen der Karte, wobei die ersten 3 Parameter für die Eingabedateien stehen, die erste Zahl für die Anzahl der Spalten im TileSet, die zweite für die Anzahl der Zeilen\n\t\tmap = new MapDisplay(\"resources/level/TileMap_1_1.txt\", \"resources/pics/tiles_1.gif\", \"resources/pics/shadow.png\", 5, 1, this);\n\t\t\n\t\tinitSkills();\n\t\tmenu.dispose();\n\t\tsetStarted(true);\n\t\t\n\t}",
"public GameLogic() {\n this.display = createScreen();\n playerShipHealth = 30;\n enemyShipHealth = 20;\n playerShield = 1;\n enemyShield = 1;\n playerMissile = 10;\n enemyMissile = 5;\n\n isPlayerPilotDamaged = false;\n isPlayerGunLDamaged = false;\n isPlayerGunMDamaged = false;\n isPlayerShieldDamaged = false;\n isPlayerEngineDamaged = false;\n\n isEnemyPilotDamaged = false;\n isEnemyGunLDamaged = false;\n isEnemyGunMDamaged = false;\n isEnemyShieldDamaged = false;\n isEnemyEngineDamaged = false;\n\n playerEvasionPercent = .3;\n enemyEvasionPercent = .3;\n\n }",
"public void start() {\n ArrayList<String> names = new ArrayList<>();\n game.initialize(names);\n //game.play(this.mainPkmn, this.attack);\n\n }",
"private void initVars(){\n this.dice = new Dice();\n this.playing = true;\n this.currentPlayer = 0;\n this.turn = 0;\n this.xPlayers=new ArrayList<>(); \n this.players = new Player[4];\n this.diceRoller=true;\n this.xTokens=new ArrayList<>();\n this.winners=new ArrayList<>();\n this.computerPlayer= new Autoplay();\n this.gameResults = \"\";\n this.debug = false;\n }",
"@Override\n public void init(GameContainer gc, StateBasedGame stateBasedGame) throws SlickException {\n //Clear all all objects & add them again\n objects.clear();\n objects.add(new Tower());\n objects.add(new Player());\n objects.add(new Enemy());\n\n //Clear the lists\n bulletList.clear();\n enemies.clear();\n basicTowers.clear();\n sniperTowers.clear();\n quickTowers.clear();\n bomberTowers.clear();\n\n //Set the variables when the state is initialized\n enemyCounter = 10;\n enemyHPCounter = 5;\n currentLevel = 0;\n sellTower = false;\n upgradePressed = false;\n timePassedEnemy = 0;\n\n //Loads this seperate, else the map is over-riding all drawn during the game\n loadMap.init(gc, stateBasedGame);\n\n //Run init for all objects\n for (GameObject obj : objects) {\n obj.init(gc, stateBasedGame);\n }\n\n java.awt.Font font = new java.awt.Font(\"Agency FB\", java.awt.Font.BOLD, 16);\n pauseFont = new TrueTypeFont(font,false);\n\n }",
"private void initDungeon() {\n\t\tengine = new GameEngine(map, this::handleObjectStateChange);\n\n\t\tplayer = engine.getPlayer();\n\t\tObservableList<Node> nodes = dungeonPane.getChildren();\n\n // draw grids\n resources.drawGridLine(nodes, map.getSizeX(), map.getSizeY());\n\n\t\tfor(GameObject obj: engine.getAllObjects()) {\n resources.createImageViewByGameObject(obj, nodes);\n }\n\n\n\t\tfinal LongProperty lastUpdateTime = new SimpleLongProperty(0);\n\t\tmainAnimation = new AnimationTimer() {\n\t\t\t@Override\n\t\t\tpublic void handle(long now) {\n\t\t\t\tdouble elapsedSeconds = (now - lastUpdateTime.get()) / 1000000000.0 ;\n\t\t\t\t// make sure at most go 40 ms for each frame\n\t\t\t\telapsedSeconds = elapsedSeconds > 0.04 ? 0.04 : elapsedSeconds;\n\t\t\t\ttimeConsumed += elapsedSeconds;\n\n\t\t\t\tupdatePlayerMovingStatus();\n\n\t\t\t\tif(keyPressed.contains(KeyCode.A))\n\t\t\t\t handlePlayerShootArrow();\n\n\t\t\t\tif(keyPressed.contains(KeyCode.B))\n\t\t\t\t handlePlayerSetBomb();\n\n\t\t\t\tif(updateMovingObjects(elapsedSeconds))\n\t\t\t\t return;\n\n\t\t\t\t// update timer last in case bomb went off and player is dead\n timers.updateAll((int)(elapsedSeconds * 1000));\n\t\t\t\tlastUpdateTime.set(now);\n\t\t\t}\n\t\t};\n\t\tmainAnimation.start();\n\t}",
"public void initialize() {\n // create a runner using a function\n this.createScreenBorders();\n // create a keyboard sensor.\n this.keyboard = this.runner.getGUI().getKeyboardSensor();\n //create the environment for the game (game environment and sprites collection)\n this.createEnvironment();\n // BACKGROUND CREATION //\n this.createBackground();\n // create the counters for the game.\n this.createCounters();\n // LISTENERS CREATION //\n //create a message printing listener.\n HitListener phl = new PrintingHitListener();\n //create a new block remover listener.\n HitListener blockrmv = new BlockRemover(this, blockCounter);\n //create a new ball remover listener.\n HitListener ballrmv = new BallRemover(this, ballCounter);\n //create a new score counter listener.\n HitListener scorelstn = new ScoreTrackingListener(this.scoreCounter);\n // BLOCKS CREATION //\n this.createBlocks(phl, blockrmv, scorelstn);\n // SIDE BLOCKS CREATION //\n this.createSideBlocks();\n // DEATH BLOCK CREATION //\n this.createDeathBlock(ballrmv);\n // LEVEL'S NAME //\n LevelsName name = new LevelsName(this.levelInfo.levelName());\n // add the whole-game indicators to the sprites list.\n this.sprites.addSprite(scoreIndi);\n this.sprites.addSprite(lifeIndi);\n this.sprites.addSprite(name);\n }",
"@Override\n public void initialize() {\n shooter.setShooterVelocity(speed);\n }",
"private void initializeGame() {\n score = 0;\n scoreTimer = 0;\n rockTimer = 0;\n touchActive = false;\n gameOver = false;\n gameWon = false;\n currentSpeed = 1;\n gameLevel = 1;\n speedTimer = 0;\n }",
"private void initialParameters()\n\t{\n\t\tasteroidList = new ArrayList<Asteroid>();\n\t\tfor(int i = 0 ; i < INITIAL_ASTEROIDS ; i++)\n\t\t\tasteroidList.add(new Asteroid(getRandomLocationX(), getRandomLocationY(), SCREEN_WIDTH, SCREEN_HEIGHT));\n\t\t\n\t\t//========== Game Status ===========\n\t\trunning \t= true;\n\t\tisWin \t\t= false;\n\t\tisGameOver \t= false;\n\t\t\n\t\t//========== Game Craft ===========\t\t\n\t\tcraft = new Craft(SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH, SCREEN_HEIGHT);\n\t}",
"public void startGame() {\n\t\ttank1.create(20, 530, 0, 0);\n\t\ttank1.setDefaults();\n\t\ttank2.create(960, 530, 0, 0);\n\t\ttank2.setDefaults();\n\t\tobjects.add(tank1);\n\t\tobjects.add(tank2);\n\t\tground = new Groundmod2((int) (Math.random() * 4));\n\t\tturn = Turn.PLAYER1;\n\t\tgrabFocus();\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}",
"private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\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 initialize() {\n\t\tthis.avatar = new Avatar();\n\t\tthis.pellet = new Pellet(HEIGHT, WIDTH);\n\t\tthis.wall = new Wall(HEIGHT, WIDTH);\n\n\t\t// notifies the user about the controls\n\t\tSystem.out.println(\"\\nGame controls:\");\n\t\tSystem.out.println(\"w --> move up, s --> move down, a --> move left, d --> move right\");\n\t\tSystem.out.println(\"e --> exit the game\");\n\t\t\n\t\t// display the initial score and location\n\t\tSystem.out.println(\"\\nAvatar location: \" + avatar.getLocation().getX() + \",\" + avatar.getLocation().getY());\n System.out.println(\"Points: \" + avatar.getScore());\n\t}",
"public void initGame() {\n\t\tWorld.clear();\n\t\tstate = STATE.PLAYING;\n\n\t\tWorld.add(bat1);\n\t\tWorld.add(bat2);\n\n\t\tball = new Ball(Screen.getCenterX() - Ball.WIDTH / 2,\n\t\t\t\tScreen.getCenterY() - Ball.HEIGHT / 2);\n\n\t\tWorld.add(new Wall(0, 0, Screen.getWidth(), LOWER_LIMIT));\n\t\tWorld.add(new Wall(0, UPPER_LIMIT, Screen.getWidth(), Screen\n\t\t\t\t.getHeight() - UPPER_LIMIT));\n\n\t\tWorld.add(ball);\n\n\t\tInput.register(new InputListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyDown(int eventKey) {\n\t\t\t\tif (eventKey == Keyboard.KEY_ESCAPE) {\n\t\t\t\t\tinitIntro();\n\t\t\t\t\tInput.unregister(this);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyUp(int eventKey) {\n\t\t\t}\n\t\t});\n\t\tWorld.add(new TextStatic(footerText, Screen.getCenterX()\n\t\t\t\t- footerText.length() * Sprite.CHAR_WIDTH / 2,\n\t\t\t\tSprite.CHAR_HEIGHT, Color.yellow));\n\t}",
"private void init() {\n display = new Display(title, getWidth(), getHeight());\n Assets.init();\n player = new Player(getWidth() / 2, getHeight() - 100, 1, 60, 40, this);\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 6; j++) {\n aliens.add(new Alien(150 + 50 * j, 50 + 50 * i, 1, 40, 40, this));\n }\n }\n display.getJframe().addKeyListener(keyManager);\n }",
"@Override\r\n public void init(GameContainer gc) throws SlickException {\r\n\r\n \tbulletsToRemove = new ArrayList<Body>();\r\n \tbulletsToAdd = new ArrayList<Float[]>();\r\n \tbulletList = new ArrayList<Bullet>();\r\n \t\r\n \t//Set camera coordinates and size.\r\n viewport = new Rectangle(0, 0, 1024, 600);\r\n \r\n //Load our map. (Made in a program called TILED)\r\n map1 = new TiledMap(\"data/2.tmx\");\r\n \r\n \r\n //Create our World, enter a gravity (100 default, bullets have a gravity variable of this*0.05)\r\n Vec2 gravity = new Vec2(0, 100);\r\n world = new World(gravity);\r\n \r\n //Create 2 players.\r\n //Player 1\r\n player1 = new Player(5, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player1.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n //Player 2\r\n player2 = new Player(15, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player2.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n hpbar = new Image(\"data/healthbar.png\");\r\n \r\n //If we want multiplayer, connect to the server.\r\n if(multiplayer) {\r\n \t//Connecting to someone\r\n \tisHosting = false;\r\n \tmyPlayer = player2;\r\n \thisPlayer = player1;\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Connected to server\";\r\n }\r\n else {\r\n \t//Connecting to ourselfs\r\n \tisHosting = true;\r\n \tmyPlayer = player1;\r\n \thisPlayer = player2;\r\n \tnew BFServer(true);\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Local server online\";\r\n }\r\n \r\n //Set player2's friction to only about half of ours, this will reduce \"lag\" and simulate running better.\r\n FixtureDef fd = hisPlayer.getFixture();\r\n fd.friction = 2;\r\n hisPlayer.getBody().createFixture(fd);\r\n \r\n //Get collision layer from map\r\n int collisionLayerIndex = map1.getLayerIndex(\"collision\");\r\n\r\n //Create our collision blocks in the physics engine.\r\n for(int row=0; row<map1.getWidth(); row++) {\r\n \tfor(int col=0; col<map1.getHeight(); col++) {\r\n \t\tif(map1.getTileId(row, col, collisionLayerIndex)==1) {\r\n \t\t\tBodyDef groundBodyDef = new BodyDef();\r\n \t\t\tgroundBodyDef.position.set(row*2, col*2);\r\n \t\t\tBody groundBody = world.createBody(groundBodyDef);\r\n \t\t\tPolygonShape groundBox = new PolygonShape();\r\n \t\t\tgroundBox.setAsBox(1, 1, new Vec2(1, 1), 0);\r\n \t\t\tgroundBody.createFixture(groundBox, 0);\r\n \t\t}\r\n \t}\r\n }\r\n \r\n\r\n //Setup physics world\r\n timeStep = 1.0f/60.0f;\r\n velocityIterations = 6;\r\n positionIterations = 2;\r\n \r\n //Add a new collision listener to our world.\r\n world.setContactListener(new BFContactListener());\r\n \r\n //Add Keylistener to our GameContainer.\r\n gc.getInput().addKeyListener(keylistener);\r\n \r\n //Physics debug draw. (DEPRECATED. I'm using JBox2d-2.3.0 SNAPSHOT, this debugdraw hasn't been updated for it yet)\r\n \r\n //Slick2dDebugDraw sDD = new Slick2dDebugDraw(gc.getGraphics(), gc);\r\n //sDD.setFlags(0x0001); //Setting the debug draw flags, draw polygons, no joints.\r\n //world.setDebugDraw(sDD);\r\n }",
"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 void init() {\n startMenuActionListener = new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n if (e.getActionCommand().equals(\"START\")) {\n startMenu = false;\n LevelIntermission = true;\n LevelIntermissionCount = 0;\n reset();\n requestFocusInWindow();\n }\n else if (e.getActionCommand().equals(\"EXIT\")){\n System.exit(0);\n }\n }\n };\n \n // Activating the Key Listener to listen to the applet\n this.addKeyListener(this);\n startButton = new Button(\"START\");\n exitButton = new Button(\"EXIT\");\n startButton.addActionListener(startMenuActionListener);\n exitButton.addActionListener(startMenuActionListener);\n startMenu = true;\n LevelIntermission = false;\n \n // default weapon is bullets\n one = true;\n two = false;\n three = false;\n \n // Setteing the length and width of the User Imterface\n backgroundX = 1200;\n backgroundY = 650;\n this.setSize(backgroundX, backgroundY);\n \n // Creating backround image\n offScreen = createImage(backgroundX, backgroundY);\n offG = offScreen.getGraphics();\n \n // Starting the timer - 50 frames a seconds\n timer = new Timer(20, this);\n }",
"void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }",
"private void init(){\n \tdimension.set(0.5f, 0.5f);\n \tsetAnimation(Assets.instance.goldCoin.animGoldCoin);\n \tstateTime = MathUtils.random(0.0f,1.0f);\n \t\n \t//regGoldCoin = Assets.instance.goldCoin.goldCoin;\n \t // Set bounding box for collision detection\n \tbounds.set(0,0,dimension.x, dimension.y);\n \tcollected = false;\n }",
"public void initialize() {\r\n addSprite(this.info.getBackground());\r\n createBorders();\r\n defineDeathBlock();\r\n addIndicators();\r\n BlockRemover removeBlock = new BlockRemover(this, this.remainingBlocks);\r\n// this.remainingBlocks=removeBlock.getRemainingBlocks();\r\n ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(this.score);\r\n for (int i = 0; i < info.blocks().size(); i++) {\r\n info.blocks().get(i).addHitListener(removeBlock);\r\n info.blocks().get(i).addHitListener(scoreTrackingListener);\r\n info.blocks().get(i).addToGame(this);\r\n }\r\n }",
"private void startGame() {\n\t\tentities.clear();\n\t\tinitEntities();\n\t\t\n\t\t// blank out any keyboard settings we might currently have\n\t\tleftPressed = false;\n\t\trightPressed = false;\n\t\tfirePressed = false;\n\t}",
"private void init() {\n display = new Display(title, getWidth(), getHeight()); \n Assets.init();\n player = new Player(getWidth() / 2 - 50, getHeight() - 50, 100, 30, this);\n rayo = new Rayo(getWidth() / 2 - 10, player.y - player.height , 10, 30, 0, 0, this);\n borrego = new Borrego(-80, 60 , 50, 20, 0, 0, this);\n generateEnemies();\n generateFortalezas();\n bombas= new ArrayList<Bomba>();\n \n \n display.getJframe().addKeyListener(keyManager);\n }",
"@Override\n public void surfaceCreated(SurfaceHolder holder) {\n level = 1; //sets level to 1\n bg = new Background(BitmapFactory.decodeResource(getResources(), R.drawable.highway_bg)); //get bg image\n player = new Warlock(BitmapFactory.decodeResource(getResources(), R.drawable.player_move), 64, 64, 8); //get player image\n gargants = new ArrayList<Gargant>(); // initialises gargants array\n dragons = new ArrayList<Dragon>(); // initialises dragons array\n demons = new ArrayList<Demon>(); // initialises demons array\n bullets = new ArrayList<LightningBall>(); // initialises player bullets array\n demonShots = new ArrayList<HellFire>(); // initialises demon bullets array\n\n gargantStartTime = System.nanoTime();\n dragonStartTime = System.nanoTime();\n demonStartTime = System.nanoTime();\n\n //start the game loop\n thread.setRunning(true);\n thread.start();\n }",
"private void setUp() {\n players.forEach(player -> player.draw(GameConstants.STARTING_HAND_SIZE.value()));\n }",
"private void init() {\n healthBars = new TextureAtlas( Gdx.files.internal( \"health/health.pack\" ) );\n buildUIElements();\n }",
"private void setUpGame() {\n\t\tsetUpBlocks();\n\t\tsetUpBall();\n\t\tsetUpPaddle();\n\t\taddMouseListeners();\n\t}",
"private void prepareLevel(){\n levelAnimation = true;\n\n // Reset the menace level\n menaceInterval = 1200;\n\n // Here we will initialize all the game objects\n // Make a new player space ship\n defender = new Defender(context, PlayableX, PlayableY, ExcessX);\n\n // Prepare the players bullet\n bullet = new Bullet(context, PlayableX, PlayableY, (float) 1.2);\n\n // Initialize the invadersBullets array\n for(int i = 0; i < invadersBullets.length; i++){\n invadersBullets[i] = new Bullet(context, PlayableX, PlayableY, (float) 0.80);\n }\n\n // Build an army of invaders\n numInvaders = 0;\n for(int column = 0; column < invadersColumn; column ++ ){\n for(int row = 0; row < invadersRow; row ++ ){\n invaders[numInvaders] = new Invader(context, row, column, PlayableX, PlayableY, ExcessX);\n numInvaders ++;\n }\n }\n invadersLeft = numInvaders;\n\n try {\n // Create objects of the 2 required classes\n AssetManager assetManager = context.getAssets();\n explosionEffect = new Bitmap[12];\n for (int i=0; i < 12; i++) {\n explosionEffect[i] = Bitmap.createScaledBitmap(BitmapFactory.decodeStream(assetManager.open(\"explosion/\" + (i + 1) + \".png\")), (int) (invaders[0].getLength()*1.75), (int) (invaders[0].getLength()*1.75), true);\n }\n } catch (IOException e) {\n e.printStackTrace();\n // Print an error message to the console\n Log.e(\"error\", \"failed to load explosion effect image files\");\n }\n\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 }",
"private void prepare()\n {\n addObject(player,185,196);\n player.setLocation(71,271);\n Ground ground = new Ground();\n addObject(ground,300,360);\n invent invent = new invent();\n addObject(invent,300,375);\n }",
"private void initialize() {\r\n\t\tstartScreenTexture = new Texture(Gdx.files.internal(\"death.png\"));\r\n\t\tMusicSound.deathMusic.play();\r\n\r\n\t}",
"public void initialize() {\r\n /**********************************/\r\n //this.numOfLives=new hitevent.Counter(START_NUM_LIVES);\r\n //this.blocksCounter = new hitevent.Counter(this.levelInformation.numberOfBlocksToRemove());\r\n //this.gui = new GUI(\"jumping\", WIDTH_SCREEN, HI_SCREEN);\r\n /*****************************************/\r\n //create new point to create the edges of the screen\r\n Point p1 = new Point(-5, 20);\r\n Point p2 = new Point(-5, -5);\r\n Point p3 = new Point(WIDTH_SCREEN - 20, -5);\r\n Point p4 = new Point(-5, HI_SCREEN - 15);\r\n //an array to the blocks of the edges\r\n Block[] edges = new Block[4];\r\n //create the adges of the screen\r\n Counter[] edgeCount = new Counter[4];\r\n edgeCount[0] = new Counter(1);\r\n edges[0] = new Block(new Rectangle(p1, WIDTH_SCREEN + 20, 25), Color.RED, edgeCount[0]);\r\n edgeCount[1] = new Counter(1);\r\n edges[1] = new Block(new Rectangle(p2, 25, HI_SCREEN + 20), Color.RED, edgeCount[1]);\r\n edgeCount[2] = new Counter(1);\r\n edges[2] = new Block(new Rectangle(p3, 25, HI_SCREEN + 20), Color.RED, edgeCount[2]);\r\n edgeCount[3] = new Counter(1);\r\n edges[3] = new Block(new Rectangle(p4, WIDTH_SCREEN + 20, 25), Color.RED, edgeCount[3]);\r\n\r\n //initilize the paddle\r\n initializePaddle();\r\n //sprite collection and game evnironment\r\n SpriteCollection sprite = new SpriteCollection();\r\n GameEnvironment game1 = new GameEnvironment();\r\n\r\n //add the Background of the level to the sprite collection\r\n this.addSprite(this.levelInformation.getBackground());\r\n //create score Indicator, lives Indicator and level name\r\n ScoreIndicator scoreIndicator1 = new ScoreIndicator(score);\r\n LivesIndicator livesIndicator1 = new LivesIndicator(numOfLives);\r\n LevelIndicator levelName = new LevelIndicator(this.levelInformation.levelName());\r\n\r\n game1.addCollidable((Collidable) this.paddle);\r\n sprite.addSprite((Sprite) this.paddle);\r\n sprite.addSprite((Sprite) scoreIndicator1);\r\n sprite.addSprite((Sprite) livesIndicator1);\r\n sprite.addSprite((Sprite) levelName);\r\n\r\n //add the paddle, score Indicator, lives Indicator and level name to the game\r\n this.paddle.addToGame(this);\r\n scoreIndicator1.addToGame(this);\r\n livesIndicator1.addToGame(this);\r\n levelName.addToGame(this);\r\n\r\n //initilize the Blocks\r\n initializeBlocks();\r\n\r\n }",
"synchronized public void initGfx()\n {\n // Points for initial sprite placement\n Point p1, p2, p3;\n\n p1 = getMainPoint();\n p2 = getRandomMiniPoint();\n p3 = getRandomMiniPoint();\n\n // Reset score\n score = 0;\n\n // Reset text for score\n ((TextView)findViewById(R.id.the_score_label)).setText(\"SCORE: 0\");\n\n // Set main sprite\n ((GameBoard)findViewById(R.id.the_canvas)).setMainSprite(p1.x, p1.y);\n\n // Set mini sprites\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite(p2.x, p2.y);\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite2(p3.x, p3.y);\n\n // Set game over sprite to outside screen\n ((GameBoard) findViewById(R.id.the_canvas)).setOverSprite(-2000, -2000);\n\n // Enable reset button\n ((Button)findViewById(R.id.reset_button)).setEnabled(true);\n\n frame.removeCallbacks(frameUpdate);\n ((GameBoard)findViewById(R.id.the_canvas)).invalidate();\n frame.postDelayed(frameUpdate, FRAME_RATE);\n }",
"public void initLevel(){\n baseLevel = levelCreator.createStaticGrid(this.levelFile);\n dynamicLevel= levelCreator.createDynamicGrid(levelFile);\n colDetector = new CollisionHandler();\n goalTiles = baseLevel.getTilePositions('x');\n }",
"public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}",
"public void gameInit() {\n lobbyRoom.sendPortToAll();\n lobbyRoom.sendPlayers(game.getCars());\n lobbyRoom.sendTrack(game.getTrack());\n lobbyRoom.sendPowerupManager(game.getManager());\n this.running = true;\n }",
"private void initGame() {\r\n \t//body of snake 3\r\n \t\tdots = 3;\r\n \t\t//position the body of snake behind each other initially\r\n \t\tfor(int i = 0; i < dots; i++) {\r\n \t\t\tx[i] = 50 - i * 10;\r\n \t\t\ty[i] = 50;\r\n \t\t}\r\n \t\t//call random apple\r\n \t\trandomApple();\r\n \t\t//start the timer class\r\n \t\ttimer = new Timer(DELAY, this);\r\n \t\ttimer.start();\r\n }",
"public void initGame() {\n // clear the board contents\n board.init();\n // CROSS speelt eerst\n currentPlayer = Mark.CROSS;\n currentState = GameState.PLAYING;\n // ready for start\n }",
"private void initLevel(){\r\n\t\tBetterSprite doodleSprite = (BetterSprite)(getGroup(\"doodleSprite\").getSprites()[0]);\r\n\t\tinitControls(doodleSprite);\r\n\t\tinitEvents();\r\n\t}",
"private void init() {\n this.playing = true;\n this.hand.clear();\n this.onTable = 0;\n this.points = 0;\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 }",
"@Override\r\n public void setup() {\r\n crash = new SoundFile(this, \"sounds\\\\crash.wav\");\r\n eat = new SoundFile(this, \"sounds\\\\eat.wav\");\r\n Cell.HEIGHT=CELL_HEIGHT;\r\n Cell.WIDTH=CELL_WIDTH;\r\n System.out.println(interval);\r\n\r\n initGame();\r\n }",
"void start () {\n System.out.println(\"Starting the game\");\n score = 0;\n updateScore();\n stepDelay = startingSpeed;\n isFalling = false;\n gameOver = false;\n board.clear();\n board.clearTemp();\n setNormalSpeed();\n spawnNewPiece();\n updateView();\n resetLoop();\n }",
"public void initGame() {\n // Create a new deck, with the right numbers of cards and shuffle it.\n this.deck.clear();\n this.deck.init();\n\n // Init all the players.\n for (Player player : this.players.values()) {\n player.init();\n }\n\n // Give START_NUM_CARD to each players.\n for (int i = 0; i < START_NUM_CARD; i++) {\n for (Player player : this.players.values()) {\n player.addCard(this.deck.pop());\n }\n }\n\n // Reset vars\n this.table.clear();\n this.onTableAmount = 0;\n this.numTurns = 0;\n this.newTurn = false;\n this.numPlayerInTurn = 0;\n this.currentPlayer = this.startingGamePlayer;\n\n // Subtract the blind to each players.\n this.players.get(this.currentPlayer).addToTable(this.currentSmallBlind);\n this.addOnTableAmount(this.currentSmallBlind);\n for (int i = 0; i < this.playerAmount; i++) {\n if (!(i == this.currentPlayer)) {\n this.players.get(i).addToTable(this.currentSmallBlind * 2);\n this.addOnTableAmount(this.currentSmallBlind * 2);\n }\n }\n this.currentHighestPlayerBet = currentSmallBlind * 2;\n\n // Add the first 3 cards.\n for (int i = 0; i < 3; i++) {\n this.table.push(this.deck.pop());\n }\n\n // Increment numTurns\n this.numTurns++;\n this.numGame++;\n }",
"private void startGame()\n {\n if (heroPlayer != null && antagonistPlayer != null && location != null && currentPlayerName != \"null\")\n {\n gameStarted = true;\n }\n }",
"private void initialGame() {\n Display display = this.getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n GameUtils.mWidth = size.x;\n GameUtils.mHeight = size.y;\n GameUtils.frameWidth = (int)(GameUtils.mWidth / 2.5);\n GameUtils.frameHeight = GameUtils.frameWidth;\n GameUtils.dx = GameUtils.mWidth / 120;\n GameUtils.maxVelX = GameUtils.mHeight / 15;\n GameUtils.maxVelY = GameUtils.mHeight / 8;\n\n // Bitmap\n GameUtils.bitmapPika = BitmapFactory.decodeResource(getResources(),\n R.drawable.pika_sprite_8_384);\n GameUtils.bitmapPika = Bitmap.createScaledBitmap(GameUtils.bitmapPika,\n GameUtils.frameWidth * GameUtils.frameCount, GameUtils.frameHeight, false);\n GameUtils.apple = BitmapFactory.decodeResource(getResources(), R.drawable.apple);\n GameUtils.banana = BitmapFactory.decodeResource(getResources(), R.drawable.banana);\n GameUtils.coke = BitmapFactory.decodeResource(getResources(), R.drawable.coke);\n\n GameUtils.bitmapRestart = BitmapFactory.decodeResource(getResources(), R.drawable.restart);\n GameUtils.bitmapRestart = Bitmap.createScaledBitmap(GameUtils.bitmapRestart,\n GameUtils.mWidth / 12, GameUtils.mWidth / 12, false);\n GameUtils.bitmapPause = BitmapFactory.decodeResource(getResources(), R.drawable.pause);\n GameUtils.bitmapPause = Bitmap.createScaledBitmap(GameUtils.bitmapPause,\n GameUtils.mWidth / 15, GameUtils.mWidth / 15, false);\n\n // Game Data\n GameUtils.WIN = true;\n GameUtils.score = 0;\n GameUtils.apples = 0;\n GameUtils.bananas = 0;\n GameUtils.cokes = 0;\n GameUtils.jumps = 0;\n GameUtils.totalSec = GameUtils.totalTime;\n GameUtils.visibleFruit = 0;\n }",
"public void initializeScoringVariables(){\n\t\tgame.setMovement(moveDistance);\n\t\tgame.setRight(correctGuess);\n\t\tgame.setWrong(incorrectGuesses);\n\t\tgame.setTime(duration(startTime,endTime));\n\t}",
"private void init() {\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager); //lets us access keyboard\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\tAssets.init();\n\t\t\n\t\tgameCamera = new GameCamera(this, 0,0);\n\t\thandler = new Handler(this);\n\t\t\n\t\tgameState = new GameState(handler);\n\t\tmenuState = new MenuState(handler);\n\t\tsettingState = new SettingState(handler);\n\t\tmapState = new mapState(handler);\n\t\tmansionState = new mansionState(handler);\n\t\tparkState = new parkState(handler);\n\t\tjazzState = new jazzState(handler);\n\t\tmansionGardenState = new mansionGardenState(handler);\n\t\tmansionArcadeState = new mansionArcadeState(handler);\n\t\tmansionStudyState = new mansionStudyState(handler);\n\t\tjazzPRoomState = new jazzPRoomState(handler);\n\t\tState.setState(menuState);\n\t}",
"public void init(){\n\t\n\t\t//background init\n\t\tthis.background = new Sprite(this.scene, \"space-backdrop.png\", 1280 * 5, 800 * 5);\n\t\tthis.background.setBoundAction(\"background\");\n\t\tthis.background.setSpeedScale(0.2);\n\t\tthis.background.setSpeed(0);\n\t\tthis.sprites.add(this.background);\n\t\t\n\t\t//compass init\n\t\tthis.compass = new Sprite(this.scene, \"compass.png\", 100, 100);\n\t\tthis.compass.setSpeed(0);\n\t\tthis.compass.setPosition(this.compass.getWidth() / 2, this.scene.getHeight() - this.compass.getHeight() / 2);\n\t\t\n\t\t//earth init\n\t\tthis.earth = new Planet(this.scene, \"earth.png\", 4800, 4800);\n\t\tthis.earth.setSpeed(0);\n\t\tthis.earth.setPosition(0, 7000);\n\t\tthis.earth.setBoundAction(\"continue\");\n\t\tthis.sprites.add(this.earth);\n\t\t\n\t\t//ship init\n\t\tthis.mainSprite = new Ship(this.scene, \"cannon.png\", 50, 50, this.k);\n\t\tthis.mainSprite.keyListen = true;\n\t\tthis.mainSprite.setSpeed(0);\n\t\tthis.mainSprite.setPosition(this.scene.getWidth() / 2, this.scene.getHeight() / 2);\n\t\t\n\t\t//asteroids init\n\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", 250, 250, this));\n\t\tthis.asteroids.get(0).setBoundAction(\"continue\");\n\t\tthis.asteroids.get(0).setSpeed(0);\n\t\tthis.asteroids.get(0).setPosition(0, 0);\n\t\tthis.sprites.add(this.asteroids.get(0));\n\t\t\n\t\tfor(int i = 1; i < 200; i++){\n\t\t\t\n\t\t\tint size = (int) Math.round(Math.random() * 400 + 50);\n\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\n\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t}\n\t\t\t\n\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t}\n\t\t\t\n\t\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", size, size, this));\n\t\t\tthis.asteroids.get(i).setBoundAction(\"continue\");\n\t\t\tthis.asteroids.get(i).setSpeed(0);\n\t\t\tthis.asteroids.get(i).setPosition(x, y);\n\t\t\t\n\t\t\tthis.sprites.add(this.asteroids.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t//chest init\n\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\tthis.chests.get(0).setBoundAction(\"continue\");\n\t\tthis.chests.get(0).setSpeed(0);\n\t\tthis.chests.get(0).setPosition(500, 500);\n\t\tthis.sprites.add(this.chests.get(0));\n\t\t\n\t\tfor(int i = 1; i < this.numChests; i++){\n\t\t\t\n\t\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\t\tthis.chests.get(i).setBoundAction(\"continue\");\n\t\t\tthis.chests.get(i).setSpeed(0);\n\t\t\t\n\t\t\tboolean keepGoing = true;\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t\n\t\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.chests.get(i).setPosition(x, y);\n\t\t\t\t\n\t\t\t\t//check for collisions with asteroids\n\t\t\t\tboolean colliding = false;\n\t\t\t\tfor(int j = 0; j < this.asteroids.size() && colliding == false; j++){\n\t\t\t\t\tif(this.asteroids.get(j).collidesWith(this.chests.get(i))){\n\t\t\t\t\t\tcolliding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tkeepGoing = colliding;\n\t\t\t\t\n\t\t\t}while(keepGoing);\n\t\t\t\n\t\t\tthis.sprites.add(this.chests.get(i));\n\t\t\t\n\t\t}//end for\n\t\n\t\tthis.scene.start();\n\t\t\n\t\tSystem.out.println(\"==== Welcome to Space Smuggler! ====\");\n\t\tSystem.out.println(\"(WASD to move)\");\n\t\tSystem.out.println(\"Follow your compass in the bottom left corner to find treasure.\");\n\t\tSystem.out.println(\"Collect all of the treasure, then follow your compass to Earth!\");\n\t\tSystem.out.println(\"Watch out for the asteroids though, their gravitational pull is strong!\");\n\t\tSystem.out.println(\"Crashing into one will certainly kill you! D:\");\n\t\tSystem.out.println(\"Good Luck!\");\n\t\t\n\t}",
"private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }",
"public void initMultiPlayer() {\n\t\tWorld.clear();\n\t\tstate = STATE.MENU;\n\t\tconfig[0] = new PlayerConfig(\"LEFTIE\", Keyboard.KEY_W, Keyboard.KEY_S,\n\t\t\t\tKeyboard.KEY_D, 0);\n\t\tconfig[1] = new PlayerConfig(\"RIGHTIE\", Keyboard.KEY_UP,\n\t\t\t\tKeyboard.KEY_DOWN, Keyboard.KEY_LEFT, 1);\n\n\t\tbat1 = new Bat(100, Screen.getCenterY() - Bat.HEIGHT / 2, config[0]);\n\n\t\tbat2 = new Bat(Screen.getWidth() - 100, Screen.getCenterY()\n\t\t\t\t- Bat.HEIGHT / 2, config[1]);\n\t\tfetchControlInput(config[0], new Callback() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tWorld.clear();\n\t\t\t\tfetchControlInput(config[1], new Callback() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinitGame();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}",
"@Override\r\n\tpublic void start() {\r\n\t\tsuper.start();\r\n\t\tresetDice();\r\n\t\tclearPlayer();\r\n\t\t// changing the state of all the players to playing.\r\n\r\n\t\tsuccessID = 0;\r\n\t\t// 输家ID\r\n\t\tfailID = 0;\r\n\r\n\t\tint taxes = hallType.getSystemTaxes();\r\n\t\tList<Player> list = getAllPlayers();\r\n\t\tfor (Player player : list) {\r\n\t\t\tplayer.setPlayerState(PlayerState.Playing);\r\n\t\t\tplayer.getPlayerDetail().addCoins(taxes * -1);\r\n\t\t\taddPlayer(player);\r\n\r\n\t\t\tplayer.resetPlayer(hallType.getGameType());\r\n\t\t}\r\n\t\tint gamePlayerCount = list.size();// 记录游戏类型的局数\r\n\t\tGameMgr.addGameTypeCount(gamePlayerCount);\r\n\t\tsendUpdatePlayerState();\r\n\r\n\t\tsortQueue();\r\n\t\tSendGameStart(taxes);\r\n\t\tgameState = GameState.Playing;\r\n\r\n\t\tWaitTime(1 * 1000);\r\n\t\t// checkState(0);\r\n\r\n\t}",
"public void initUI(){\n\n playerSprite = new PlayerSprite(context, 150 * MainView.SCALE_WIDTH, background.getBottom(), 0.3f * MainView.SCALE_WIDTH, 0.30f * MainView.SCALE_WIDTH);\n enemySprite = new EnemySprite(context, (MainView.WIDTH - 150) * MainView.SCALE_WIDTH, background.getBottom(), 0.3f * MainView.SCALE_WIDTH, 0.30f * MainView.SCALE_WIDTH);\n if(encountered)\n enemySprite.setEnemySprite(enemy.getId());\n\n /*\n create header here\n */\n playerStatus = new PlayerStatus(context,player, 0, background.getBottom());\n }",
"private void init() throws IOException {\n //Initializing a new Display\n this.display = new Display(title, width, height);\n this.background = new SpriteSheet(gfx.loader(\"/images/RoadTile3.png\"));\n this.inputHandler = new InputHandler(this.display);\n Assets.init();\n\n gameState = new GameState();\n StateManager.setState(gameState);\n\n player = new Player();\n enemies = new ArrayList<>();\n }",
"public void init() {\n if (!getLocation().isTileMap()) {\n //Debug.signal( Debug.NOTICE, null, \"PlayerImpl::init\");\n this.animation = new Animation(this.wotCharacter.getImage(), ClientDirector.getDataManager().getImageLibrary());\n this.sprite = (Sprite) this.wotCharacter.getDrawable(this);\n this.brightnessFilter = new BrightnessFilter();\n this.sprite.setDynamicImageFilter(this.brightnessFilter);\n }\n this.movementComposer.init(this);\n }",
"public void startGame() {\r\n this.setupGame();\r\n }",
"private void initLevel() {\n addKeyListener(new TAdapter());\r\n addMouseListener(new MAdapter());\r\n\r\n setFocusable(true);\r\n setPreferredSize(new Dimension(Common.WIDTH, Common.HEIGHT));\r\n\r\n gameInit();\r\n }",
"public void initGame() {\n board.init(); // clear the board contents\n currentPlayer = Seed.CROSS; // CROSS plays first\n currentState = GameState.PLAYING; // ready to play\n }",
"@BeforeEach\n void init() {\n player = Mockito.mock(Player.class);\n level = Mockito.mock(Level.class);\n pointCalculator = Mockito.mock(PointCalculator.class);\n game = new SinglePlayerGame(player, level, pointCalculator);\n }",
"protected void initialize() {\n timeStarted = timeSinceInitialized();\n RobotMap.shootState=true;\n this.setTimeout(2.0);\n }",
"private void setupGame() {\n \tdrawBricks();\n \tdrawPaddle();\n \tdrawBall(); \t\n \tsetInitialBallVelocity();\n }",
"@Override\n\tpublic void init() {\n\t\tloadSpritesheet();\n\t\tloadSounds();\n\t\tinitIntro();\n\t}",
"private void GameInitialize()\r\n { \r\n // set to fullscreen to use the entire \r\n // display or false to only use\r\n // the area inbetween the two bars on the display\r\n setFullScreenMode(true);\r\n\r\n // setup 3D\r\n try\r\n {\r\n Object3D[] buffer = Loader.load(\"/RaptorWalk.m3g\");\r\n\r\n for(int i = 0; i < buffer.length; i++)\r\n {\r\n if(buffer[i] instanceof World)\r\n {\r\n // get our world node\r\n mWorld = (World)buffer[i];\r\n mEnemy = (SkinnedMesh)mWorld.find(56);\r\n mEnemyTimer = 0;\r\n break;\r\n }\r\n }\r\n }\r\n catch(Exception e) \r\n { System.out.println(\"Loading error!\" + e.getMessage()); }\r\n\r\n // create a game font\r\n mGameFont = Font.getFont(Font.FACE_MONOSPACE, \r\n Font.STYLE_PLAIN, Font.SIZE_SMALL);\r\n\r\n // Get the active camera from the world\r\n mCam = mWorld.getActiveCamera();\r\n mCam.translate(0, 1.0f, 0);\r\n\r\n // Create an ambient light and add it to the world node\r\n Light light = new Light();\r\n light.setMode(Light.AMBIENT);\r\n light.setIntensity(3);\r\n mWorld.addChild(light);\r\n }",
"private void initEntities() {\n\t\tship = new ShipEntity(this,\"ship.gif\",370,550);\n\t\tentities.add(ship);\n\t\tscore = 0;\n\t\t// create a block of aliens (5 rows, by 12 aliens, spaced evenly)\n\t\talienCount = 0;\n\t\tfor (int row=0;row<5;row++) {\n\t\t\tfor (int x=0;x<12;x++) {\n\t\t\t\tEntity alien = new AlienEntity(this,\"alien.gif\",100+(x*50),(50)+row*30);\n\t\t\t\tentities.add(alien);\n\t\t\t\talienCount++;\n\t\t\t}\n\t\t}\n\t}",
"public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }",
"void game_setup(){\n game_text_setup();\n ship_setup();\n alien_setup();\n timer.start(); // this timer will be stopped automatically by JavaFX when the program terminates\n }",
"protected void initialize() {\n \t\n \tstart_time = System.currentTimeMillis();\n \t\n \tgoal = start_time + duration;\n }",
"private void initLevel () \n {\n score = 0;\n scoreVisual = score;\n level = new Level(Constants.LEVEL_01);\n cameraHelper.setTarget(level.bird);\n initPhysics();\n }",
"private void initShooter() {\n m_task = new ShooterThread(this);\n m_task.start();\n }",
"public void newGame(){\n\t\tsoundMan.BackgroundMusic1();\n\n\t\tstatus.setGameStarting(true);\n\n\t\t// init game variables\n\t\tbullets = new ArrayList<Bullet>();\n\n\t\tstatus.setShipsLeft(8);\n\t\tstatus.setGameOver(false);\n\n\t\tif (!status.getNewLevel()) {\n\t\t\tstatus.setAsteroidsDestroyed(0);\n\t\t}\n\n\t\tstatus.setNewAsteroid(false);\n\n\t\t// init the ship and the asteroid\n\t\tnewShip(gameScreen);\n\t\tnewAsteroid(gameScreen);\n\n\t\t// prepare game screen\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic2();\n\t\tsoundMan.StopMusic3();\n\t\tsoundMan.StopMusic4();\n\t\tsoundMan.StopMusic5();\n\t\tsoundMan.StopMusic6();\n\t\t// delay to display \"Get Ready\" message for 1.5 seconds\n\t\tTimer timer = new Timer(1500, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameStarting(false);\n\t\t\t\tstatus.setGameStarted(true);\t\n\n\t\t\t\tstatus.setLevel(1);\n\t\t\t\tstatus.setNumLevel(1);\n\t\t\t\tstatus.setScore(0);\n\t\t\t\tstatus.setYouWin(false);\n\t\t\t\tstatus.setBossLife(0);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}",
"private void prepareGame()\n {\n Rocket rocket = new Rocket();\n \n scoreCounter = new Counter(\"Score: \");\n \n addObject(rocket, getWidth()/2 + 100, getHeight()/2);\n \n addObject(scoreCounter, 60, 480);\n \n //TODO (69): Make a method call to addAsteroids that uses your constant for the number of asteroids\n addAsteroids(START_ASTEROIDS);\n }",
"public void initialise_new_game() {\n\n data.read_from_file(\"maxus2.txt\");\n\n mySound.initialise();\n\n pacman.init();\n ghost.init();\n\n score.initialise();\n }",
"public void robotInit() {\r\n\r\n shootstate = down;\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n initialpot = Components.ShooterPot.getAverageVoltage();\r\n //shootpotdown +=initialpot;\r\n //shootpotlow+= initialpot;\r\n //shootpotmiddle+= initialpot;\r\n //shootpothigh+=initialpot;\r\n\r\n }",
"public Game()\r\n\t{\r\n\t\tenemy = new ArrayList<Enemy>();\r\n\t\tbullets = new ArrayList<Bullet>();\r\n\t\tplatforms = new ArrayList<Platforms>();\r\n\t\tsetAlive(false);\r\n\t\tlevel = 1;\r\n\t\tscore = 0;\r\n\t}",
"protected void initialize() {\n finished = false;\n Robot.shooter.Spin();//Spin up wheels\n Timer.delay(3);\n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n //Robot.shooter.Stop();\n Robot.shooter.TriggerExtend();//Reset Trigger\n \n Robot.driveTrain.DriveBack();//Drives backwards from pyramid\n Timer.delay(1.5);\n Robot.driveTrain.TurnAround();//Turns Bob around\n Timer.delay(1);\n Robot.driveTrain.Stop();//Stops Bob\n \n Robot.pneumatics.CompressorOn();//Turns compressor on\n }",
"protected void initialize() {\n \tsetShowStartScreen(false);\n \t\n \t// do not preload resources, for this very simple game\n \t// preloadResources();\n \t\n \t// Max number of balls is just 17\n \tchains.setMaxBalls(17);\n }",
"public static void initManager() {\n theManager = new LevelManager();\n lives = 3;\n }",
"@Override\r\n \tpublic void init(GameContainer gc) throws SlickException \r\n \t{\r\n \t\t// Initialization of map, camera, player, pathfinding\r\n \t\ttheMap = new TiledMap(\"res/tilemap01.tmx\");\r\n \t\tthePTBMap = new PropertyTileBasedMap(theMap);\r\n \t\tcamera = new Camera(0f, 0f);\r\n \t\tunitOne = new Player(64f, 64f);\r\n \t\tunitTwo = new Player(64f, 128f);\r\n \t\tpathFinder = new AStarPathFinder(thePTBMap, 100, false);\r\n \t\t\r\n \t\t// player's animation. Need a better way to deal with it\r\n \t\t\r\n \t\tint duration[] = {200, 200, 200};\r\n \t\tSpriteSheet character = new SpriteSheet(\"res/monsters.png\", tileSize, tileSize);\r\n \t\tImage[] walkUp = {character.getSubImage(6, 1), character.getSubImage(7, 1), character.getSubImage(8, 1)};\r\n \t\tImage[] walkDown = {character.getSubImage(0, 1), character.getSubImage(1, 1), character.getSubImage(2, 1)};\r\n \t\tImage[] walkLeft = {character.getSubImage(9, 1), character.getSubImage(10, 1), character.getSubImage(11, 1)};\r\n \t\tImage[] walkRight = {character.getSubImage(3, 1), character.getSubImage(4, 1), character.getSubImage(5, 1)};\r\n \t\t\r\n \t\tmovingUp = new Animation(walkUp, duration, true);\r\n \t\tmovingDown = new Animation(walkDown, duration, true);\r\n \t\tmovingLeft = new Animation(walkLeft, duration, true);\r\n \t\tmovingRight = new Animation(walkRight, duration, true);\r\n \t\t\r\n \t\tunitOne.setMovement(movingDown);\r\n \t\tunitTwo.setMovement(movingDown);\r\n \t}",
"public void startGame()\n\t{\n\t\tdead = false;\n\t\tpaused = false;\n\t\ttime = 0;\n\t\tclock = 0;\n\t\tdirection = RIGHT;\n\t\tdirection2 = RIGHT2;\n\t\thead = new Point(0, -1);\n\t\thead2 = new Point(58, -1);\n\t\ttronBody.clear();\n\t\ttronBody2.clear();\n\t\ttimer.start();\n\t\tlast_direction = 'R';\n\t\tlast_key = 'R';\n\t\tlast_direction2 = 'R';\n\t\tlast_key2 = 'R';\n\t\t\n\t}",
"void initializePlayer();",
"public void setup()\n {\n this.p = Player.getInstance();\n\n this.imageStore = new ImageStore(\n createImageColored(TILE_WIDTH, TILE_HEIGHT, DEFAULT_IMAGE_COLOR));\n this.world = new WorldModel(WORLD_ROWS, WORLD_COLS,\n createDefaultBackground(imageStore));\n this.view = new WorldView(VIEW_ROWS, VIEW_COLS, this, world,\n TILE_WIDTH, TILE_HEIGHT);\n this.scheduler = new EventScheduler(timeScale);\n\n background = loadImage(\"images\\\\farm2.jpg\");\n background.resize(VIEW_WIDTH, VIEW_HEIGHT);\n\n loadImages(IMAGE_LIST_FILE_NAME, imageStore, this);\n loadWorld(world, LOAD_FILE_NAME, imageStore);\n\n scheduleActions(world, scheduler, imageStore);\n\n next_time = System.currentTimeMillis() + TIMER_ACTION_PERIOD;\n }",
"public void initPlayer();",
"public void initialize() {\r\n levelInformation.getBackground().addToGame(this);\r\n ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(score);\r\n ScoreIndicator scoreIndicator = new ScoreIndicator(score, guiWidth);\r\n BlockRemover blockRemover = new BlockRemover(this, blockCounter);\r\n BallAdder ballAdder = new BallAdder(this, environment, ballCounter);\r\n BallRemover ballRemover = new BallRemover(this, ballCounter);\r\n for (Block blocks : levelInformation.blocks()) {\r\n Block block = blocks;\r\n if (block.getColor() == Color.black) {\r\n block.addHitListener(ballRemover);\r\n }\r\n if (block.getColor() == Color.magenta) {\r\n block.addHitListener(ballAdder);\r\n }\r\n block.addHitListener(blockRemover);\r\n block.addHitListener(scoreTrackingListener);\r\n block.addToGame(this);\r\n }\r\n blockCounter.increase(levelInformation.numberOfBlocksToRemove());\r\n Paddle paddle = new Paddle(new Rectangle(new Point((guiWidth / 2) - (levelInformation.paddleWidth() / 2),\r\n 580), levelInformation.paddleWidth(), 10), Color.YELLOW, keyboard, levelInformation.paddleSpeed());\r\n paddle.addToGame(this);\r\n Block top = new Block(new Rectangle(new Point(0, 0), 800, 20), Color.GRAY);\r\n Block left = new Block(new Rectangle(new Point(0, 10), wallWidth, 630), Color.GRAY);\r\n Block right = new Block(new Rectangle(new Point(guiWidth - wallWidth, 10), wallWidth, 630), Color.GRAY);\r\n Block bottom = new Block(new Rectangle(new Point(0, guiHeight), 800, 10), Color.GRAY);\r\n bottom.addToGame(this);\r\n right.addToGame(this);\r\n left.addToGame(this);\r\n top.addToGame(this);\r\n bottom.addHitListener(ballRemover);\r\n scoreIndicator.addToGame(this);\r\n }",
"public void startGame() {\n\t\tinitChips();\n\t\tassignAndStartInitialProjects();\n\t}",
"private void init()\r\n\t{\r\n\t\ttry {\r\n\t\t\tThread.currentThread().getContextClassLoader().getResourceAsStream(\"d\").read(board);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tzp = 0;\r\n\t\txp = 0.5f;\r\n\t\typ = 0.5f;\r\n\t\tvx = 0;\r\n\t\tvy = 0;\r\n\t\tstarted = false;\r\n\t\tmsg = \"PRESS ENTER\";\r\n\t\tint[] levelTimes = {80,80,99,99,99};\r\n\t\ttimers[0] = levelTimes[l]*1000;\r\n\t\ttoggles = 0;\r\n\t\t\r\n\t\tif (complete) {\r\n\t\t\tl++;\r\n\t\t\t// LEVELS\r\n\t\t\tif (l >= 5) {\r\n\t\t\t\tl = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//ports.clear();\r\n\t\tports[99][0] = 0;\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\t\r\n\t\t\t\tif (tile == 3) {\r\n\t\t\t\t\txp = x+0.5;\r\n\t\t\t\t\typ = y+0.5;\r\n\t\t\t\t}\r\n\t\t\t\tif (tile == 14) {\r\n\t\t\t\t\ttoggles++;\r\n\t\t\t\t}\r\n\t\t\t\tif (tile == 12) {\r\n\t\t\t\t\tports[ports[99][0]][0] = x;\r\n\t\t\t\t\tports[ports[99][0]][1] = y;\r\n\t\t\t\t\tports[99][0]++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcomplete = false;\r\n\t}",
"public void gameStarted() {\n\t\treset();\n\t\tSystem.out.println(\"Game Started\");\n\n\t\t// allow me to manually control units during the game\n\t\tbwapi.enableUserInput();\n\t\t\n\t\t// set game speed to 30 (0 is the fastest. Tournament speed is 20)\n\t\t// You can also change the game speed from within the game by \"/speed X\" command.\n\t\tbwapi.setGameSpeed(20);\n\t\t\n\t\t// analyze the map\n\t\tbwapi.loadMapData(true);\n\t\t\n\n\t\t// This is called at the beginning of the game. You can \n\t\t// initialize some data structures (or do something similar) \n\t\t// if needed. For example, you should maintain a memory of seen \n\t\t// enemy buildings.\n\t\tbwapi.printText(\"This map is called \"+bwapi.getMap().getName());\n\t\tbwapi.printText(\"Enemy race ID: \"+String.valueOf(bwapi.getEnemies().get(0).getRaceID()));\t// Z=0,T=1,P=2\n\t\t\n\t\tmanagers.put(ArmyManager.class.getSimpleName(), ArmyManager.getInstance());\n\t\tmanagers.put(BuildManager.class.getSimpleName(), BuildManager.getInstance());\n\t\tmanagers.put(ResourceManager.class.getSimpleName(), ResourceManager.getInstance());\n\t\tmanagers.put(ScoutManager.class.getSimpleName(), ScoutManager.getInstance());\n\t\tmanagers.put(TrashManager.class.getSimpleName(), TrashManager.getInstance());\n\t\tmanagers.put(UnitManager.class.getSimpleName(), UnitManager.getInstance());\n\t\tfor (Manager manager : managers.values())\n\t\t\tmanager.reset();\n\t}",
"public void init() {\n state = new GameState();\n gameFrame.addKeyListener(state.getKeyListener());\n gameFrame.addMouseListener(state.getMouseListener());\n gameFrame.addMouseMotionListener(state.getMouseMotionListener());\n gameFrame.addFocusListener(new FocusAdapter() {\n @Override\n public void focusLost(FocusEvent e) {\n state.resetKeys();\n }\n });\n gameFrame.addMouseWheelListener(e -> {\n if (Map.map != null) {\n if (e.getWheelRotation() < 0)\n Map.zoomIn();\n else\n Map.zoomOut();\n }\n });\n //Pause Key Setting\n gameFrame.addKeyListener(new KeyAdapter() {\n @Override\n public void keyPressed(KeyEvent e) {\n keyPressed = true;\n if (e.getKeyCode() == KeyEvent.VK_ESCAPE && !gameFinished)\n pause();\n if (e.getKeyCode() == KeyEvent.VK_F1)\n GameFrame.testMode = !GameFrame.testMode;\n }\n });\n gameFrame.addMouseListener(new MouseAdapter() {\n @Override\n public void mouseClicked(MouseEvent e) {\n keyPressed = true;\n }\n });\n\n gameFrame.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n if (e.getKeyChar() >= 'a' && e.getKeyChar() <= 'z')\n Cheater.keyPressed(e.getKeyChar());\n }\n });\n }"
] | [
"0.7248329",
"0.7196519",
"0.70506215",
"0.6946902",
"0.6941218",
"0.69139606",
"0.6888378",
"0.6865154",
"0.68583405",
"0.683504",
"0.67911327",
"0.6753073",
"0.67371607",
"0.67192125",
"0.67011297",
"0.66919625",
"0.6660937",
"0.6660587",
"0.66473234",
"0.66277695",
"0.66193074",
"0.6561263",
"0.6557995",
"0.6554775",
"0.6551776",
"0.65341294",
"0.65295905",
"0.6521153",
"0.65018517",
"0.6487456",
"0.64851344",
"0.6481622",
"0.6477069",
"0.64740795",
"0.6468256",
"0.6464252",
"0.64620364",
"0.6458303",
"0.645426",
"0.6450518",
"0.64385015",
"0.64273274",
"0.6413926",
"0.6408722",
"0.64084023",
"0.63986444",
"0.6392381",
"0.6389353",
"0.63827926",
"0.6377651",
"0.63750994",
"0.63696724",
"0.6362692",
"0.6361769",
"0.63591653",
"0.6354005",
"0.63440126",
"0.6341299",
"0.6333726",
"0.63306147",
"0.63304114",
"0.6325664",
"0.63242286",
"0.6320798",
"0.63092095",
"0.63021994",
"0.63002473",
"0.62996435",
"0.62953264",
"0.62897813",
"0.62747234",
"0.6273801",
"0.6273408",
"0.6269699",
"0.6267858",
"0.6267048",
"0.6264649",
"0.6263604",
"0.62608474",
"0.62507975",
"0.62495327",
"0.62461156",
"0.6245352",
"0.62436503",
"0.62359303",
"0.6235526",
"0.62352234",
"0.6211663",
"0.62024534",
"0.6191319",
"0.61870867",
"0.618485",
"0.6180263",
"0.61784834",
"0.6174634",
"0.6173028",
"0.6169367",
"0.6166508",
"0.61642665",
"0.6161927"
] | 0.79875875 | 0 |
Returns the id of the players character model | public byte get_charId(){
return character_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getPlayerId();",
"int getPlayerId();",
"int getPlayerId();",
"public int getPlayerId();",
"public int getId() {\n return playerId;\n }",
"long getPlayerId();",
"public int getIdPlayer() {\n\t\treturn idPlayer;\n\t}",
"public String getId() {\n\t\treturn this.playerid;\n\t}",
"public int getCharacterId() {\n return characterId;\n }",
"public int getPlayerId() {\r\n\t\treturn playerId;\r\n\t}",
"public long getPlayerId() {\n return playerId_;\n }",
"public Integer getPlayerId() {\n return PlayerId;\n }",
"public long getCharacterId() {\n return this.characterId;\n }",
"public String getPlayerId() {\n\t\treturn playerId;\n\t}",
"String getGameId();",
"public int getPlayerID(){\n\t\treturn 0;\n\t\t/*\n\t\ttry{\n\t\t\tint player_id=-1;\t\t\t//save player_id, start with -1 as unknown\n\t\t\tString request = \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"method\\\": \\\"Player.GetActivePlayers\\\", \\\"id\\\": 1}\";\n\t\t\tString url = kodiURL + URLEncoder.encode(request, \"UTF-8\");\n\t\t\t//send request\n\t\t\tJSONObject result = Connectors.httpGET_JSON(url.trim());\n\t\t\tSystem.out.println(\"result: \" + result);\t\t//debug\n\t\t\t//connection error\n\t\t\tif (result.toJSONString().trim().matches(\".*<connection error>.*\")){\n\t\t\t\treturn -2;\n\t\t\t}\n\t\t\tplayer_id = Integer.parseInt(result.get(\"id\").toString());\n\t\t\treturn player_id;\t\t//return ID if found\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn -1;\n\t\t}\n\t\t*/\n\t}",
"public long getPlayerId() {\n return playerId_;\n }",
"public byte getPlayerId() {\n return playerId;\n }",
"UUID getActivePlayerId();",
"public int getPlayerID() {\r\n return playerID;\r\n }",
"public int getPlayerID() {\n return playerID;\n }",
"public String getPlayerID() {\n return playerID;\n }",
"public int getPlayerID() {\r\n\t\treturn playerID;\r\n\t}",
"public int getPlayerID() {\r\n\t\treturn playerID;\r\n\t}",
"public int getPlayerID() {\n\t\treturn playerID;\n\t}",
"public Character Id() {\n return null;\n }",
"public String generatePlayerID() {\n List<Player> players = getAllOrdered();\n int idNum;\n \n if (players == null || players.isEmpty())\n idNum = 0;\n else {\n String idStr = players.get(players.size() - 1).getPlayerID();\n idNum = Integer.parseInt(idStr.substring(2, idStr.length()));\n }\n \n String playerID;\n int newIdNum = idNum + 1;\n if (newIdNum <= 9)\n playerID = \"P_000\" + newIdNum;\n else if (newIdNum <= 99) \n playerID = \"P_00\" + newIdNum;\n else if (newIdNum <= 999)\n playerID = \"P_0\" + newIdNum;\n else \n playerID = \"P_\" + newIdNum;\n \n return playerID;\n }",
"public PlayerID getID()\r\n\t{\r\n\t\treturn ID;\r\n\t}",
"com.google.protobuf.ByteString\n getPlayerIdBytes();",
"public java.lang.String getPlayerId() {\n java.lang.Object ref = playerId_;\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 playerId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public long getModelId();",
"@java.lang.Override\n public java.lang.String getPlayerId() {\n java.lang.Object ref = playerId_;\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 playerId_ = s;\n return s;\n }\n }",
"@Override\n public String getModel() {\n return aircraftId.getModel();\n }",
"public char getId() {\n return id;\n }",
"public char getId() {\n return this.id;\n }",
"public char getID() {\n return this.id;\n }",
"java.lang.String getLobbyId();",
"public com.google.protobuf.ByteString\n getPlayerIdBytes() {\n java.lang.Object ref = playerId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n playerId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getPlayerIdBytes() {\n java.lang.Object ref = playerId_;\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 playerId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public int getId() {\n return (roomId);\n }",
"public int getPlayerNumber() {\n\t\tint playerNumber=super.getPlayerNumber();\n\t\treturn playerNumber;\n\t}",
"public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}",
"public Integer getModelId() {\r\n return modelId;\r\n }",
"public int charNum() {\n return myId.charNum();\n }",
"public int getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public String getPrimaryKey() {\n return getBasicChar().getPrimaryKey();\n }",
"@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _esfTournament.getPrimaryKey();\n\t}",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"int getId();",
"public int getPickedPlayerID()\n {\n return picked;\n }",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();"
] | [
"0.7420317",
"0.7215148",
"0.7215148",
"0.71404237",
"0.7039048",
"0.69845617",
"0.68315434",
"0.67993015",
"0.67654234",
"0.6568335",
"0.6560086",
"0.6557631",
"0.6550926",
"0.65470785",
"0.65261537",
"0.65110636",
"0.6501861",
"0.64693004",
"0.64677083",
"0.6451552",
"0.6451287",
"0.6434532",
"0.6432783",
"0.6432783",
"0.6388633",
"0.6353486",
"0.6349916",
"0.63352996",
"0.6326681",
"0.63265806",
"0.62868255",
"0.62812835",
"0.6254702",
"0.624849",
"0.6164193",
"0.6049408",
"0.59803003",
"0.5974936",
"0.5973788",
"0.5962143",
"0.5960635",
"0.58829015",
"0.58777916",
"0.58589315",
"0.58330935",
"0.58300406",
"0.5828092",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5815034",
"0.5813988",
"0.5813641",
"0.5813641",
"0.5813641",
"0.5813641",
"0.5813641",
"0.5813641",
"0.5813641",
"0.5813641",
"0.5813641",
"0.5813641"
] | 0.6009473 | 36 |
Sets the id of the players character model | public void set_charId(byte id){
character_id = id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPlayerId(int playerId);",
"void setId(int id);",
"void setId(String id);",
"void setId(String id);",
"void setId(String id);",
"public Builder setPlayerId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n playerId_ = value;\n onChanged();\n return this;\n }",
"public void setId (String id);",
"public void setId(int newId) {\n roomId = newId;\n }",
"public void setId(int id);",
"public void setId(int id);",
"public void setPlayerId(String s) {\n\t\tplayerId = s;\n\t}",
"public void setId(String id);",
"public void setId(String id);",
"public void setId(String id) {\n }",
"public Builder setPlayerId(long value) {\n \n playerId_ = value;\n onChanged();\n return this;\n }",
"void setId(java.lang.String id);",
"public void assignId(int id);",
"void setId(ID id);",
"void setId(final String id);",
"void setId(int val);",
"public void setId(int id){\r\n this.id = id;\r\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setModelId(long modelId);",
"public void setId(final int id);",
"public void setId(int id){ this.id = id; }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setID(int id);",
"void setId(Integer id);",
"public void setId(final String id);",
"public void setId(final String id);",
"public void setId(long id);",
"public void setId(long id);",
"public void setId(long id);",
"public void setId(long id);",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"void setId(int id) {\n this.id = id;\n }",
"public void setId(String id)\r\n/* 19: */ {\r\n/* 20:17 */ this.id = id;\r\n/* 21: */ }",
"public int getId() {\n return playerId;\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"public void setId(int i) { id = i; }",
"public void setId(int id)\r\n {\r\n this.mId = id;\r\n }",
"@Override\n\tpublic void setId(int id) {\n\n\t}",
"public abstract void setId(int id);",
"public void setId(int value) {\r\n this.id = value;\r\n }",
"public void setId (String id)\n {\n _id = id;\n }",
"public void setId(int id)\n {\n this.id = id;\n }",
"public void setId(int id)\n {\n this.id = id;\n }",
"public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}",
"@Override\r\n\tpublic void setId(String id) {\n\t\t\r\n\t}",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setPlayerId(Integer playerId) {\n this.PlayerId = playerId;\n }",
"public void setId(String s) {\n\t\tid = s;\n\t}",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String i) {\n\t\tid = i;\n\t}",
"java.lang.String getPlayerId();",
"public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = param;\n }",
"public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = param;\n }",
"public void setCurrentPlayerPokemon(int newID)\r\n {\r\n currentPlayerPokemon = newID;\r\n }",
"public void setId(int id)\n {\n\tthis.id = id;\n }",
"Player(int id, String name){\n\t\tthis();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}",
"public void setId(int id) {\n this.id = id;\n\t}",
"public void setId(int id) {\n\tthis.id = id;\n}",
"@Override\r\n\t\tpublic void setId(String id)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setID(final PlayerID ID)\r\n\t{\r\n\t\tthis.ID = ID;\r\n\t}",
"@Override\n\tpublic void setId(String id)\n\t{\n\t\t\n\t}",
"public void setId(ID id)\n {\n this.id = id;\n }",
"public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(String id)\n {\n this.id = id;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"@Override\n public void setId(int id) {\n this.id = id;\n }",
"public void setId(String id) {\r\n this.id = id;\r\n }",
"public void setId (String id) {\n this.id = id;\n }",
"public void setId (String id) {\n this.id = id;\n }",
"public void setId(String id) {\r\n this.id = id;\r\n }",
"public void setId(String id){\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n this.id = id;\n }",
"@Override\r\n\tpublic void setId(final K id) {\n\t\tsuper.setId(id);\r\n\t}"
] | [
"0.7129093",
"0.618539",
"0.6114669",
"0.6114669",
"0.6114669",
"0.6094238",
"0.607753",
"0.6058667",
"0.6056796",
"0.6056796",
"0.6044399",
"0.603847",
"0.603847",
"0.5986423",
"0.5968069",
"0.596702",
"0.5967015",
"0.59414196",
"0.59243464",
"0.5916519",
"0.5914464",
"0.5911422",
"0.5905086",
"0.58970714",
"0.5891307",
"0.58898115",
"0.5884357",
"0.5881337",
"0.5863106",
"0.5863106",
"0.586263",
"0.586263",
"0.586263",
"0.586263",
"0.58609456",
"0.58609456",
"0.5858524",
"0.5850513",
"0.58443",
"0.5829655",
"0.5828371",
"0.581471",
"0.58068484",
"0.57975477",
"0.5779656",
"0.5772835",
"0.5769173",
"0.5769173",
"0.5762758",
"0.57608056",
"0.5754491",
"0.5754491",
"0.5754491",
"0.5754491",
"0.5745336",
"0.57443255",
"0.5738785",
"0.5714881",
"0.57128227",
"0.5712444",
"0.5712444",
"0.5709656",
"0.57077724",
"0.5703121",
"0.5702928",
"0.57007384",
"0.5699951",
"0.56985533",
"0.56985533",
"0.56985533",
"0.5689427",
"0.5689427",
"0.5689427",
"0.5689427",
"0.5689427",
"0.5689427",
"0.5689427",
"0.5689427",
"0.5689427",
"0.56881225",
"0.5686121",
"0.5685541",
"0.5682443",
"0.5682191",
"0.5681231",
"0.5681231",
"0.5681231",
"0.56799835",
"0.5676734",
"0.56652755",
"0.56652755",
"0.56586444",
"0.56575847",
"0.5655609",
"0.5655609",
"0.5655609",
"0.5655609",
"0.5655609",
"0.5655609",
"0.5655386"
] | 0.6397576 | 1 |
Sets the direction of where the player is facing | public void setShootingDirection(short x){
this.shootingDirection = x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void setFacing(Direction dir)\n {\n facing = dir;\n if(!userHoldingLeftXOrRight)\n {\n setStandingAnim();\n }\n }",
"public static void setDirection(float x, float y) {\n PlayerDirectionSystem.directionX = x;\r\n PlayerDirectionSystem.directionY = y;\r\n }",
"public abstract void setDirection(int dir);",
"public void setDirection(float directionDegree);",
"public void setDirection(Vector direction){\n\t\t_direction = direction;\n\t}",
"public void setDirection(Vector3f direction) {\r\n\t\tmDirection.set(direction);\r\n\t}",
"public void setDirection(float direction)\r\n {\r\n this.direction = direction;\r\n }",
"public Player setDirection(String direction) { //<>// //<>//\n switch (direction) {\n case (\"UP\"):\n this.direction = UPKEY;\n break;\n case (\"DOWN\"):\n this.direction = DOWNKEY;\n break;\n case (\"LEFT\"):\n this.direction = LEFTKEY;\n break;\n case (\"RIGHT\"): //<>//\n this.direction = RIGHTKEY; //<>//\n break;\n }\n //<>//\n return this;\n }",
"public void faceDirection(Vector direction) {\n \tVector originalFaceDirection = new Vector(0,0,-1);\n \t\n \tfloat angle;\n \t\n \tif (direction.size() == 0)\n \t\tangle = 0;\n \telse\n \t\tangle = (float)Math.toDegrees( direction.angleBetween(originalFaceDirection) );\n \t\n \tVector orientation = player.getOrientation();\n \tplayer.setOrientation( angle , orientation.y(), orientation.z());\n }",
"public void setDirectionMove(double direction);",
"public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }",
"public void setDirection(int dir)\r\n\t{\r\n\t\tdirection = dir;\r\n\t}",
"@Override\n public void setDirection(Direction direction) {\n\n }",
"public void setDirection(Direction direction) {\n this.direction = direction;\n update();\n }",
"public static void setDirection(String direction) {\n if (direction.equals(\"up\")) {\n pacManDirection = up;\n } else if (direction.equals(\"down\")) {\n pacManDirection = down;\n } else if (direction.equals(\"left\")) {\n pacManDirection = left;\n } else {\n pacManDirection = right;\n }\n }",
"public void setDirection() {\n frontLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n backLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n frontRight.setDirection(DcMotorSimple.Direction.FORWARD);\n backRight.setDirection(DcMotorSimple.Direction.FORWARD);\n }",
"public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }",
"private void setDirection() {\n directionX = corePos.getX() - projectile.getX();\n directionY = corePos.getY() - projectile.getY();\n\n double length = Math.sqrt(directionX*directionX + directionY*directionY);\n\n if (length != 0) {\n directionX = directionX/length;\n directionY = directionY/length;\n }\n }",
"abstract void setDirection(double x, double y, double z);",
"void changeDirection();",
"private void setMovingDir(Direction dir)\n {\n if(moving != dir)\n {\n \txSpeed = 0;\n \t\n \tSystem.out.println(\"xSpeed = 0\");\n \t\n resetAccelX();\n }\n moving = dir;\n setFacing(dir);\n //System.out.println(\"setMovingDir: \" + dir);\n }",
"private void turnToDesiredDirection() {\n\n\t\tdouble dir = sens.getDirection();\n\n\t\tif (dir < desiredDirection) {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsens.setDirection(dir);\n\t\t\n\t}",
"public void setDirection(double direction) {\n\t\tgyroPid.setSetpoint(direction);\n\t}",
"public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }",
"public void setDirection(int dir) {\n if((dir % 10) == 0 && dir <=350 && dir >=0) {\n this.directionDegree = dir; \n } else {\n throw new IllegalArgumentException(\"Direction \" + dir +\" is not valid. Directions must be between 0/350 in multiples of 10\"); \n }\n }",
"public void turn(String d) {\n facing = d;\n }",
"public void setDirection() {\n\t\tdouble randomDirection = randGen.nextDouble();\n\t\tif (randomDirection < .25) {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .5) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .75) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = 1;\n\t\t} else {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = 1;\n\t\t}\n\t}",
"private void setDirection() {\r\n\t\tif (destinationFloor > initialFloor){\r\n\t\t\tdirection = 1;\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t}\r\n\t}",
"default void setDirection(Vector3 v) {\r\n setDirection(v.getX(), v.getY(), v.getZ());\r\n }",
"@Override\n public void onUp() {\n\n if(player.getDirection().y == 1){\n player.setDirection(new Vector2(0, 1.5f));\n }\n else{\n player.setDirection(new Vector2(0, 1));\n\n }\n }",
"public void setDirection(double direction) {\n\t\tif (direction <= MAX_DIRECTION && direction >= MIN_DIRECTION) {\n\t\t\tthis.direction = direction;\n\t\t} else if (direction > MAX_DIRECTION) { \n\t\t\t//this.direction = MIN_DIRECTION + (MAX_DIRECTION - direction);\n\t\t\tthis.direction %= MIN_DIRECTION ;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MIN_DIRECTION;\n\t\t\t}\n\t\t} else if (direction < MIN_DIRECTION) {\n\t\t\t//this.direction = MAX_DIRECTION - (MIN_DIRECTION + direction);\n\t\t\tthis.direction %= MAX_DIRECTION;\n\t\t\tif (Double.isNaN(this.direction)) {\n\t\t\t\tthis.direction = MAX_DIRECTION;\n\t\t\t}\n\t\t} //else if (direction)\n\t\t\n\t}",
"public void setDirection(Directions direction) {\n\t\tlogic.setDirection(direction);\n\t}",
"public void changeDirection() {\n\t\t// Define the direction we want to change from as our current direction.\n\t\tfinal float oldDirection = this.requiredSwipeDirection;\n\t\t// While our swipe direction is the direction we want to change from,\n\t\twhile (this.requiredSwipeDirection == oldDirection)\n\t\t\t// Set our SwipeTile's direction to a random direction.\n\t\t\tsetDirection(SwipeTile.randomDirection());\n\t}",
"protected void changeDirection(Direction newDir)\n {\n // Change direction.\n myDir = newDir;\n }",
"public void setWalkDirection(Vector3f vec) {\n walkDirection.set(vec);\n setWalkDirection(characterId, vec);\n }",
"public void setDirection(int direction) {\r\n\t\tthis.direction = direction;\r\n\t}",
"public void setDirection(Direction direction) {\n this.direction = direction;\n }",
"public void setDirection(Direction direction) {\n this.direction = direction;\n }",
"public void setDirection(Direction direction) {\n this.direction = direction;\n }",
"public void changeDirection (int dir) {\n if ((dir == UPKEY || dir == DOWNKEY || dir == RIGHTKEY || dir == LEFTKEY) && validMove(dir))\n {\n direction = dir;\n }\n }",
"public void setTravelDirection(int travelDirection) {\n\t\t//TODO: Should not be any number except 0 - 5\n\t\t/*\n\n\t\t */\n\t\t\n\t\t/*\n\t\t * The user should not be able to set their direction to 180 degrees opposite\n\t\t * If they try to, ignore it, but add it to the logs\n\t\t * Example; Travel Direction = north, user can not set direction to south\n\t\t * Example; Travel Direction = west, user can not set direction to east\n\t\t */\n\t\tthis.travelDirection = travelDirection;\n\t\tlogger.debug(\"TravelDirection set to \" + travelDirection);\n\t}",
"public void setDir(Vector2 dirVec) {\n this.dirVec = dirVec;\n // Travelling horizontally\n if (dirVec.x == 0) {\n setAngle(Math.PI);\n }\n else {\n setAngle(Math.PI/2);\n }\n }",
"public void setDirection(int value) {\n this.direction = value;\n }",
"void setDirections(Directions dir){\n this.dir = dir;\n }",
"public void setDirection(int direction) {\r\n\t\tsuper.setDirection(direction);\r\n\t\trobotImage.setImage(Constant.ROBOTIMAGEPATHS[direction]);\r\n\t}",
"@Test\r\n\tpublic void testSetDirection()\r\n\t{\r\n\t\tIDirectionController directionController = new RadianDirectionControlAdapter(new RadianDirectionControl());\r\n\t\tdirectionController.setCurrentDirection(90.0);\r\n\t\tassertEquals(90.0, directionController.getCurrentDirection(), 0.0);\r\n\t\tdirectionController.setCurrentDirection(390.0);\r\n\t\tassertEquals(30.0, directionController.getCurrentDirection(), 0.0);\r\n\t\tdirectionController.setCurrentDirection(-90.0);\r\n\t\tassertEquals(270.0, directionController.getCurrentDirection(), 0.0);\r\n\t}",
"public void setCurrentDirection(int currentDirection) {\r\n this.currentDirection = currentDirection;\r\n }",
"public void updateFaceDir() {\n\t\tif (faceDirection != null)\n\t\t\tface(location.transform(faceDirection.getDiffX(),\n\t\t\t\t\tfaceDirection.getDiffY(), 0));\n\t}",
"public static Location setDirection(Location loc, BlockFace facing) {\n loc.setYaw(Direction.valueOf(facing.name()).getYaw());\n return loc;\n }",
"public void setDirection(int value) {\n this.direction = value;\n }",
"public void setDirection(Direction direction) {\n\t\t// Set the arrow textures to the new direction's corresponding arrow textures.\n\t\tthis.arrowGreen = SwipeTile.getArrow(game, direction, true);\n\t\tthis.arrowGray = SwipeTile.getArrow(game, direction, false);\n\t\t// Set the required swipe direction to the new direction.\n\t\tsetSwipeRequirement(SwipeTile.createSwipe(direction, requiredSwipeMagnitude));\n\t\t// Refresh the arrow so it uses the new Textures.\n\t\trefreshArrow();\n\t}",
"private void turnAround() {\r\n this.setCurrentDirection(-getCurrentDirection());\r\n }",
"public void setLocation(Direction direction){\n switch (direction) {\n case NORTH:\n location.y = -offset;\n location.x = Constants.GAMEWIDTH / 2;\n break;\n case SOUTH:\n location.y = Constants.GAMEHEIGHT + offset;\n location.x = Constants.GAMEWIDTH / 2;\n break;\n case EAST:\n location.y = Constants.GAMEHEIGHT / 2;\n location.x = Constants.GAMEWIDTH + offset;\n break;\n case WEST:\n location.y = Constants.GAMEHEIGHT / 2;\n location.x = -offset;\n break;\n default:\n\n break;\n }\n }",
"public static void setDirectionJoystick(float x, float y) {\n setDirection(x, y);\r\n isTouched = x != 0 || y != 0;\r\n }",
"public void setFacing(short f) {\r\n\t\tfacing = f;\r\n\t\tworldObj.markBlockForUpdate(xCoord, yCoord, zCoord);\r\n\t}",
"@Override\n\tpublic void setFacing(int facing) {\n\n\t}",
"public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}",
"public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }",
"public void setDirection(byte value) \n\t{\n\t\tdirection = value;\n\t}",
"private void setMainTankDir() {\n Dir dir = myTank.getDir();\n\n if(!bL&&!bU&&!bR&&!bD){\n myTank.setMoving(false);\n Client.INSTANCE.send(new TankStopMsg(getMyTank()));\n }else {\n if (bL) myTank.setDir(Dir.LEFT);\n if (bU) myTank.setDir(Dir.UP);\n if (bR) myTank.setDir(Dir.RIGHT);\n if (bD) myTank.setDir(Dir.DOWN);\n if (bL && bU) myTank.setDir(Dir.LEFT_UP);\n if (bL && bD) myTank.setDir(Dir.LEFT_DOWN);\n if (bR && bU) myTank.setDir(Dir.RIGHT_UP);\n if (bR && bD) myTank.setDir(Dir.RIGHT_DOWN);\n if(!myTank.isMoving())\n Client.INSTANCE.send(new TankStartMovingMsg(getMyTank()));\n myTank.setMoving(true);\n\n if(dir != myTank.getDir()) {\n Client.INSTANCE.send(new TankDirChangedMsg(myTank));\n }\n }\n }",
"public Builder setDirection(int value) {\n bitField0_ |= 0x00000020;\n direction_ = value;\n onChanged();\n return this;\n }",
"public void updateDirection(float dir)\n {\n firstDraw = false;\n direction = dir;\n invalidate();\n }",
"public void up() {\n\t\tswitch (facing){\n\t\tcase \"RIGHT\" :\n\t\t\tvely = 0;\n\t\t\tvelx = 1.5;\n\t\t\tbreak;\n\t\tcase \"LEFT\" :\n\t\t\tvely = 0;\n\t\t\tvelx = -1.5;\n\t\t\tbreak;\n\t\tcase \"UP\" :\n\t\t\tvely = -1.5;\n\t\t\tvelx = 0;\n\t\t\tbreak;\n\t\tcase \"DOWN\" :\n\t\t\tvely = 1.5;\n\t\t\tvelx = 0;\n\t\t\tbreak;\n\t\t}\n\t}",
"public boolean setDirection(Direction dir)\n {\n this.dir = dir;\n return true;\n }",
"private void turnClockwise(){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t}\n\t}",
"public void setCurrentDirection(ElevatorStatus currentDirection) {\n\t\tthis.currentDirection = currentDirection;\n\t}",
"public void direction(int dirX, int dirY) {\r\n if (dirX == 1 && dirY == 0) {\r\n this.direction = \"HORI\";\r\n }\r\n else if (dirX == 1 && dirY == -1) {\r\n this.direction = \"RISE\";\r\n }\r\n else if (dirX == 0 && dirY == 1) {\r\n this.direction = \"VERTI\";\r\n }\r\n else {\r\n this.direction = \"FALL\";\r\n }\r\n }",
"public void changerDirection(int d)\n {\n directionInput = d;\n }",
"public Direction()\n {\n dirInDegrees = 0; // default to North\n }",
"public void fly() {\n double x = getPosition().getX();\n double y = getPosition().getY();\n\n // for turning around\n if (x >= 19 || x == 1) {\n xDirection = xDirection * (-1);\n }\n\n // switcher\n x = x + xDirection;\n y = y + yDirection;\n\n // change position call\n changePosition(x, y);\n\n // for inversing\n if (yDirection == 1) {\n yDirection = -1;\n } else if (yDirection == -1) {\n yDirection = 1;\n }\n }",
"public void setDirectionTo(Position ep, Position vp) throws InvalidPositionException;",
"public void setDirection(String direction) {\r\n this.direction = direction;\r\n }",
"public void updateDirectionFace();",
"public void move(String direction) {\n \n }",
"@Override // com.master.cameralibrary.CameraViewImpl\n public void setFacing(int i) {\n if (this.mFacing != i) {\n this.mFacing = i;\n if (isCameraOpened()) {\n stop();\n start();\n }\n }\n }",
"@NotNull\n void move(Direction direction) {\n this.position.move(direction);\n lookingDirection = direction;\n }",
"public void chooseDirection(){\n Player player=board.getPlayer();\n if(player==null) return;\n if (getXCentrer()>board.getPlayer().getXCentrer()){\n setDirection(3);\n }\n else{\n setDirection(1);\n }\n }",
"public final void setPosition(Vector3d location, Vector3d dir, Vector3d up)\n {\n myLocation = location;\n myDir = dir.getNormalized();\n myUp = up.square(myDir).getNormalized();\n }",
"public Vector3d getDirection() { return mDirection; }",
"public void changeDirection(Direction direction) {\n\t\tstate.updateDirection(direction);\n\t}",
"public void moveUporDown(int direction)\n\t{\n\t\tif (this.direction == direction || this.direction == -direction)\n\t\t\treturn ;\n\t\tthis.direction = direction;\n\t\tdirx = 0;\n\t\tdiry = 0;\n\t\tif (direction == 1 || direction == -1)\n\t\t\tdirx = direction;\n\t\telse\n\t\t\tdiry = direction / 2;\n\t}",
"public void setDirection(boolean positive) {\n setRange(mRangeStart, mRange, positive);\n }",
"public void setDirection(String direction) {\n this.direction = direction;\n }",
"public void setDirection(char dir) throws IllegalArgumentException {\n\t\tif (dir == 'N' || dir == 'n'){\n\t\t\tthis.direction = 'n';\n\t\t} else if (dir == 'E' || dir == 'e'){\n\t\t\tthis.direction = 'e';\n\t\t} else if (dir == 'S' || dir == 's'){\n\t\t\tthis.direction = 's';\n\t\t} else if (dir == 'W' || dir == 'w'){\n\t\t\tthis.direction = 'w';\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t}",
"public void set(Vector3f v1, Vector3f v2) {\n this.setOrigin(v1);\n this.setDirection(v2.subtract(v1));\n }",
"public void setDirectionFrom(Position ep, Position vp) throws InvalidPositionException;",
"public void setDirection(int dice){\n\t}",
"public float getDirection()\r\n {\r\n return direction;\r\n }",
"public boolean setDirection(Direction dir) {\n //If a new direction was set but the update wasn't made yet,\n // you cannot change the direction.\n if (!moveMade) {\n return false;\n }\n if (!direction.isValid(dir)) {\n return false;\n }\n prevDir = direction;\n direction = dir;\n moveMade = false;\n return true;\n }",
"public void setFlingDirection(int velocityY) {\n if (velocityY > 0) {\n this.mFlingDirection = this.FLING_BACKWARD;\n } else {\n this.mFlingDirection = this.FLING_FOWARD;\n }\n }",
"public void setMoveDown(boolean TorF) {\n moveDown = TorF;\n }",
"public void setFace(int face) {\n\t\tthis.faceDirection = Face.values()[face];\n\t}",
"void turnToDir(float angle) { \n float radian = radians(angle);\n _rotVector.set(cos(radian), sin(radian));\n _rotVector.setMag(1);\n }",
"@Generated\n @Selector(\"setDirection:\")\n public native void setDirection(@ByValue CGVector value);",
"public void setDirection(Direction direction) {\r\n\t\tif (direction == null){\r\n\t\t\tcreateFeatureNotSupportedEventDirectionIsNull();\r\n\t\t\tthis.direction = new PolarDirection();\r\n\t\t}\r\n\t\tthis.direction = direction;\r\n\t}",
"private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}",
"public void getDirection (float xDir, float yDir){\n this.xDir = xDir;\n this.yDir = yDir;\n }",
"public void setHeading() {\n super.setHeading(getPrevious().getHeadingTo(this)); //The absolute angle position that robot needs to face to reach this position\n }",
"public void setMoving(boolean TorF) {\n this.moving = TorF;\n }",
"public void getUserInput(int direction) { this.direction = direction; }",
"public void moveUserPlane(int direction) {\r\n\t\tlevelManager.moveUserPlane(direction);\r\n\t}"
] | [
"0.7393117",
"0.7303915",
"0.7242024",
"0.723651",
"0.7129278",
"0.7126441",
"0.71252173",
"0.71175575",
"0.709564",
"0.70395285",
"0.6935842",
"0.6934721",
"0.68832123",
"0.6843268",
"0.6760004",
"0.6714024",
"0.67050207",
"0.66982067",
"0.66979057",
"0.66969305",
"0.66857135",
"0.6685234",
"0.66841596",
"0.6676443",
"0.66420484",
"0.66253215",
"0.6606429",
"0.6578724",
"0.6547055",
"0.6527761",
"0.64864296",
"0.6482029",
"0.64596146",
"0.64524657",
"0.6442417",
"0.6427815",
"0.6399799",
"0.6399799",
"0.6399799",
"0.63764834",
"0.63741946",
"0.63596565",
"0.6331137",
"0.6303061",
"0.62986284",
"0.62957615",
"0.6288373",
"0.62854135",
"0.62551785",
"0.6246821",
"0.6246508",
"0.6243018",
"0.6237633",
"0.6234696",
"0.6218784",
"0.61583024",
"0.61574274",
"0.6104147",
"0.60784936",
"0.6066827",
"0.6066001",
"0.6053768",
"0.60515976",
"0.6033262",
"0.5988691",
"0.5967968",
"0.59596044",
"0.5958486",
"0.59466827",
"0.593835",
"0.5934001",
"0.5933706",
"0.59126216",
"0.5912436",
"0.59070045",
"0.59003997",
"0.58948135",
"0.58832014",
"0.5866994",
"0.5858228",
"0.58523786",
"0.5850782",
"0.5841544",
"0.58409965",
"0.584067",
"0.5822231",
"0.5821745",
"0.58159935",
"0.57755387",
"0.5769352",
"0.5768308",
"0.5750456",
"0.5741047",
"0.57339853",
"0.5728135",
"0.57239777",
"0.57228017",
"0.57185864",
"0.5710204",
"0.569934",
"0.56948394"
] | 0.0 | -1 |
Returns the direction of where the player is facing | public short getShootingDirection() {
return shootingDirection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getDirection();",
"default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }",
"public double direction(){\n return Math.atan2(this.y, this.x);\n }",
"public final Vector3f getDirection() {\r\n return direction;\r\n }",
"public Vector3f getDirection() {\r\n\t\treturn new Vector3f(mDirection);\r\n\t}",
"public float getDirection()\r\n {\r\n return direction;\r\n }",
"public Vector3d getDirection() { return mDirection; }",
"public Direction facing() {\r\n\t\treturn this.facing;\r\n\t}",
"public Direction direction()\n {\n return myDir;\n }",
"int getDirection();",
"public Direction getDirection()\n {\n return dir;\n }",
"public MoveDirection getDirection() {\n\t\treturn direction;\n\t}",
"public double getDirectionMove();",
"public Vector getDirection(){\n\t\treturn new Vector(_direction);\n\t}",
"public int getDirection();",
"public Direction getDirection() {\n return currentDirection;\n }",
"public int getDirection()\r\n\t{\r\n\t\treturn direction;\r\n\t}",
"float getDir() {\n return degrees(_rotVector.heading());\n }",
"public double getDirectionFace();",
"protected final Direction getDirection() {\n\t\treturn tile.getDirection();\n\t}",
"public Direction getCurrentDirection() {\n synchronized (f_lock) {\n return f_currentDirection;\n }\n }",
"String getDirection();",
"private Vector3f calculateVectorDirectionBetweenEyeAndCenter() {\n\t\tVector3f br = new Vector3f();\n\n\t\tbr.x = player.getPosition().x - camera.getPosition().x;\n\t\tbr.y = player.getPosition().y - camera.getPosition().y;\n\t\tbr.z = player.getPosition().z - camera.getPosition().z;\n\n\t\treturn br;\n\t}",
"public char getDirection(){\n\t\treturn direction;\n\t}",
"public int getCurrentDirection() {\r\n return currentDirection;\r\n }",
"public int getTurnDir() {\r\n\t\tif(this.turnDir == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.turnDir.ordinal();\r\n\t}",
"public int inDegrees()\n {\n return dirInDegrees;\n }",
"public Direction getDirect() {\n \tif(xMoving && yMoving){\n \t\tif(right && down)\n \t\t\tdir = Direction.SOUTHEAST;\n \t\telse if(right && !down)\n \t\t\tdir = Direction.NORTHEAST;\n \t\telse if(!right && down)\n \t\t\tdir = Direction.SOUTHWEST;\n \t\telse\n \t\t\tdir = Direction.NORTHWEST;\n \t}\n \telse if(xMoving){\n \t\tdir = right ? Direction.EAST : Direction.WEST;\n \t}\n \telse if(yMoving){\n \t\tdir = down ? Direction.SOUTH : Direction.NORTH;\n \t}\n \treturn dir;\n }",
"public Direction getDirection()\n\t{\n\t\treturn this.direction;\n\t}",
"public Enums.Direction getDirection() {\n return direction;\n }",
"public Direction getDirection() {\r\n\t\treturn direction;\r\n\t}",
"public Direction getDirection() {\n\t\treturn direction;\n\t}",
"public int getDirection() {\n return direction_;\n }",
"public int getDirection() {\r\n\t\treturn direction;\r\n\t}",
"public int getDirection() {\n return direction;\n }",
"public int getDirection() {\n return direction;\n }",
"public Direction getDirection() {\n return direction;\n }",
"public Direction getDirection() {\n return direction;\n }",
"public Direction getDirection() {\n return direction;\n }",
"public int getDirection() {\n return direction;\n }",
"public ForgeDirection toForgeDirection()\n {\n for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)\n {\n if (this.x == direction.offsetX && this.y == direction.offsetY && this.z == direction.offsetZ)\n {\n return direction;\n }\n }\n\n return ForgeDirection.UNKNOWN;\n }",
"public String getDirection(){\n\t\tif(this.toRight)\n\t\t\treturn \"RIGHT\";\n\t\telse\n\t\t\treturn \"LEFT\";\n\t}",
"public int getDirection() {\n return direction_;\n }",
"public String getDirection() {\n return direction;\n }",
"public String getDirection() {\r\n return direction;\r\n }",
"public ElevatorStatus getCurrentDirection() {\n\t\treturn currentDirection;\n\t}",
"Enumerator getDirection();",
"EChannelDirection direction();",
"public String getDirection() {\n\t\treturn this.direction;\n\t}",
"@Basic\r\n\tpublic Direction getDirection()\r\n\t{\r\n\t\treturn this.direction;\r\n\t}",
"private int getDirection(boolean isFrontCamera) {\n\t\tif (mAccListener != null) {\n\t\t\tint dir = mAccListener.dir;\n\t\t\t// 当且仅当为前置摄像头且画面是上下方向(portrait、portrait-inverse)的颠倒\n\t\t\tif (isFrontCamera && ((dir & 1) == 1)) {\n\t\t\t\tdir = (dir ^ 2);\n\t\t\t}\n\t\t\treturn dir;\n\t\t}\n\t\treturn -1; // default value is -1\n\t}",
"public String getFacing() {\r\n\t\treturn Facing;\r\n\t}",
"public Movement getDir() {\n\t\treturn dir;\n\t}",
"public Direction getCorrectRobotDirection();",
"public String getDirection() {\n return this.direction;\n }",
"@Override\n public Vector getFacingVector() {\n double[] rotation = {Math.cos(this.rot), Math.sin(this.rot)};\n Vector v = new Vector(rotation);\n v = VectorUtil.direction(v);\n Vector w = VectorUtil.direction(this.getR());\n v.plus(w);\n return v;\n }",
"public byte getDirection() {\n\t\treturn direction;\n\t}",
"public DirectionEnum getDirection() {\n return direction;\n }",
"public static int turnDir(double initTrack, double goalTrack) {\n if (Util.clockwise(initTrack,goalTrack)) return 1;\n else return -1;\n }",
"public BlockFace getFacing() {\n/* 1017 */ return CraftBlock.notchToBlockFace(getHandle().getAdjustedDirection());\n/* */ }",
"public abstract int getDirection();",
"public double getDirectionView();",
"public void faceDirection(Vector direction) {\n \tVector originalFaceDirection = new Vector(0,0,-1);\n \t\n \tfloat angle;\n \t\n \tif (direction.size() == 0)\n \t\tangle = 0;\n \telse\n \t\tangle = (float)Math.toDegrees( direction.angleBetween(originalFaceDirection) );\n \t\n \tVector orientation = player.getOrientation();\n \tplayer.setOrientation( angle , orientation.y(), orientation.z());\n }",
"public int getFinalFacing() {\n MoveStep last = getLastStep();\n if (last != null) {\n return last.getFacing();\n }\n return getEntity().getFacing();\n }",
"public static MoveStepType getDirection(final int facing, final int destFacing) {\n final int rotate = (destFacing + (6 - facing)) % 6;\n return rotate >= 3 ? MoveStepType.TURN_LEFT : MoveStepType.TURN_RIGHT;\n }",
"public DIRECTION getDirection(int index) {\n if (gameData.charAt(index) == 'L') {\n return DIRECTION.LEFT;\n } else if (gameData.charAt(index) == 'R') {\n return DIRECTION.RIGHT;\n } else {\n System.out.println(\"GameData.getDirection: ERROR GETTING DIRECTION!!!!\");\n }\n return null;\n }",
"@SlideDirection\n public int getDirection() {\n return mImpl.getDirection().getNumber();\n }",
"@SlideDirection\n public int getDirection() {\n return mImpl.getDirection().getNumber();\n }",
"public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }",
"public byte getDirection() {\n return this.direction;\n }",
"public byte getDirection() {\n return this.direction;\n }",
"@Override\n\tpublic int getFacing() {\n\t\treturn 0;\n\t}",
"public int getDirectionToward(Location anotherLocation)\n\t{\n\t\tdouble\tdeltaX = anotherLocation.getX() - mX;\n\t\tdouble\tdeltaY = anotherLocation.getY() - mY;\n\t\tdouble\tdegrees = (360.0 / (2 * Math.PI)) * Math.atan(deltaY / deltaX);\n\t\t\n\t\tif (Math.abs(degrees) > 67.5) // either north or south\n\t\t{\n\t\t\treturn deltaY > 0 ? SOUTH : NORTH;\n\t\t}\n\t\telse if (Math.abs(degrees) > 22.5) // one of the four diagonals\n\t\t{\n\t\t\tif (deltaY < 0)\n\t\t\t{\n\t\t\t\treturn deltaX > 0 ? NORTHEAST : NORTHWEST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn deltaX > 0 ? SOUTHEAST : SOUTHWEST;\n\t\t\t}\n\t\t}\n\t\telse // either east or west\n\t\t{\n\t\t\treturn deltaX > 0 ? EAST : WEST;\n\t\t}\n\t}",
"private String getUserDirection() {\n System.out.println(\"Which direction do you want to go?\\n>>>\");\n String direction = sc.nextLine().toLowerCase();\n return direction;\n }",
"public double getXDirection() {\r\n return Math.cos(Math.toRadians(angle));\r\n }",
"public int[] getFacingPosition() {\n int[] facingPosition = getPosition();\n if (orientation == Orientation.UP)\n facingPosition[1]--;\n else if (orientation == Orientation.DOWN)\n facingPosition[1]++;\n else if (orientation == Orientation.LEFT)\n facingPosition[0]--;\n else\n facingPosition[0]++;\n return facingPosition;\n }",
"public MediaDirection getDirection()\n {\n return direction;\n }",
"public void getDirection (float xDir, float yDir){\n this.xDir = xDir;\n this.yDir = yDir;\n }",
"public Transaction.DirectionType getDirection() {\n\t\treturn direction;\n\t}",
"public TextDirection getDir() {\n return dir;\n }",
"@Nullable\n private Direction getFrameDirection() {\n //Cache the chunks we are looking up to check the frames of\n // Note: We can use an array based map, because we check suck a small area, that if we do go across chunks\n // we will be in at most two in general due to the size of our teleporter. But given we need to check multiple\n // directions we might end up checking two different cross chunk directions which would end up at three\n Long2ObjectMap<ChunkAccess> chunkMap = new Long2ObjectArrayMap<>(3);\n Object2BooleanMap<BlockPos> cachedIsFrame = new Object2BooleanOpenHashMap<>();\n for (Direction direction : EnumUtils.DIRECTIONS) {\n if (hasFrame(chunkMap, cachedIsFrame, direction, false)) {\n frameRotated = false;\n return direction;\n } else if (hasFrame(chunkMap, cachedIsFrame, direction, true)) {\n frameRotated = true;\n return direction;\n }\n }\n return null;\n }",
"Directions getDirections(){\n return this.dir;\n }",
"public Direction getMove(){\n\t\tif (diam < 3){\n\t\t\tdiam++;\n\t\t\tjustnow = \"east\";\n\t\t\treturn Direction.EAST;\n\t\t}\n\t\telse if (diam < 6){\n\t\t\tdiam++;\n\t\t\tjustnow = \"south\";\n\t\t\treturn Direction.SOUTH;\n\t\t}\n\t\telse if (diam < 9){\n\t\t\tdiam++;\n\t\t\tjustnow = \"west\";\n\t\t\treturn Direction.WEST;\n\t\t}\n\t\telse if (diam < 12){\n\t\t\tdiam++;\n\t\t\tjustnow = \"north\";\n\t\t\treturn Direction.NORTH;\n\t\t}\n\t\telse {\n\t\t\tdiam = 0;\n\t\t\tdiam++;\n\t\t\tjustnow = \"east\";\n\t\t\treturn Direction.EAST;\n\t\t}\t\n\t}",
"public DoorDirection getDoorDirection() {\n\t\treturn this.doorDirection; \n\t}",
"public Direction getCurrentHeading()\r\n\t{\r\n\t\treturn this.currentDirection;\r\n\t\t\r\n\t}",
"private float reverseDirection(float dir) {\n if (dir < Math.PI) return (float) (dir+Math.PI);\n else return (float) (dir-Math.PI);\n }",
"public String getFacing() {\n\n\t\tlocal = new Local(event);\n\n\t\treturn local.getFacing(event.getBlock(), event.getBlock().getType());\n\t}",
"@Nullable\n public Direction frameDirection() {\n if (frameDirection == null) {\n return getFrameDirection();\n }\n return frameDirection;\n }",
"@Override // com.master.cameralibrary.CameraViewImpl\n public int getFacing() {\n return this.mFacing;\n }",
"public abstract Vector3 directionFrom(Point3 point);",
"public Direction getJoinDirection() {\n return (carrier.isInEurope() || plan.cwait == plan.twait) ? null\n : carrier.getGame().getMap().getDirection(plan.twait.getTile(),\n plan.cwait.getTile());\n }",
"private void calculateDirection(){\n\t\tif(waypoints.size() > 0){\n\t\t\tif(getDistanceToWaypoint() <= getSpeed()){\n\t\t\t\tsetPosition(new Vector2(waypoints.remove(0)));\n\t\t\t\tsetCurrentWaypoint(getCurrentWaypoint() + 1);\n\t\t\t}else{\t\t\n\t\t\t\tVector2 target = new Vector2(waypoints.get(0));\n\t\t\t\tVector2 newDirection = new Vector2(target.sub(getPosition())); \n\t\t\t\tsetDirection(newDirection);\n\t\t\t}\n\t\t}else{\n\t\t\tsetDirection(new Vector2(0, 0));\n\t\t}\n\t}",
"Optional<Direction> getDirection();",
"@Override\n\tpublic String getDirection(List<String> path) {\n\n\t\tString nextMove = path.get(path.size() - 1);\n\t\tif (nextMove.equals(\"TOP\")) {\n\t\t\treturn \"DOWN\";\n\t\t} else if (nextMove.equals(\"DOWN\")) {\n\t\t\treturn \"TOP\";\n\t\t} else if (nextMove.equals(\"LEFT\")) {\n\t\t\treturn \"RIGHT\";\n\t\t} else if (nextMove.equals(\"RIGHT\")) {\n\t\t\treturn \"LEFT\";\n\t\t}\n\t\treturn \"\";\n\t}",
"public String getWindDirection() {\n\t\treturn windDirection;\n\t}",
"public String getWindDirection() {\n\t\treturn windDirection;\n\t}",
"public double getYDirection() {\r\n return Math.sin(Math.toRadians(angle));\r\n }",
"private void computeFacing() {\n\t\tfacing = GeometryUtil.getAngle(p1, p2) + 90;\n\t}",
"@Generated\n @Selector(\"direction\")\n @ByValue\n public native CGVector direction();",
"private DominoInKingdom.DirectionKind getDirection(String dir) {\n switch (dir) {\n case \"up\":\n return DominoInKingdom.DirectionKind.Up;\n case \"down\":\n return DominoInKingdom.DirectionKind.Down;\n case \"left\":\n return DominoInKingdom.DirectionKind.Left;\n case \"right\":\n return DominoInKingdom.DirectionKind.Right;\n default:\n throw new java.lang.IllegalArgumentException(\"Invalid direction: \" + dir);\n }\n }",
"public int solutionDirection() {\n if (bcLocation == BCLocation.DOWNSTREAM)\n return -1;\n else\n return 1;\n }"
] | [
"0.7501941",
"0.7375129",
"0.73027635",
"0.7295794",
"0.7233421",
"0.71741503",
"0.71581316",
"0.6975815",
"0.69367826",
"0.6922909",
"0.6850767",
"0.68499106",
"0.68391585",
"0.6803168",
"0.6772096",
"0.6747539",
"0.6706063",
"0.67022395",
"0.6670714",
"0.66635627",
"0.6658549",
"0.6652875",
"0.66299176",
"0.6606162",
"0.6594609",
"0.65824544",
"0.6576612",
"0.65741843",
"0.657096",
"0.6566931",
"0.6564897",
"0.6538016",
"0.6537795",
"0.6527866",
"0.6494824",
"0.6494824",
"0.6474243",
"0.6474243",
"0.6474243",
"0.6472843",
"0.64586496",
"0.6451646",
"0.6443808",
"0.6425556",
"0.6419237",
"0.6375742",
"0.63730335",
"0.6364617",
"0.63533086",
"0.6338751",
"0.63364315",
"0.63220155",
"0.6320016",
"0.63048685",
"0.6300423",
"0.6298571",
"0.6292246",
"0.6256866",
"0.62331337",
"0.62267184",
"0.62068796",
"0.6206822",
"0.61987805",
"0.6193304",
"0.6181567",
"0.61711323",
"0.6161568",
"0.6161568",
"0.6155762",
"0.6155704",
"0.6155704",
"0.6141103",
"0.61080885",
"0.60566896",
"0.6046705",
"0.60301024",
"0.60289776",
"0.6023389",
"0.6009971",
"0.5997823",
"0.59906393",
"0.59721357",
"0.59676385",
"0.59649515",
"0.59569937",
"0.5941528",
"0.59260494",
"0.5925891",
"0.5920408",
"0.59188664",
"0.5894276",
"0.58792156",
"0.5869973",
"0.586113",
"0.58449554",
"0.58449554",
"0.5821859",
"0.5814233",
"0.5813009",
"0.5789922",
"0.57824284"
] | 0.0 | -1 |
Sets the health value of the player | public void setHp(byte hp){
this.hp = hp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setHealth(double h){\n health = h;\n }",
"public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }",
"public void setHealth(double Health){\r\n health = Health;\r\n }",
"public void SetHealth(int h)\n{\n\thealth=h;\n}",
"private void setHealth(Player p, int health)\n {\n int current = p.getHealth();\n \n // If the health is 20, just leave it at that no matter what.\n int regain = health == 20 ? 20 : health - current;\n \n // Set the health, and fire off the event.\n p.setHealth(health);\n EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);\n Bukkit.getPluginManager().callEvent(event);\n }",
"public void setHealth(int health) {\n this.health = health;\n }",
"public void setHealth(double health) {\r\n\t\tthis.health = health;\r\n\t}",
"public void setHealth(float health)\n {\n if ( health > getMaxHealth() )\n {\n this.health = getMaxHealth();\n }\n else if (health < 0)\n {\n this.health = 0.0f;\n }\n else\n {\n this.health = health;\n }\n\n }",
"public void setHealth(float health) {\r\n \t\tthis.health = health;\r\n \t}",
"@Override\n\tpublic void setHealth(double health) {\n\n\t}",
"public void setHealth(int h) {\n setStat(h, health);\n }",
"public void setHealth(int health) {\n\t\tthis.health = health;\n\t\tif (this.health < 0)\n\t\t\tthis.health = 0;\n\t}",
"public abstract void setHealth(int health);",
"private void setHealth() {\n eliteMob.setHealth(maxHealth = (maxHealth > 2000) ? 2000 : maxHealth);\n }",
"public static void setHealth(int healtha)\r\n\t{\r\n\t\thealth = healtha;\r\n\t}",
"private void setHealth(double healthPercentage) {\n eliteMob.setHealth(this.maxHealth * healthPercentage);\n }",
"@Test\n\tpublic void testSetHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(10);\n\t\tassertTrue(npc.getBaseHealth() == 10);\n\t\tnpc.setHealth(35);\n\t\tassertFalse(npc.getBaseHealth() == 10);\n\t\tassertTrue(npc.getBaseHealth() == 35);\n\t}",
"public static void changeHealth(int _value){\n healthLabel -= _value;\n healthHUD.setText(String.format(Locale.getDefault(),\"%03d\", healthLabel));\n }",
"@Override\r\n\tprotected void setHealth( double newHealth ) \r\n\t{\r\n\t\tthis._health = this._health - newHealth;\r\n\t}",
"protected void setHealth(EntityLivingBase target, int health)\n {\n if (Metamorph.proxy.config.disable_health)\n {\n return;\n }\n\n float ratio = target.getHealth() / target.getMaxHealth();\n float proportionalHealth = Math.round(health * ratio);\n\n this.setMaxHealth(target, health);\n target.setHealth(proportionalHealth <= 0 ? 1 : proportionalHealth);\n }",
"public void setHP(int hp) {\r\n\t\tthis.hp += hp;\r\n\t}",
"public void setPlayerMaxHealth(Player player) {\n int health=16+(player.getLevel()/2);\n if(health>40) health=40;\n // player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, player.getLevel(), true));\n player.setMaxHealth(health);\n }",
"public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }",
"public void healPlayer(int hp) {\n if (hero.getHp() < LabyrinthFactory.HP_PLAYER) {\n hero.increaseHP(hp);\n }\n }",
"@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}",
"private void updateHealth() {\n float percentage = (float) game.getPlayerComponent().getHealth() / (float) game.getPlayerComponent().getMaxHealth(); //Possible placed in controller\n healthBar.setWidth(healthBarMaxWidth * percentage);\n }",
"public void setHp(int hp){\r\n this.hp = hp;\r\n }",
"public void damagePlayer(int damage){\n hero.decreaseHp(damage);\n }",
"@Override\r\n\tpublic void setHealth(int strike) {\n\t\t\r\n\t}",
"public void setHP(int newHP) {\n //grabs the hp\n HpComponent health = this.findHpComponent();\n\n health.setHP(newHP); //sets the hp\n }",
"public void setHP(int h)\n\t{\n\t\tiHP = h;\n\t\t\n\t}",
"void setCurrentHP(final int newHP);",
"public void setAddHealth(float addHealth)\n {\n this.addHealth = addHealth;\n setChanged();\n notifyObservers();\n }",
"public Builder setHPValue(int value) {\n bitField0_ |= 0x00000002;\n hPValue_ = value;\n onChanged();\n return this;\n }",
"public Builder setBonusPercentHP(float value) {\n bitField0_ |= 0x00000002;\n bonusPercentHP_ = value;\n onChanged();\n return this;\n }",
"@Override\n public void setHp(int hp){\n this.hp = hp;\n }",
"public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}",
"public void decreaseHealth() {\n setHealth(getHealth()-1);\n }",
"public void punch (int health)\n {\n\thealth -= 8;\n\thealth2 = health;\n }",
"public void reduceHealth(int damage, int player) {\n\t\tif (player == OPPONENT) {\n\t\t\tint currentHealth = Integer.parseInt(opponentHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\topponentHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = opponentHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(0,reduction);\n\t\t} else if (player == LOCAL) {\n\t\t\tint currentHealth = Integer.parseInt(localHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\tlocalHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = localHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(1,reduction);\n\t\t}\n\t}",
"public void attack(Player player) {\n this.damage = 18 - player.getfPoint(); // the higher the Fighter skill,\n // the lower the damage. change the math.\n int newHealth = player.getShip().getHealth() - damage;\n player.getShip().setHealth(newHealth);\n }",
"public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }",
"Player(String name, int health)\r\n {\r\n this.name = name;\r\n this.health = health;\r\n }",
"public void setValue(Player player, T value) {\n\t\tsetValue(player.getUniqueId(), value);\n\t}",
"void gainHealth(int points) {\n this.health += points;\n }",
"public void resetHealth(){\n curHp = healthPoint;\n }",
"@Override\r\n public void handleAttack(Player player) {\r\n player.decreaseHealth(3);\r\n player.setColor(true);\r\n }",
"void decreaseHealth(Float damage);",
"public void setHp(int hp) {\r\n\t\tthis.hp = hp;\r\n\t}",
"public void setHungerDamage(float hunger);",
"public void resetHealth() {\n\t\tthis.health = this.getCombatDefinition().getMaxHealth();\n\t}",
"public void updateHp(double amount);",
"public void setCurHealth(int modifier) {\n\t\tcurHealth = curHealth + modifier;\n\t}",
"private void subtractPlayerHealth(int damage) {\n this.playerShipHealth -= damage;\n }",
"public void setMaxHealth() {\n\t\tthis.maxHealth *= level / 10;\n\t}",
"public void updateHealth(String target, Integer amount, boolean isAttack){\n\n if(target == \"player\"){\n if(isAttack){\n //To make defence/armour a bit weaker, round up on the damage.\n playerShipHealth+= (int) (amount - Math.ceil(amount*playerShipDefence));\n } else{\n playerShipHealth+=amount;\n\n }\n if (playerShipHealth > playerShipHealthMax){\n playerShipHealth = playerShipHealthMax;}\n else if (playerShipHealth <= 0){\n //PlayerDied\n\n playerShipDead = true;\n playerShip.setIsDead();\n }\n\n } else if (target == \"enemy\"){\n if(isAttack){\n enemyShipHealth+= (int) (amount - Math.ceil(amount*enemyShipDefence));\n } else{\n enemyShipHealth+=amount;\n }\n if (enemyShipHealth > enemyShipHealthMax){\n enemyShipHealth = enemyShipHealthMax;}\n else if (enemyShipHealth <= 0){\n //Enemy Died\n enemyShipDead = true;\n enemyShip.setIsDead();\n }\n }\n }",
"public void changeHealth(int i) {\n \t\tif (health + i < getMaxHealth()) {\n \t\t\thealth += i;\n \t\t} else if (health + i > getMaxHealth()) {\n \t\t\thealth = getMaxHealth();\n \t\t} else if (health + i < 1) {\n \t\t\thealth = 0;\n \t\t\talive = false;\n \t\t}\n \t}",
"public void setHp(int hp) {\n\t\tthis.hp = hp;\n\t}",
"public void setBaseHealth(int baseHealth)\r\n {\r\n this.mBaseHealth = baseHealth;\r\n }",
"public static void heal(LivingEntity ent) {\n\t\tAttributeInstance maxHealth = ent.getAttribute(Attribute.GENERIC_MAX_HEALTH);\n\t\tif(maxHealth != null) {\n\t\t\tent.setHealth(maxHealth.getValue());\n\t\t}\n\t\tif(ent instanceof Player) {\n\t\t\tPlayer p = (Player) ent;\n\t\t\tp.setFoodLevel(20);\n\t\t\tp.setSaturation(20);\n\t\t}\n\t}",
"@Test\n public void testSetHealthPoint() throws Exception {\n n1=10;\n n2=20;\n playerHuman.setHealthPoint(n1);\n playerIA.setHealthPoint(n2);\n org.junit.Assert.assertEquals(n1, playerHuman.getHealthPoint());\n org.junit.Assert.assertEquals(n2, playerIA.getHealthPoint());\n }",
"public void heal(int healAmount){\r\n health+= healAmount;\r\n }",
"public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }",
"public void setActualHP(int hp) { this.actualHP = Math.max(0, hp); }",
"public static void setNewHP(int newHP){\r\n\t\thp -= newHP;\r\n\t}",
"public void decreaseHealth(int hp) {\n this.decreaseLife();\n }",
"public void lowerHealth() {\n Greenfoot.playSound(\"hit.wav\");\n lives--;\n move(-100);\n if (lives == 0) {\n die();\n }\n }",
"public abstract void incrementHealth(int hp);",
"public abstract void setPercentDead(double percent);",
"public void restoreHealth()\r\n {\r\n health = maxHealth;\r\n \r\n say(\"Yay my health is now \" + maxHealth + \"!\");\r\n }",
"protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }",
"public void setCurHealth(final int curHealth) {\n this.curHealth = curHealth;\n }",
"public Builder setBonusHP(int value) {\n bitField0_ |= 0x00000001;\n bonusHP_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic void act(float delta) {\r\n\r\n\t\t// position\r\n\t\tsetSpritesPosition();\r\n\t\tif(previousHealth != g.i().playerHealth)\r\n\t\t\tcover.setScale((100f -g.i().playerHealth)/100f, 1f);\r\n\t\tstateTime += Gdx.graphics.getDeltaTime();\r\n\t\tcurrentFrame = healthBarAnimation.getKeyFrame(stateTime, true);\r\n\t\theroHealth.setRegion(currentFrame);\r\n\t\t\r\n\t\tpreviousHealth = g.i().playerHealth;\r\n\r\n\t}",
"public void reduceHealth(int damage){\n health -= damage;\n }",
"public void updateHealth(int healthLost){\n\t\thealth -= healthLost;\n\t\thealthLeftLabel.setText(\"\" + health);\n\t}",
"public void healthDelta(int health_delta)\n {\n this.health += health_delta;\n this.health = Math.min(this.health, DataBase.getSettings().tanksHealth);\n }",
"public void checkHealth()\n {\n if(player.getHealth() <= 0)\n {\n System.out.println(\"\\n\" + \"You are dead :(\" + \"\\n\");\n alive = false;\n }\n }",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"public void setStats(int health, int attack, int defense) {\n\t\tmaxHealth = health;\n\t maxAttack = attack;\n\t maxDefense = defense;\n\t curHealth = maxHealth;\n\t curAttack = maxAttack;\n\t curDefense = maxDefense;\n\t}",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setObjectiveScore(String name, Player player, int value) {\n scoreboard.getObjective(name).getScore(player.getName()).setScore(value);\n }",
"public Builder setHPPerSecond(int value) {\n bitField0_ |= 0x00000010;\n hPPerSecond_ = value;\n onChanged();\n return this;\n }",
"public void incrementCurrentHealth(int healingValue) {\n\t\tcurrentHealth = Math.min(currentHealth + Preconditions.checkGreaterThanZero(healingValue), maxHealth);\n\t}",
"public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }",
"public void updateCreatureHealth(Entity entity) {\n HealthAspect aspect = entity.getAspect(HealthAspect.class);\n if (aspect == null) {\n Logger.UNITS.logError(\"Trying to update health of creature \" + entity + \" with no HealthAspect\");\n return;\n }\n changeParameter((Unit) entity, HealthParameterEnum.FATIGUE, 0.01f);\n changeParameter((Unit) entity, HealthParameterEnum.HUNGER, 0.01f);\n }",
"public void updatePlayerHealthUI() {\n CharSequence text = String.format(\"Score: %d\", getscore());\n scoreLabel.setText(text);\n }",
"Float getHealth();",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00000080;\n curHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00000080;\n curHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00000080;\n curHP_ = value;\n onChanged();\n return this;\n }",
"public void onUpdate()\n {\n super.onUpdate();\n\n if (!this.worldObj.isRemote && this.getBossHP() != this.health)\n {\n this.setBossHP();\n }\n }",
"public void setPlayer(Player player) {\n if(humanPlayer != null) {\n throw new IllegalArgumentException(\"The player has already been set to \"\n + humanPlayer.getName() + \" with the game piece \" + humanPlayer.getPiece());\n }\n if(player == null) {\n throw new IllegalArgumentException(\"Player cannot be null.\");\n }\n humanPlayer = player;\n }",
"public void setCurHealth(final int curHealth)\n\t{\n\t\tthis.curHealth = curHealth;\n\t}",
"private void takeDamage(int damage){ health -= damage;}",
"@Override\n protected void applyEntityAttributes() {\n super.applyEntityAttributes();\n this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(100.0);\n }",
"public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00004000;\n curHP_ = value;\n onChanged();\n return this;\n }",
"public int getHealth() { return this.health; }"
] | [
"0.77879965",
"0.76852864",
"0.7672885",
"0.7631767",
"0.7588944",
"0.75707036",
"0.7552027",
"0.7538839",
"0.7491915",
"0.74061394",
"0.73894876",
"0.7287584",
"0.7283912",
"0.704905",
"0.70440584",
"0.7017057",
"0.6851332",
"0.68341714",
"0.6771623",
"0.6708324",
"0.6650379",
"0.66075146",
"0.65558034",
"0.6538854",
"0.6507863",
"0.6497784",
"0.6452518",
"0.6374719",
"0.63583803",
"0.6350452",
"0.6336271",
"0.6323564",
"0.6311364",
"0.62986207",
"0.62862396",
"0.62814313",
"0.62713337",
"0.6267547",
"0.6208128",
"0.6202937",
"0.61638457",
"0.6163714",
"0.61619365",
"0.6161697",
"0.61593467",
"0.61444026",
"0.6141974",
"0.6132485",
"0.6126688",
"0.61261874",
"0.6111995",
"0.610681",
"0.6076643",
"0.60464823",
"0.60394454",
"0.6036683",
"0.60178554",
"0.600566",
"0.6001618",
"0.59877336",
"0.5981789",
"0.597887",
"0.5962759",
"0.59182787",
"0.59181726",
"0.5905367",
"0.589859",
"0.589321",
"0.58895797",
"0.58534074",
"0.5849094",
"0.58384",
"0.5832435",
"0.58315146",
"0.58118904",
"0.5809048",
"0.58073026",
"0.580653",
"0.5802256",
"0.5797904",
"0.57759184",
"0.57751685",
"0.5770328",
"0.5769049",
"0.5766407",
"0.57522744",
"0.5751271",
"0.5747517",
"0.5743294",
"0.5733068",
"0.5731722",
"0.5731722",
"0.5728245",
"0.57255334",
"0.5721381",
"0.57212317",
"0.5717413",
"0.57167333",
"0.5701479",
"0.56850535"
] | 0.6096549 | 52 |
Sets the coordinates of the player | public void setCoord(short xPos , short yPos ){
this.xPos = xPos;
this.yPos = yPos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPosition(double xPos, double yPos);",
"public void setPosition(float x, float y);",
"void setPos(float x, float y);",
"public void setPosition(int x, int y) {\n this.coordX = x;\n this.coordY = y;\n }",
"public void setLocation(float x, float y);",
"private void setupPlayerPosition() {\n\t\tHashMap<Suspect, Coordinates> startPositions = new HashMap<Suspect, Coordinates>();\r\n\t\tstartPositions.put(Suspect.KasandraScarlet, new Coordinates(18, 28));\r\n\t\tstartPositions.put(Suspect.JackMustard, new Coordinates(7, 28));\r\n\t\tstartPositions.put(Suspect.DianeWhite, new Coordinates(0, 19));\r\n\t\tstartPositions.put(Suspect.JacobGreen, new Coordinates(0, 9));\r\n\t\tstartPositions.put(Suspect.EleanorPeacock, new Coordinates(6, 0));\r\n\t\tstartPositions.put(Suspect.VictorPlum, new Coordinates(20, 0));\r\n\r\n\t\tfor (int i = 0; i < this.listOfPlayer.size(); i++) {\r\n\t\t\tPlayer p = this.listOfPlayer.get(i);\r\n\t\t\tSuspect sus = p.getSuspect().getData();\r\n\t\t\tboolean b = p.setCoord(startPositions.get(sus), this.grid);\r\n\t\t\t// should always be able to put character on starting position\r\n\t\t}\r\n\t\tSystem.out.println(\"Initial player starting positions set\");\r\n\t}",
"public void setPosition(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }",
"public void setPosition(Point position);",
"public void setPosition(double x, double y){\r\n this.x = (float)x;\r\n this.y = (float)y;\r\n changed();\r\n }",
"@Override\n\tpublic void setPos(int x, int y) {\n\t\txPos = x;\n\t\tyPos = y;\n\t}",
"private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}",
"public void setPosition(int x, int y) {\r\n\t\tmyX = x;\r\n\t\tmyY = y;\r\n\t}",
"void setPosition(Point point);",
"@Override\n public void setPosition(float x, float y) {\n }",
"public void setLocation(int x, int y){\n if(x < 0 || x > 19 || y < 0 || y > 19){\n // The user has tried to move outside the bounds of the world, so\n // we call the die() method which causes the Player to die.\n die();\n } else {\n // The user is trying to move within the bounds of the world. Run\n // the Actor class' own setLocation() method to move the Player.\n super.setLocation(x, y);\n }\n }",
"public void setPlayerPosition() throws IOException\r\n\t{\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tint X = 0;\r\n\t\tint Y = 0;\r\n\t\t\r\n\t\twhile(flag == false)\r\n\t\t{\r\n\t\t\toStream.writeInt(X);\r\n\t\t\toStream.writeInt(Y);\r\n\t\t\tflag = iStream.readBoolean();\r\n\t\t\tX++;\r\n\t\t\tY++;\r\n\t\t}\r\n\t\tboard.makePlayer(X-1, Y-1);\r\n\t}",
"public void setPosition(float x, float y) {\n this.x = x;\n this.y = y;\n }",
"public void setPosition(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"void setLocation(int x, int y);",
"public void setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public void teleportPlayer(int x, int y){\n hero.setX(x);\n hero.setY(y);\n }",
"public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }",
"private void setMapPos()\r\n {\r\n try\r\n {\r\n Thread.sleep(1000);//so that you can see players move\r\n }\r\n catch(Exception e){}\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int unitPos = 0;\r\n int firstX = 0;\r\n int firstY = 0;\r\n if (currentPlayer == 1)\r\n {\r\n unitPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n }\r\n if (currentPlayer == 2)\r\n {\r\n unitPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n }\r\n int tempX = unitPos % mapWidth;\r\n int tempY = unitPos - tempX;\r\n if (tempY == 0) {}\r\n else\r\n tempY = tempY / mapHeight;\r\n tempX = tempX - 11;\r\n tempY = tempY - 7;\r\n if (tempX >= 0)\r\n firstX = tempX;\r\n else\r\n firstX = tempX + mapWidth;\r\n if (tempY >= 0)\r\n firstY = tempY;\r\n else\r\n firstY = tempY + mapWidth;\r\n\r\n int drawWidth = worldPanel.getDrawWidth();\r\n int drawHeight = worldPanel.getDrawHeight();\r\n worldPanel.setNewXYPos(firstX, firstY);\r\n miniMap.setNewXY(firstX, firstY, drawWidth, drawHeight);\r\n }",
"public void setPlayerPosition(CellView playerPosition) {\n this.playerPosition = playerPosition;\n }",
"public void setPosition(double x, double y) {\n // set the location\n setLocation((int)Math.round(x), (int)Math.round(y));\n \n // set the position variables\n position.x = x;\n position.y = y;\n }",
"public static void setCoords(int coords)\n\t{\n\t\tmoveCoords = coords;\n\t}",
"public void setPosition(int x, int y) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}",
"public void setLoc(int x, int y) {\n locX = x;\n locY = y;\n }",
"public void setStartCoords(float x, float y) {\n\t\tplay.setX(x);\n\t\tplay.setY(y);\n\t}",
"public void setPosition(ScreenPoint p) {\n setX(p.x);\n setY(p.y);\n }",
"public void setCoordinates(int x, int y) {\n\t\t\n\t\txPosition = x;\t\t\t// Assigns the x integer\n\t\tyPosition = y;\t\t\t// Assigns the y integer\n\t}",
"public void setPosition(float x, float y){\n\t\t\n\t\tsprite.setPosition(x, y);\n\t}",
"public void setPosition(Point newPosition);",
"public void setPosition(int x, int y) {\n this.mXPosition = x;\n this.mYPosition = y;\n }",
"public void setPosition(double x, double y) {\n\t\tsetX(x);\n\t\tsetY(y);\n\t}",
"public void setPosition(int x, int y)\n\t{\n\t\tint w = getSize().width;\n\t\tint h = getSize().height;\n\n\t\tpos.x = x;\n\n\t\tpos.y = y;\n\n\t\trect.setLocation(x - w / 2, y - h / 2);\n\t}",
"public void setFromCoordinates(int fromX, int fromY);",
"public void setPosition(float x, float y)\n {\n if (getMazeSprite() != null)\n {\n this.getMazeSprite().setPosition(x, y);\n }\n }",
"public void setPosition(double x, double y)\n {\n mPosition = new Point2D.Double(x, y);\n }",
"public void setCardPos(double x, double y ){\r\n setX(x);\r\n setY(y);\r\n }",
"void setPos(Vec3 pos);",
"public void setLocXY(int x, int y) {\n locX = x;\n locY = y;\n }",
"protected void setRobotCoordinates(int x, int y, float a) {\r\n currentPos.setCoordinates(x, y, a, (float)x, (float)y);\r\n }",
"@Override public void setPosition(double nx, double ny) {\n super.setPosition(nx, ny);\n ppx = px = nx;\n ppy = py = ny;\n }",
"private void setSpritesPosition()\r\n\t{\r\n\t\tfloat w = Gdx.graphics.getWidth();\r\n\t\tfloat h = Gdx.graphics.getHeight();\r\n\t\t\r\n\t\tsetX(camera.position.x-camera.viewportWidth/2 + 0.1f * camera.viewportWidth/2);\r\n\t\tsetY(camera.position.y + camera.viewportHeight/2 - 0.15f*w/h* camera.viewportHeight/2);\r\n\t\theroHealth.setX(getX());\r\n\t\theroHealth.setY(getY());\r\n\t\t\r\n\t\tcover.setX(getX() + 10f/270f * heroHealth.getWidth());\r\n\t\tcover.setY(getY());\r\n\t\t\r\n\t}",
"public void setPosition(Vector2 position);",
"public void setMousePosition( final float x, final float y ) throws RemoteException {\r\n playerState.mousePosition.x = x;\r\n playerState.mousePosition.y = y;\r\n }",
"public void setSpawn (int x, int y) {\n xCord = x;\n yCord = y;\n }",
"PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }",
"public void setPosition(int posX, int posY) {\n\t}",
"public void setPosition(double x, double y) {\n getMotion().setPosition(x, y);\n }",
"void setPosition(int posX, int posY, int width, int height) {\n this.posX = posX;\n this.posY = posY;\n this.width = width;\n this.height = height;\n }",
"public void SetPosition(float x, float y) {\n mX = x;\n mY = y;\n for (int i = 0; i < mCardCount; i++) {\n SetCardPosition(i);\n }\n }",
"void setPlayerLocation(@Nonnull Location location);",
"public void setStartingPosition(GameTile [][] visibleMap) {\r\n\t\t//method to set the starting position of our player.\r\n\t\tfor(int i=0; i<visibleMap.length; i++) {\r\n\t\t\tfor(int j=0; j<visibleMap[i].length; j++) {\r\n\t\t\t\tif(visibleMap[i][j] != null && visibleMap[i][j].hasPlayer()) {\r\n\t\t\t\t\tplayerX = i;\r\n\t\t\t\t\tplayerY = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void setPosition(Vector3f position);",
"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 }",
"public void setPosition(Point position){\r\n this.position.set(position.x, position.y);\r\n\r\n this.shadow.setPosition(position);\r\n this.surface.setPosition(position);\r\n this.shading.setPosition(position);\r\n\r\n\r\n this.setBounds(new Rect(\r\n this.position.x - this.radius,\r\n this.position.y - this.radius,\r\n this.position.x + this.radius,\r\n this.position.y + this.radius\r\n ));\r\n \r\n }",
"public void setPos(float x, float y, float z)\n {\n worldMatrix.setPos(x, y, z);\n mPosition = worldMatrix.getPos();\n }",
"void setPosition (double x, double y, double z);",
"public final void setPosition(float x, float y) {\n\t\ttranslate(x - this.x(), y - this.y());\n\t}",
"public Player() {\n\t\tsetDimensions(16, 16);\n\t\tsetLocation(512 + 16, 512 + 16);\n\t\tsetKeyBindings();\n\t}",
"private void setPosition(float x, float y) {\n this.x = x;\r\n this.y = y;\r\n group();\r\n }",
"public void setPoint(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }",
"public void setLocation(int x, int y) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}",
"public void setPlayerPosition(Player player) {\n\n if (player.getPosition().equals(\"Left Wing\")) {\n\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][0] == null) {\n forwardLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Center\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][1] == null) {\n forwardLines[i][1] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Wing\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][2] == null) {\n forwardLines[i][2] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Left Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][0] == null) {\n defenceLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][1] == null) {\n defenceLines[i][1] = player;\n break;\n }\n }\n }\n }",
"public void setLocation(int x,int y)\n\t{\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t}",
"public void setPosition(float x, float y) {\n\t\tthis.position.set(x, y, 0);\n\t}",
"public void setLocation(double x, double y) {\n currentLocation.x = (int) x;\n currentLocation.y = (int) y;\n refreshLocation();\n }",
"public void setPosicion(double x, double y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public void setLocation(int X, int Y){\n \tlocation = new Point(X,Y);\n }",
"public void setXY(int x, int y)\n\t{\n\t\tthis.x = x;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's x-coordinate \n\t\tthis.y = y;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's y-coordinate \n\t}",
"public void setCoordinates(double[] pos) {\n \tthis.currentX = pos[0];\n \tthis.currentY = pos[1];\n }",
"public void setPosition(Point2D position)\n {\n mPosition = position;\n }",
"public void setCoords(int x, int y) {\n\t\t setLayoutX(x);\n\t setLayoutY(y);\n\t}",
"public void setPosition(Vector2 pos) {\n\t\tsetX(pos.x);\n\t\tsetY(pos.y);\n\t}",
"void setPosition(Unit unit, MapLocation position);",
"public void setLoc(int lx, int ly){\r\n \tbox.setLocation(lx,ly);\r\n }",
"void setEnemyPos(Point2D pos);",
"public void setPosition(float pX, float pY, GameObjectListener listener) {\n setPosition(pX, pY);\n listener.onUpdatedAutoCursor(pX, pY);\n }",
"@Override\n public Position setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n\n return new Position(x, y);\n }",
"void setPlayerXRelative(int x) {\n }",
"public void setCoordinates(final int x, final int y) {\n this.x = x;\n this.y = y;\n }",
"void setPosition(Position p);",
"public void setPosition(float x, float y) {\n internalGroup.setPosition(x, y);\n dataTrait.x = x;\n dataTrait.y = y;\n resetSprite();\n }",
"void setPosition(Position position);",
"void setPosition(Position position);",
"public void setXY(int posX, int posY)\r\n\t{\r\n\t\tthis.X = posX;\r\n\t\tthis.Y = posY;\r\n\t}",
"protected void setPosition(float x, float y) {\n\t\tif (Double.isNaN(x) || Double.isNaN(y)) {\n\t\t\tSystem.err.println(LocalizedString.getString(getClass(), \"INVALID_POSITION\", getName()));\n\t\t} else {\n\t\t\tthis.position.set(x, y);\n\t\t}\n\t}",
"public void setLocation(int x, int y) {\r\n manager.setLocation(this, x, y);\r\n }",
"private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public void setPosition(Point p) {\r\n\t\tthis.position = p;\r\n\t\tc.setPosition(p);\r\n\t}",
"private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }",
"void setPlayerLocation(Player p, int bp) {\n\t\t\tplayerLocationRepo.put(p, bp);\n\t\t}",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"public abstract void setPosition(Point2D position);",
"@Override\n\tpublic void setLocation(double x, double y) {\n\t\tdouble oldX = getX();\n\t\tdouble oldY = getY();\n\t\tdouble dx = x - oldX;\n\t\tdouble dy = y - oldY;\n\t\tfor (GPoint point : this) {\n\t\t\tpoint.translate(dx, dy);\n\t\t}\n\t\trepaint();\n\t}",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setLocation( Point p ) {\r\n this.x = p.x;\r\n this.y = p.y;\r\n }"
] | [
"0.7309773",
"0.72914237",
"0.7239412",
"0.7037831",
"0.70024896",
"0.6890936",
"0.68672085",
"0.6863433",
"0.6863396",
"0.6857855",
"0.6841608",
"0.683448",
"0.6833041",
"0.6817613",
"0.68125576",
"0.680582",
"0.68042237",
"0.67955166",
"0.67900944",
"0.67800367",
"0.6753029",
"0.6736457",
"0.67271143",
"0.67265815",
"0.67194307",
"0.67187524",
"0.6683231",
"0.6656993",
"0.66541946",
"0.6650986",
"0.66427004",
"0.6639598",
"0.66375935",
"0.6613436",
"0.6602762",
"0.6587442",
"0.65670174",
"0.6566839",
"0.6560026",
"0.651799",
"0.6512443",
"0.65077055",
"0.6506186",
"0.65024316",
"0.64990085",
"0.64943326",
"0.64899915",
"0.6489556",
"0.6487768",
"0.64771813",
"0.6470647",
"0.6469241",
"0.6451405",
"0.64391357",
"0.64322776",
"0.64153016",
"0.63995194",
"0.6397581",
"0.63906085",
"0.6383536",
"0.6380941",
"0.63689107",
"0.63672656",
"0.63581985",
"0.63549703",
"0.635494",
"0.63506705",
"0.6345612",
"0.6331369",
"0.6328528",
"0.6327183",
"0.6325465",
"0.63205355",
"0.6319655",
"0.62950236",
"0.62749076",
"0.62643737",
"0.62613696",
"0.6258369",
"0.6250954",
"0.6246416",
"0.6244675",
"0.6240863",
"0.6239343",
"0.62362",
"0.62280226",
"0.62280226",
"0.6227065",
"0.6226658",
"0.62259364",
"0.6219554",
"0.6219163",
"0.6219091",
"0.62148327",
"0.6214606",
"0.6210774",
"0.6204438",
"0.6202448",
"0.6199626",
"0.6199297"
] | 0.66740817 | 27 |
Sets the sprint state of the player | public void setSprint(boolean s){
this.sprint = s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setState(PlayerState state) {\n this.state = state;\n }",
"public void setPlayerState(boolean state)\n\t{\n\t\tthis.blnPlayerState = state;\n\t\t\n\t}",
"public void setState(Player player) {\n\t\tstate = player;\n\t\tstateChanged();\n\t}",
"public void setPlayerState(PlayerState playerState) {\n this.playerState = playerState;\n }",
"public void setPlayState(PlayerState state) { isPaused = !state.playing; }",
"public void setState(GameState s) {\n this.state = s;\n }",
"public void SetState(int s) {\n this.state=LS[s];\n }",
"public void setSprinting ( boolean sprinting ) {\n\t\texecute ( handle -> handle.setSprinting ( sprinting ) );\n\t}",
"public void setPlaying() {\n\t\tstate = State.INGAME;\n\t}",
"public void setCurrentStage(int s) {\n if (s < getMaxNumOfStages()) {\n currentStage = s;\n } else {\n currentStage = getMaxNumOfStages();\n }\n }",
"private void setPlayer(BoardSquaresState player){\n\t\tif(player == BoardSquaresState.CROSS){\n\t\t\tselectedPlayer = BoardSquaresState.CROSS;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Cross\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"You go first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.cross_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\t\telse{\n\t\t\tselectedPlayer = BoardSquaresState.NOUGHT;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Nought\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"Computer goes first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.nought_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\n\t}",
"public GameMode(int s)\n {\n bird3.y+=15;\n bird3.goUp = true;\n \n state = s;\n sprite = 0; \n }",
"public void setGameState(GameState gs){\n this.gameState = gs;\n }",
"public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }",
"private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}",
"private void setState(WFDState s) {\n Log.d(TAG, \"Moving from \" + sState + \" --> \" + s);\n sState = s;\n }",
"public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }",
"public void setState(String s) {\r\n\t\tstate = s;\t\t\r\n\t}",
"public void setState(GameState aState){\n\t\tpoints=aState.getScore();\n\t\tcurrentBoard.setState(aState.getBoardState());\n\t}",
"public void setIsTurn()\n\t{\n\t\tthis.isTurn = true;\n\t}",
"public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}",
"public void changeTurnOfPlayer(PlayerState player)\n {\n if(player.getColorOfPlayer() == Color.BLACK)\n {\n this.turnOfPlayer = playerWhite;\n }\n else\n {\n this.turnOfPlayer = playerBlack;\n }\n }",
"@Override protected void setState(State s) {\n session.setState(s);\n super.setState(s);\n }",
"protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}",
"private void setGameStatus() {\n this.gameStatus = false;\n }",
"public void setGearState(boolean state) {\n shifter.set(state);\n }",
"public void setS ( boolean s ) {\n\n\tthis.s = s;\n }",
"public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }",
"@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}",
"public static void setState(GameState state) {\r\n\t\tgameState = state;\r\n\t}",
"public void setCurrentTurn(Player player) {\r\n\t\tthis.currentTurn = player;\r\n\t}",
"public void setPlayer(boolean isWhiteTurn) {\n\t\tif (isWhiteTurn == true) setGraphic(new ImageView(whitePiece));\n\t\tif (isWhiteTurn == false) setGraphic(new ImageView(blackPiece));\n\t\tisActiveImageOn = false;\n\t}",
"public void setStable() {\n this.unstable = false;\n this.unstableTimeline.stop();\n this.statusLed.setFastBlink(false);\n if (this.shutdownButton.isSelected() == true) {\n this.statusLed.setStatus(\"off\");\n } else if (this.offlineButton.isSelected() == true) {\n this.statusLed.setStatus(\"warning\");\n } else {\n this.statusLed.setStatus(\"ok\");\n } \n }",
"public void pauseGame(boolean state) {\r\n paused = state;\r\n }",
"boolean setPlayer(String player);",
"@Override\n public void setGameState(GameState gameState) {\n this.gameState = gameState;\n }",
"@Override\r\n\tpublic void updateSprintStatus(String card_id, String box_id, String user) {\n\t\t\r\n\t}",
"public void setState(States s) {\n\t\tthis.state = s;\n\t}",
"public void setSinglePlayer(){\n isSinglePlayer = true;\n }",
"public void setCurrent(ServerPlayer p) {\n\t\tthis.current = p;\n\t}",
"public void setPlayboard(Playboard playboard);",
"public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }",
"private void setWhitePlayer(Player player) {\r\n\t\tthis.whitePlayer = player;\r\n\t}",
"public void setName( final String name ) throws RemoteException {\r\n playerState.name = name;\r\n }",
"public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }",
"public void setStrat(boolean player, int strat){\n\tif (player){\n\t p1.loadStrat(strat);\n\t}\n\tp2.loadStrat(strat);\n }",
"public void setPlayer(int play)\n {\n this.player=play;\n }",
"private void setGameState(GAMESTATE gameState) {\r\n\t\tlog.info(\"GID \" + this.GID + \" GAME STATE has changed to \" + gameState );\r\n\t\tthis.gameState = gameState;\r\n\t\t\r\n\t}",
"public void set(GameState state){\n states.pop();\n states.push(state);\n }",
"public void setState(String state) {\n // checkValidState(state);\n if ((!States.special.contains(this.state)\n || !this.inSpecialState)\n && this.state != state) {\n this.spriteNum = 0;\n this.curSpriteFrame = 0;\n this.state = state;\n }\n \n }",
"void setState(SimulationState state) {\n\t\tthis.state = state;\n\t}",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public void setSiretState(String siretState) {\r\n\t\tthis.siretState = siretState;\r\n\t}",
"public void setState(States state) {\n switch (state) {\n case MENU:\n //TODO: Create Menu state screen\n break;\n case PLAY:\n UpdateState(new PlayState(this, artemisWorld, box2DWorld, orthographicCamera, assetManager));\n break;\n case LOSE:\n //TODO: Create Lose state screen\n break;\n case WIN:\n //TODO: Create Win state screen\n break;\n default:\n Gdx.app.error(\"ERROR\",\"Screen does not exist, state: \" + state, new RuntimeException());\n break;\n }\n }",
"public void setGameStarted(boolean gameStarted) {\n this.gameStarted = gameStarted; \n }",
"private void setTurn() {\n if (turn == black) {\n turn = white;\n } else {\n turn = black;\n }\n }",
"public void setGameDraw() {\n this.gameStarted = false; \n this.winner = 0; \n this.isDraw = true; \n }",
"private void setUIStatePaused(){\n countdownLabel.setText(\"Paused\");\n play.setEnabled(true);\n pause.setEnabled(false);\n stop.setEnabled(true);\n }",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"private void setUIStatePlaying(){\n play.setEnabled(false);\n pause.setEnabled(true);\n stop.setEnabled(true);\n }",
"public void setState (int philosphoer, String state){\n currentState[philosphoer] = state;\n }",
"public void setBTStreak50(int s)\n\t{\n\t\tbattletowerCurrentStreakLvl50 = s;\n\t}",
"public void setState(PlayerState newPlayerState) {\n\n this.playerState = newPlayerState;\n\n closeWindows();\n\n\n switch (newPlayerState) {\n\n case CHOOSE_BONUS_TILE:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n\n break;\n\n\n case THROWDICES:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(true);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n try {\n throwDices();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n\n case DOACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n try {\n yourTurn();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n\n break;\n\n case BONUSACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n try {\n bonusAction();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n case CHOOSEACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n\n case CHOOSEWORKERS:\n case ACTIVATE_PAY_TO_OBTAIN_CARDS:\n case CHOOSE_EFFECT:\n case CHOOSECOST:\n case CHOOSE_COUNCIL_PRIVILEGE:\n case PRAY:\n case WAITING:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n break;\n\n case ENDTURN:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n case LEADER:\n\n noButtonsAble();\n\n setUseLeader(true);\n break;\n\n\n case SUSPENDED:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n suspendedPane.setVisible(true);\n\n break;\n\n\n }\n\n }",
"public void setPlaybackState(PlaybackStateCompat param1) {\n }",
"void setPlayerTurn() throws RemoteException;",
"public void setStage(){\n if(id < 3)\n stage = 1;\n if(id >= 3 && id < 6)\n stage = 2;\n if(id >= 6 && id < 9)\n stage = 3;\n if(id >= 9)\n stage = 4;\n }",
"public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }",
"@Override\n public void setState(String s)\n {\n state = s;\n nbChanges++;\n }",
"@Override\n\tpublic void setPlayer(Player player) {\n\n\t}",
"void setState(int state);",
"public static void switchPlayers(){\n\t\tif(turn.equals(\"white\")){\n\t\t\tturn = \"black\";\n\t\t}\n\t\telse{\n\t\t\tturn = \"white\";\n\t\t}\n\t}",
"private void setGameState() // Convert the string version of the game state to the GameState version.\n\t{\n\t\tif (gameStateString.equalsIgnoreCase(\"waitingForStart\"))\n\t\t{\n\t\t\tgameState = GameState.waitingForStart;\n\t\t}\n\t\telse if (gameStateString.equalsIgnoreCase(\"gameWelcome\"))\n\t\t{\n\t\t\tgameState = GameState.gameWelcome;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"decideWhoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.decideWhoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerOneGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerOneGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerTwoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerTwoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerOnesTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerOnesTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerTwosTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerTwosTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"aPlayerHasWon\"))\n\t\t{\n\t\t\tgameState = GameState.aPlayerHasWon;\n\t\t} \n\n\t}",
"public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }",
"public void setTurning(java.lang.Boolean value);",
"public void setGameRound(boolean gameRound){\n this.gameRound = gameRound;\n }",
"public void changeState(GameObjectState s) {\r\n\t\tstate.undoAction();\r\n\t\tstate = s;\r\n\t\tstate.doAction();\r\n\t}",
"public void setStartState(State startState) {\n\t\tthis.startState=startState;\r\n\t}",
"public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }",
"public void pauseToggle() {\r\n if(gameState == 1) {\r\n gameState = 0;\r\n }\r\n else gameState = 1;\r\n }",
"void setState(boolean state);",
"public void setInGame() {\n this.inGame = true;\n }",
"public void setPlayerTurn(boolean playerTurn) {\n this.playerTurn = playerTurn;\n }",
"public void setSitting(boolean p_75270_1_) {\n\t\tisSitting = p_75270_1_;\n\t}",
"public BSState() {\n this.playerTurn=1;\n this.p1TotalHits=0;\n this.p2TotalHits=0;\n this.shipsAlive=10;\n this.shipsSunk=0;\n this.isHit=false;\n this.phaseOfGame=\"SetUp\";\n this.shotLocations=null;\n this.shipLocations=null;\n this.shipType=1;\n this.board=new String[10][20];\n //this.player1=new HumanPlayer;\n //this.player2=new ComputerPlayer;\n\n }",
"protected final void setState(State s) {\n state = s;\n }",
"public void turnOn(){\n Logger.getGlobal().log(Level.INFO,\" Turning On..\");\n vendingMachine = new VendingMachine();\n inventoryPopulation();\n idle();\n }",
"public void setState(State state)\n\t{\n\t\tsetState(conferenceInfo, state);\n\t}",
"public void setState(int state) {\n\t\tif (state == CHASE)\n\t\t\tthis.state = CHASE;\n\t\telse if (state == RUN) \n\t\t\tthis.state = RUN;\n\t}",
"public void setState(String state);",
"void setNightModeState(boolean b);",
"public void changePlayerTurn()\n {\n if (player_turn == RED)\n player_turn = BLACK;\n else\n player_turn = RED;\n }",
"public void setState(int state);",
"public void setState(int state);",
"public void updateState(boolean isPlaying) {\r\n\t if (remoteControlClient != null) {\r\n\t if (isPlaying) {\r\n\t remoteControlClient\r\n\t .setPlaybackState(RemoteControlClient.PLAYSTATE_PLAYING);\r\n\t } else { \r\n\t remoteControlClient\r\n\t .setPlaybackState(RemoteControlClient.PLAYSTATE_PAUSED);\r\n\t } \r\n\t } \r\n\t }",
"public void setActive(Player p, boolean value) {\n this.getInstance(p).setActive(value);\n }",
"public void setGame() {\n }",
"@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}",
"public static void setPlayer(Player p) {\n\t\tUniverse.player = p;\n\t}",
"public static void setScoreBoard(Player p) {\n\t\n}",
"public Game(Stage s){\n\t\tmyStage = s;\n\t}"
] | [
"0.689119",
"0.68767214",
"0.68718225",
"0.6694096",
"0.65995044",
"0.65132535",
"0.6492202",
"0.6425598",
"0.60954136",
"0.6044789",
"0.6033919",
"0.6033246",
"0.6006027",
"0.5998501",
"0.5995776",
"0.59820837",
"0.5942468",
"0.59360874",
"0.59300977",
"0.5929049",
"0.59267884",
"0.59263074",
"0.5900234",
"0.58973926",
"0.5895356",
"0.5883516",
"0.5878305",
"0.58710724",
"0.58477926",
"0.5839164",
"0.581108",
"0.5792395",
"0.5770529",
"0.5766284",
"0.5761833",
"0.5750656",
"0.5744842",
"0.5738604",
"0.5738177",
"0.5732004",
"0.57184976",
"0.57129145",
"0.5701298",
"0.56996864",
"0.56996727",
"0.5684394",
"0.56651485",
"0.5664197",
"0.5657496",
"0.56521463",
"0.56440127",
"0.56310505",
"0.5625527",
"0.5611052",
"0.5610579",
"0.56030405",
"0.55934197",
"0.5592232",
"0.5588427",
"0.55742717",
"0.55708796",
"0.55702823",
"0.5566181",
"0.5563667",
"0.55605876",
"0.5559576",
"0.55458987",
"0.55377126",
"0.5535733",
"0.553515",
"0.55302465",
"0.55245006",
"0.55222785",
"0.552105",
"0.5517051",
"0.5511517",
"0.55090064",
"0.55060625",
"0.5505789",
"0.5504547",
"0.55045426",
"0.5502186",
"0.5500118",
"0.5498592",
"0.548717",
"0.54849327",
"0.54810727",
"0.54746145",
"0.5471988",
"0.5467946",
"0.5466417",
"0.5464437",
"0.5464437",
"0.54624325",
"0.545814",
"0.5454228",
"0.5453736",
"0.54521686",
"0.54489714",
"0.54479563"
] | 0.7350181 | 0 |
Returns the sprint state of the player | public boolean isSprinting(){
return this.sprint;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }",
"public Player getState() {\n\t\treturn state;\n\t}",
"public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}",
"public PlayerState getPlayerState() {\r\n return playerState;\r\n }",
"PlayerState getPlayerState() {\n return playerState;\n }",
"public PlayerState getPlayerState() {\n return this.playerState;\n }",
"public String toString() {\r\n\t\treturn gameState;\r\n\t}",
"public String getStateOfPlayer(PlayerController playerController)\n {\n // This function is used to print the state of the player\n String str = \"\";\n str += \"Player ID:\"+playerController.getPlayerId()+\" Points-> \"+playerController.getPoints()+\" Total_Fouls_Count-> \"+ playerController.getTotalFoulsCount()+ \" Recent_Unsuccessful_Attempts_Count -> \"+ playerController.getRecentUnsuccessfulAttemptsCount();\n return str;\n }",
"public String dumpState() {\n StringBuilder out = new StringBuilder();\n out.append(currentPlayer);\n for (int i = 0; i < board.length; ++i)\n out.append(\" \" + board[i]);\n\n return out.toString();\n }",
"public String printState(){\n if (this.state.equals(\"unstarted\")) return \"unstarted 0\";\n\n else if (this.state.equals(\"terminated\")) return \"terminated 0\";\n else if (this.state.equals(\"blocked\")) {\n return String.format(\"blocked %d\", ioBurstTime);\n }\n else if (this.state.equals(\"ready\")) {\n if (remainingCPUBurstTime !=null){\n return String.format(\"ready %d\", remainingCPUBurstTime);\n }\n return \"ready 0\";\n }\n\n else if (this.state.equals(\"running\")){\n return String.format(\"running %d\", cpuBurstTime);\n }\n\n else return \"Something went wrong.\";\n }",
"public static String getStoryState(){\r\n\t\treturn storyState;\r\n\t}",
"public int getPlayState(){\r\n\t\tif(player.getStatus() == BasicPlayer.PLAYING){\r\n\t\t\treturn songsToPlay.isEmpty() ? selectedPreset + 10 : selectedPreset;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"@PlayerState\n public abstract int getPlayerState();",
"public GameState GetState(){\n\t\treturn this.state;\n\t}",
"private void printDebugState(int player) {\n System.out.println(\"Player \" + player + \" ships and grid:\");\n for (Ship s : playerShips[player]) {\n System.out.println(s.getDebugState());\n }\n System.out.println(grids[player].toString());\n }",
"public String getSiretState() {\r\n\t\treturn siretState;\r\n\t}",
"public String getPlayersStatus(){\n\t\tString pStatus = \"\";\n\t\tPlayer player;\n\t\tfor(int i = 0; i < this.players.size(); i++){\n\t\t\tplayer = this.players.get(i);\n\t\t\tpStatus += \"[\" +player.getName() + \": \";\n\t\t\tpStatus += Integer.toString(player.numCards()) + \"] \";\n\t\t} \n\t\t\n\t\treturn pStatus;\n\t}",
"public String getGameStatus() {\n return gameStatus;\n }",
"public void setSprint(boolean s){\n this.sprint = s;\n }",
"public GameState getGameState();",
"String getState();",
"String getState();",
"String getState();",
"@Override\n public String displayGameBoard(int stage) {\n String out=\"\";\n switch(stage) {\n case 0:\n out = \"Initial State: \";\n for (int i = 0; i < this.squareCount; i++) {\n out = out.concat(this.mySquares[i].statusSquare());\n }\n break;\n case 1:\n out = String.format(\"%s rolls %d:\", this.currentPlayer.getName(), this.numSquares);\n for (int i = 0; i < this.squareCount; i++) {\n out = out.concat(this.mySquares[i].statusSquare());\n }\n break;\n case 2:\n out = \"Final State: \";\n for (int i = 0; i < this.squareCount; i++) {\n out = out.concat(this.mySquares[i].statusSquare());\n }\n break;\n case 3:\n out = String.format(\"%s wins!\",this.currentPlayer.getName());\n break;\n }\n return(out);\n }",
"public GameState getState() {\n\t\treturn state;\n\t}",
"@Override\n\tpublic String toString(){\n\t\treturn \"com.jcdeck.adversary.State Turn: \"+this.getTurn()+\" Depth: \"+this.depth;\n\t}",
"public void printPlayerStat(Player player);",
"public state getStatus(){\n return this.st;\n }",
"public String getStateOfBoard()\n {\n // This function is used to print state of the board. such as number of coins present on the board\n String str=\"\";\n str += \"Black_Coins Count:\"+this.gameController.getCoinsCount(CoinType.BLACK) +\" Red_Coins Count:\"+this.gameController.getCoinsCount(CoinType.RED);\n return str;\n }",
"public SimulationState getState() {\n\t\treturn state;\n\t}",
"public int status() \n {\n \tif (stonesCount(7,12) != 0 && stonesCount(0,5) != 0)\n \t\treturn GAME_NOT_OVER;\n \telse if (stonesCount(7,13) < stonesCount(0,6))\n \t\treturn GAME_OVER_WIN;\n \telse if (stonesCount(7,13) == stonesCount(0,6))\n \t\treturn GAME_OVER_TIE;\n \telse\n \t\treturn GAME_OVER_LOSE;\n }",
"public String state() {\n\treturn state(points, temperature, currentStateEnergy);\n }",
"public GameState getGameState() {\n return this.state;\n }",
"public GameState getGameState(){\n return this.gameState;\n }",
"java.lang.String getState();",
"public GameState getGameState() {\n return this.gameState;\n }",
"interface GameState {\n String WAITING_FOR_SECOND_PLAYER = \"WAITING_FOR_SECOND_PLAYER\";\n String TURN_HARE = \"TURN_HARE\";\n String TURN_HOUND = \"TURN_HOUND\";\n String WIN_HARE_BY_ESCAPE = \"WIN_HARE_BY_ESCAPE\";\n String WIN_HARE_BY_STALLING = \"WIN_HARE_BY_STALLING\";\n String WIN_HOUND = \"WIN_HOUND\";\n }",
"public String getGameString(){\n\treturn printString;\n }",
"public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}",
"public int getSeatPlaying() {\n return this.seatPlaying;\n }",
"public State getState()\n\t{\n\t\treturn getState(conferenceInfo);\n\t}",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"public String getState() {\n\t\treturn state.toString();\n\t}",
"public String saveCurrentGameState() {\r\n\t\treturn null;\r\n\t}",
"public void printState(int option, char player) {\n\t\tif(option == 1){\r\n\r\n\t\t\t//Get successors for the players\r\n\t\t\tState[] successors = this.getSuccessors(player);\r\n\r\n\t\t\t//If the state has no successors but is not a terminal\r\n\t\t\t//node, print the board itself.\r\n\t\t\tif(successors.length == 0 && !this.isTerminal()){\r\n\t\t\t\tSystem.out.println(this.getBoard());\r\n\t\t\t}\r\n\r\n\t\t\t//If there are no valid moves available and the node is \r\n\t\t\t//a terminal node\r\n\t\t\tif(successors.length == 0 && this.isTerminal())\r\n\t\t\t\treturn;\r\n\r\n\t\t\t//Print the successors in natural reading order\r\n\t\t\tif(successors.length != 0){\r\n\r\n\t\t\t\t//Print the states\r\n\t\t\t\tfor(State state : successors){\r\n\t\t\t\t\tSystem.out.println(state.getBoard());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//If option is 2, check whether the board is a terminal node or not\r\n\t\tif(option == 2){\r\n\r\n\t\t\t//Print the game theoretic value of the state, 1 if dark wins, -1 if light wins, 0\r\n\t\t\t//if it is a tie.\r\n\t\t\tif(this.isTerminal()){\r\n\t\t\t\tSystem.out.println(this.getScore());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//Print non terminal if the state is not a terminal node\r\n\t\t\t\tSystem.out.println(\"non-terminal\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\r\n\t\t//If option is 3, run the minimax algorithm on our board\r\n\t\tif(option == 3){\r\n\r\n\t\t\t//First print the game theoretic value for the given\r\n\t\t\t//player-board pair\r\n\t\t\tint gameTheoreticValue = Minimax.run(this, player);\r\n\t\t\tSystem.out.println(gameTheoreticValue);\r\n\t\t\t//Print the number of states explored\r\n\t\t\tSystem.out.println(Minimax.counterMinimax);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t//If option is four\r\n\t\tif(option == 4 || option == 6){\r\n\r\n\t\t\t//If board is terminal, produce no output\r\n\t\t\tif(this.isTerminal())\r\n\t\t\t\treturn;\r\n\r\n\t\t\t//If no move possible, but not terminal, print the board\r\n\t\t\tif(this.getSuccessors(player).length == 0 && !this.isTerminal())\r\n\t\t\t\tSystem.out.println(this.getBoard());\r\n\r\n\t\t\t//Else print the first successor\r\n\t\t\tif(this.getSuccessors(player).length != 0){\r\n\t\t\t\tState[] successors = this.getSuccessors(player);\r\n\t\t\t\t//Print the first move of the player\r\n\t\t\t\tSystem.out.println(successors[0].getBoard());\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\r\n\t\t//If flag is equal to 5, run the alpha - beta pruning\r\n\t\t//algorithm\r\n\t\tif(option == 5){\r\n\r\n\t\t\t//First print the game theoretic value for the given\r\n\t\t\t//player-board pair\r\n\t\t\tint gameTheoreticValue = Minimax.run_with_pruning(this, player);\r\n\t\t\tSystem.out.println(gameTheoreticValue);\r\n\t\t\t//Print the number of states explored\r\n\t\t\tSystem.out.println(Minimax.counterPruning);\r\n\r\n\t\t}\r\n\r\n\t}",
"public String getLastPlayed() {\n\t\treturn levelRunning;\n\t}",
"public States getPilotState() {\n\t\treturn state;\n\t}",
"String provisioningState();",
"private char getGameStatus() {\n int row;\n int col;\n\n Map<Character, Integer> lineCounts = new HashMap<>();\n\n for (row = 0; row < this.boardSize; row++) {\n countLine(getLineStatus(this.board[row]), lineCounts);\n }\n\n for (col = 0; col < this.boardSize; col++) {\n countLine(getLineStatus(getColumn(col)), lineCounts);\n }\n\n countLine(getLineStatus(getMajorDiag()), lineCounts);\n countLine(getLineStatus(getSubDiag()), lineCounts);\n\n boolean player1Won = lineCounts.getOrDefault(players[0].symbol, 0) > 0;\n boolean player2Won = lineCounts.getOrDefault(players[1].symbol, 0) > 0;\n boolean boardIsFull = lineCounts.getOrDefault(' ', 0) == 0;\n if (player1Won && player2Won) // both players completed lines, it is a tie\n return 'T';\n if (player1Won)\n return players[0].symbol;\n if (player2Won)\n return players[1].symbol;\n if (boardIsFull)\n return 'T';\n return '?';\n }",
"public GameStatus getGameStatus() {\n return gameStatus;\n }",
"PowerState getState();",
"public String getState() \n\t{\n\t\treturn state;\n\t}",
"static PlayerState findPlayerState(String playerName) {\n PlayerState playerState = null;\n\n try (Connection connection = DriverManager.getConnection(DatabaseUtil.DB_URL);\n PreparedStatement preparedStatement = connection.prepareStatement(\n \"SELECT * \"\n + \"FROM player_state s, player p, alien_wave w \"\n + \"WHERE s.player_name = p.name \"\n + \"AND s.alien_wave = w.wave \"\n + \"AND s.player_name = ?\")) {\n preparedStatement.setString(1, playerName);\n ResultSet results = preparedStatement.executeQuery();\n if (results.next()) {\n if (StringUtils.isBlank(results.getString(\"name\"))) {\n return null;\n }\n Player player = new Player();\n player.setName(results.getString(\"name\"));\n player.setLastGameStarted(results.getTimestamp(\n \"last_game_started\").toLocalDateTime());\n AlienWave alienWave = new AlienWave();\n alienWave.setWave(results.getInt(\"alien_wave\"));\n alienWave.setDescription(results.getString(\"description\"));\n alienWave.setNumberOfRows(results.getInt(\"number_of_rows\"));\n alienWave.setNumberOfColumns(results.getInt(\"number_of_columns\"));\n alienWave.setMissileSpeed(results.getInt(\"missile_speed\"));\n alienWave.setPoints(results.getInt(\"points\"));\n playerState = new PlayerState();\n playerState.setId(results.getInt(\"id\"));\n playerState.setTerminated(results.getBoolean(\"terminated\"));\n playerState.setScore(results.getInt(\"score\"));\n playerState.setPlayer(player);\n playerState.setAlienWave(alienWave);\n LOGGER.info(String.format(\"Retrieved player, %s, playing in wave: %d with player \"\n + \"state id: %d terminated %s wave: %d alien points: %d.\",\n player.getName(), playerState.getAlienWave().getWave(), playerState.getId(), playerState\n .isTerminated(), playerState.getAlienWave().getWave(), playerState.getAlienWave().getPoints()));\n }\n } catch (SQLException e) {\n LOGGER.error(\"SQLException occurred in findPlayerState().\", e);\n }\n\n return playerState;\n }",
"public Phase getGamePhase() {\r\n return gamePhase;\r\n }",
"@Override\n public BattleState getBattleState() {\n return state;\n }",
"public String getSteetState() {\r\n\t\treturn steetState;\r\n\t}",
"public String getState()\n\t{\n\t\treturn State;\n\t\t\n\t}",
"public interface IState {\n int getLevel();\n\n float getClock();\n\n int getLives();\n\n int getCurrentScore();\n\n int getRequiredScore();\n\n boolean isGameOver();\n\n @Override\n String toString();\n}",
"@Test\n public void testGameStateStack_OnPlayState(){\n\n System.out.println(gsm.getCurrentState());\n }",
"public void printPlayerStatus() {\n System.out.println(getName() + \" owns \" +\n getOwnedCountries().size() + \" countries and \"\n + getArmyCount() + \" armies.\");\n\n String ownedCountries = \"\";\n for (Country c : getOwnedCountries())\n {\n ownedCountries += c.getCountryName().name() + \": \" + c.getArmyOccupied() + \"\\n\";\n }\n System.out.println (ownedCountries);\n }",
"private String gameStateToString() // Convert the game state into a string type.\n\t{\n\t\tString getGameStateString = \"\";\n\n\t\tswitch (gameState) // Check the state of the game and change the messages as needed.\n\t\t{\n\t\tcase waitingForStart:\n\t\t\tgetGameStateString = \"waitingForStart\";\n\t\t\tbreak;\n\t\tcase gameWelcome:\n\t\t\tgetGameStateString = \"gameWelcome\";\n\t\t\tbreak;\n\t\tcase decideWhoGoesFirst:\n\t\t\tgetGameStateString = \"decideWhoGoesFirst\";\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerOneGoesFirst:\n\t\t\tgetGameStateString = \"twoPlayersPlayerOneGoesFirst\";\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerTwoGoesFirst:\n\t\t\tgetGameStateString = \"twoPlayersPlayerTwoGoesFirst\";\n\t\t\tbreak;\n\t\tcase twoPlayersNowPlayerOnesTurn: \n\t\t\tgetGameStateString = \"twoPlayersNowPlayerOnesTurn\";\n\t\t\tbreak;\n\t\tcase twoPlayersNowPlayerTwosTurn:\n\t\t\tgetGameStateString = \"twoPlayersNowPlayerTwosTurn\";\n\t\t\tbreak;\n\t\tcase aPlayerHasWon:\n\t\t\tgetGameStateString = \"aPlayerHasWon\";\n\t\t\tbreak;\t\n\t\t}\n\n\t\treturn getGameStateString;\n\n\t}",
"@Override\n public GameState getGameState() {\n return this.gameState;\n }",
"public byte getState(){\n\t\t/*\n\t\tOFFLINE((byte)0),\n ONLINE((byte)1),\n SAVING((byte)2);\n\t\t */\n\t\t//getWorld().getcWorld().update(this);\n\t\treturn state;\n\t}",
"public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}",
"public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}",
"public String getState() { return state; }",
"public void displayCurrentState(State game);",
"@Override\n\tpublic String toString() {\n\t\treturn \"New Game State\";\n\t}",
"public String getState()\n\t{\n\t\treturn state;\n\t}",
"public static boolean getIsPlayersTurn()\r\n {\r\n return isPlayersTurn;\r\n }",
"boolean isPlayerTurn();",
"public String getState() {\n StringBuilder builder = new StringBuilder();\n //builder.append(muteMusic.getBackground().getLevel());\n //builder.append(',');\n builder.append(muteClicked);\n builder.append(',');\n builder.append(gameOver);\n builder.append(',');\n builder.append(wordsDetectedByUser.size());\n builder.append(',');\n for(int i =0;i<wordsDetectedByUser.size();i++)\n { builder.append(wordsDetectedByUser.get(i));\n builder.append(',');}\n builder.append(notValidWord);\n builder.append(',');\n // m1Handler.removeCallbacks(m1Runnable);\n mHandler.removeCallbacks(mRunnable);\n builder.append(phaseTwo);\n builder.append(',');\n builder.append(currentScore); //storing current score\n builder.append(',');\n builder.append(t); //storing timer state\n builder.append(',');\n Object a[] = DoneTiles.toArray();\n builder.append(a.length);\n builder.append(',');\n for(int i=0;i<a.length;i++) {\n builder.append(a[i].toString());\n builder.append(',');\n }\n builder.append(mLastLarge);\n builder.append(',');\n builder.append(mLastSmall);\n builder.append(',');\n for (int large = 0; large < 9; large++) {\n for (int small = 0; small < 9; small++) {\n builder.append(mSmallTiles[large][small].getOwner().name());\n builder.append(',');\n builder.append((((Button)mSmallTiles[large][small].getView()).getText()).toString());\n builder.append(',');\n //Log.d(DoneTiles);\n }\n }\n return builder.toString();\n }",
"public S getState() {\n return currentState;\n }",
"int getAttackStatStage();",
"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 String getState( )\r\n {\r\n if (isEating)\r\n return \"Eating\"; // Exit method w/ current state\r\n\r\n if (isSleeping)\r\n return \"Sleeping\";\r\n\r\n return \"Error in State\";\r\n }",
"public PlaybackStateCompat getPlaybackState() {\n }",
"String getPlayer();",
"public static String turnState(double sot, double eot) {\n\t\t// check if we are in the beginning of the turn and return the corresponding bin\n\t\tfor (int i = 0; i < SOT_BINS.length; i++) {\n\t\t\tif (sot < SOT_BIN_ENDS[i]) {\n\t\t\t\treturn SOT_BINS[i];\n\t\t\t}\n\t\t}\n\t\t// otherwise return bin relative to eot\n\t\treturn eotBin(eot);\n\t}",
"public PrinterState getDriverState(){\n\t\treturn thePrinterState;\n\t}",
"public String getState()\n {\n \treturn state;\n }",
"String getSwstatus();",
"public Player getPlayerInTurn();",
"GameState getGameState() {\n return gameState;\n }",
"public Stage retrieveStage()\n {\n return gameStage;\n }",
"public String state() {\n return this.state;\n }",
"public String state() {\n return this.state;\n }",
"public int getState();",
"public int getState();",
"public int getState();",
"public int getState();",
"private void getPlayerStatusFromServer()\r\n\t{\r\n\t\ttry {\r\n\t\t\t// Create data input stream\r\n\t\t\tDataInputStream playerStatusInputFromServer = new DataInputStream(\r\n\t\t\t\t\tsocket.getInputStream());\r\n\t\t\tisPlayerAlive = playerStatusInputFromServer.readBoolean();\r\n\t\t\thasPlayerWon = playerStatusInputFromServer.readBoolean();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public PlaybackStateCompat getPlaybackState() {\n }",
"public int getSoundState() {\n return preferences.getInt(\"sound_state\",0);\n }",
"public int gameState() {\n \tboolean check = isCheck(turn);\n \t\n \t//change this code to be some sort of checkmate detection\n \tif(check) {\n \t\t//we need to check whether there is a legal move that puts the king out of check\n \t\t//we need to loop through all pieces of the same color as the turn and make all legal moves\n \t\t//then after each move, check whether the king is still in check\n \t\t\n \t\t//first generate a list of all pieces for the turn color\n \t\tArrayList<Piece> pieces = getPieces(turn);\n \t\t\n \t\tboolean freedom;\n \t\t\n \t\t//now for each piece, check whether moving that piece can get the king out of check\n \t\tfor(int i = 0; i < pieces.size(); i++) {\n \t\t\tfreedom = simulate(pieces.get(i));\n \t\t\tif(freedom) {\n \t \t\tupdateCheckMove(false);\n \t \t\tSystem.out.println(\"Check on \" + turn + \" King!\");\n \t\t\t\treturn 2; //if the king can move, then the game isn't over yet\n \t\t\t}\n \t\t}\n \t\t\n \t\t//the game is over if we reach this far, so we can assume checkmate\n \t\t//resignation logic will probably be specific to Display class\n \t\t\n \t\tupdateCheckMove(true);\n \t\t\n \t\tif(turn == PieceColor.White) return -1; //black win if white king in check and can't move\n \t\tif(turn == PieceColor.Black) return 1;\n \t}\n \t\n \t//if all of these fail, the game isn't over yet\n \treturn 2;\n }"
] | [
"0.7170017",
"0.69233364",
"0.68635213",
"0.67622364",
"0.6735815",
"0.6603657",
"0.65078723",
"0.6307158",
"0.6273208",
"0.6230812",
"0.620942",
"0.61823356",
"0.6172349",
"0.6092564",
"0.59955597",
"0.5980871",
"0.5941962",
"0.5928151",
"0.5924722",
"0.58898205",
"0.5877351",
"0.5877351",
"0.5877351",
"0.5860432",
"0.58581597",
"0.5834405",
"0.5833239",
"0.579121",
"0.57900256",
"0.57592285",
"0.57321966",
"0.572962",
"0.5714386",
"0.571094",
"0.5696668",
"0.5665859",
"0.5628364",
"0.562246",
"0.5619526",
"0.5616624",
"0.5616031",
"0.5602974",
"0.5602974",
"0.5602974",
"0.5602974",
"0.5602974",
"0.5602974",
"0.5591323",
"0.55659664",
"0.5554632",
"0.5546886",
"0.5546687",
"0.55439484",
"0.55326164",
"0.55313826",
"0.55263406",
"0.55212104",
"0.5516025",
"0.5513356",
"0.55127555",
"0.55098933",
"0.5509598",
"0.55080473",
"0.5507729",
"0.5506629",
"0.55046695",
"0.5500603",
"0.54980415",
"0.54970855",
"0.54970855",
"0.54945314",
"0.54927015",
"0.54905105",
"0.54901415",
"0.54892206",
"0.54757273",
"0.5471218",
"0.5470658",
"0.54665345",
"0.54659003",
"0.5464799",
"0.5459348",
"0.54581773",
"0.5454659",
"0.5454091",
"0.545379",
"0.54507786",
"0.5447059",
"0.5444019",
"0.54436904",
"0.54429835",
"0.54429835",
"0.5437948",
"0.5437948",
"0.5437948",
"0.5437948",
"0.5437899",
"0.54348224",
"0.54308665",
"0.5428899"
] | 0.6474505 | 7 |
Adds a weapon to the players inventory | public void addWeapon(Pair<Byte,Short> weapon){
//Total number of weapons player can carry is 5 (inc. default weapon)
//If player has <3 weapons, simply add weapon.
//Otherwise, first remove oldest weapon in inventory then add at that
//position.
//oldest weapon tracked by linked list of weapon entries.
if(this.weapons.size() < 3) {
this.weapons.add(weapon);
this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));
}else{
//Checks for duplicates, if duplicate weapons
//found, new weapons ammo is just added to the current
//weapon already in inventory
for(Pair<Byte,Short> w : this.weapons){
if(Objects.equals(w.getKey(), weapon.getKey())){
if(weaponEntryTracker.size() == 1){
weaponEntryTracker = new LinkedList<>();
}
else{
for(int tracker : weaponEntryTracker){
if(tracker == this.weapons.indexOf(w)){
weaponEntryTracker.remove((Integer) tracker);
}
}
}
Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));
if(this.currentWeapon == w){
this.setCurrentWeapon(newWeapon);
}
this.weapons.set(this.weapons.indexOf(w),newWeapon);
weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));
return;
}
}
//check for any no weapon entries - indicates
//player dropped weapon.
for(Pair<Byte,Short> w : this.weapons){
if(w.getKey() == NO_WEAPON_ID){
this.weapons.set(this.weapons.indexOf(w),weapon);
this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));
return;
}
}
//If no null entries are found, remove oldest weapon
int oldestWeapon = this.weaponEntryTracker.poll();
byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();
this.weapons.set(oldestWeapon, weapon);
this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));
if(oldestWeaponKey == currentWeapon.getKey()){
setCurrentWeapon(weapon);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }",
"public void add(Weapon weapon) {\n\t\tweaponList.add(weapon);\n\t}",
"public void addWeapon(Weapon weapon) {\n setAttack(getAttack() + weapon.getDamage());\n setWeaponSlots(getWeaponSlots() - 1);\n }",
"public void giveWeapon(Weapon weapon) throws RuntimeException {\n if (weaponList.size() > 2)\n throw new RuntimeException(\"This player can't receive any more weapons\");\n weaponList.add(weapon);\n }",
"@Override\n public void equip(@NotNull IWeapon weapon) {\n weapon.equipToMage(this);\n }",
"public void addWeapon(CardWeapon cw)\n {\n this.weapons.add(cw);\n }",
"public void add(Weapon weapon) {\n\t\tif (weaponList.size() < 2) {\n\t\t\tweaponList.add(weapon);\n\t\t}\n\t}",
"public void addWeapon(Weapon x){\n\t\tplayerWeapon=new Weapon(x);\n\t\tHealth+=x.gethealthStat();\n\t\tAttackForce+=x.getafStat();\n\t\tDefense+=x.getdefenseStat();\n\t}",
"public void addSpawnpointWeapon(Weapon w) {\n this.weaponSpawnpoint.addWeapon(w);\n }",
"public void add(Weapon weapon){\n\t\tsetCount(getCount() + weapon.getCount());\n\t\tweapon.expire();\n\t}",
"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 }",
"@Override\n\tpublic void addEquipment(Weapon w) {\n\t\tif (nbWeapons() > 0)\n\t\t\tthrow new BreakingRuleException();\n\t\tsuper.addEquipment(w);\n\t}",
"protected void addAllowedWeapon(Material weapon) {\r\n\t\tthis.allowedWeapons.add(weapon);\r\n\t}",
"public void equipWeaponToCharacter (IPlayerCharacter character) {\n if (lenInventory > 1){\n character.equip(this.weaponsInventory.get(this.pointInventory));\n }\n }",
"public void equipSelectedWeapon() {\n }",
"public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}",
"public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}",
"public void equip(Equipment e){\n equipment.add(e);\n }",
"public void equip(Hero h) {\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.getName().equals(this.getName())) {\n\t\t\t\tw.setEquipped(true);\n\t\t\t\tw.statsIncrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t} else {\n\t\t\t\tw.unequip(h);\n\t\t\t}\n\t\t}\n\t}",
"@POST(\"/AddWeapon\")\n\tint addWeapon(@Body Weapon weapon,@Body int id) throws GameNotFoundException;",
"public void addProduct(Product item){\n inventory.add(item);\n }",
"public void pickUpWeapon(CardWeapon weapon, CardWeapon weaponToWaste, List<CardPower> powerUp) throws InsufficientAmmoException, NoCardWeaponSpaceException {\n List <Color> tmp = new ArrayList<>(weapon.getPrice());\n List <CardPower> tmpPU = new ArrayList<>();\n if(this.weapons.size()== 3)\n if(weaponToWaste==null)\n throw new NoCardWeaponSpaceException();\n if(tmp.size() > 1)\n {\n tmp = tmp.subList(1, tmp.size());\n pay(tmp, powerUp);\n }\n if (weapons.size() == 3){\n this.position.getWeapons().add(weaponToWaste);\n this.weapons.remove(weaponToWaste);\n }\n this.weapons.add(weapon);\n weapon.setShooter(this);\n this.position.getWeapons().remove(weapon);\n if(game != null)\n game.notifyGrabWeapon(this,weapon, weaponToWaste);\n\n }",
"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}",
"public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }",
"private void addToInventory(Item item) {\n inventory.put(item.getName(), item);\n }",
"public static void giveStuff(GamePlayer player) {\r\n\t\tItemStack sword = new ItemStack(Material.WOOD_SWORD);\r\n\t\tItemStack bow = new ItemStack(Material.BOW);\r\n\t\tItemStack arrow = new ItemStack(Material.ARROW);\r\n\t\tItemStack compass = new ItemStack(Material.COMPASS);\r\n\t\tItemMeta compassMeta = sword.getItemMeta();\r\n\t\tItemMeta swordMeta = sword.getItemMeta();\r\n\t\tItemMeta bowMeta = sword.getItemMeta();\r\n\t\t\r\n\t\tplayer.getPlayer().getInventory().clear();\r\n\t\tswordMeta.spigot().setUnbreakable(true);\r\n\t\tsword.setItemMeta(swordMeta);\r\n\t\tsword.setAmount(1);\r\n\t\t\r\n\t\tbowMeta.spigot().setUnbreakable(true);\r\n\t\tbowMeta.setDisplayName(\"§aSniper§r §7(One Shot Kill)\");\r\n\t\tbow.setItemMeta(bowMeta);\r\n\t\tbow.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 10);\r\n\t\tbow.setAmount(1);\r\n\t\t\r\n\t\tarrow.setAmount(1);\r\n\t\t\r\n\t\tcompassMeta.setDisplayName(\"§aTarget Tracker\");\r\n\t\tcompass.setItemMeta(compassMeta);\r\n\t\tcompass.setAmount(1);\r\n\t\t\r\n player.getPlayer().getInventory().addItem(sword);\r\n player.getPlayer().getInventory().addItem(bow);\r\n player.getPlayer().getInventory().addItem(arrow);\r\n player.getPlayer().getInventory().addItem(compass);\r\n\t}",
"public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }",
"public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }",
"public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }",
"public static void addSpecialBar(Player player, int weapon) {\n\t\tif (player.getTank()) {\n\t\t\tplayer.setSpecialAttackAmount(10.0, false);\n\t\t}\n\n\t\tif (GameType.isPreEoc()) {\n\t\t\tif (weapon == 11696 || weapon == 11698 || weapon == 11700) { //godswords except ags\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (weapon == 13902) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\treturn;\n\t\t\t} else\n\t\t\tif (weapon == 19780) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\treturn;\n\t\t\t} else if (weapon == 21371) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (GameType.isOsrs() && Misc.arrayHasNumber(ServerConstants.ARMADYL_GODSWORDS_OSRS, weapon, 0) || GameType.isPreEoc() && weapon == 11694) {\n\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\treturn;\n\t\t}\n\t\tif (Combat.hasAbyssalTentacle(player, weapon)) {\n\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\treturn;\n\t\t}\n\t\tif (ItemAssistant.getItemName(weapon).equals(\"Dragon claws\")) {\n\t\t\tplayer.getPA().sendFrame171(0, 7800);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7812);\n\t\t\treturn;\n\t\t}\n\n\t\tif (ItemAssistant.getItemName(weapon).contains(\"Granite maul\")) {\n\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\treturn;\n\t\t}\n\n\t\t// Dragon crossbow\n\t\tif (weapon == 21902 && ServerConfiguration.DEBUG_MODE) {\n\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\treturn;\n\t\t}\n\n\t\tif (GameType.isOsrs()) {\n\n\t\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\t\tif (itemName.equals(\"Heavy ballista\") || itemName.equals(\"Light ballista\")) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (itemName.equals(\"Armadyl crossbow\")) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tswitch (weapon) {\n\n\n\t\t\tcase 4151: // Abyssal whip\n\t\t\tcase 12773: // Volcanic abyssal whip\n\t\t\tcase 12774: // Frozen abyssal whip\n\t\t\tcase 15_441:\n\t\t\tcase 15_442:\n\t\t\tcase 15_443:\n\t\t\tcase 15_444:\n\t\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\t\tbreak;\n\t\t\tcase 859:\n\t\t\t\t// Magic bows\n\t\t\tcase 861:\n\t\t\tcase 12788: // Magic shortbow (i).\n\t\t\tcase 11235:\n\t\t\tcase 12765:\n\t\t\tcase 12766:\n\t\t\tcase 12767:\n\t\t\tcase 12768:\n\t\t\tcase 13879:\n\t\t\tcase 13883:\n\t\t\tcase 15241 : // Hand cannon\n\t\t\tcase 20849: // Dragon thrown axe\n\t\t\tcase 22634: // Morrigan's throwing axe osrs\n\t\t\tcase 22636: // Morrigan's javelin osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\tbreak;\n\n\t\t\tcase 22622: // Statius's warhammer osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\tbreak;\n\t\t\tcase 4587:\n\t\t\tcase 13899:\n\t\t\tcase 13901:\n\t\t\tcase 20000:\n\t\t\tcase 1305: // Dragon longsword\n\t\t\tcase 12904: // Toxic staff of the dead\n\t\t\tcase 16209: // Toxic staff of the dead\n\t\t\tcase 11791: // Staff of the dead\n\t\t\tcase 16272: // Toxic staff of the dead\n\t\t\tcase 22296: // Staff of light\n\t\t\tcase 15486:\n\t\t\tcase 22613: // Vesta's longsword osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7599);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7611);\n\t\t\t\tbreak;\n\t\t\tcase 11802:\n\t\t\tcase 11806:\n\t\t\tcase 11808:\n\t\t\tcase 11804:\n\t\t\tcase 20368: // Ags\n\t\t\tcase 20374: // Zgs\n\t\t\tcase 20372: // Sgs\n\t\t\tcase 20370: // Bgs\n\t\t\tcase 11838:\n\t\t\tcase 12808: // Sara's blessed sword.\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\tbreak;\n\t\t\tcase 3204:\n\t\t\t\t// d hally\n\t\t\t\tplayer.getPA().sendFrame171(0, 8493);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 8505);\n\t\t\t\tbreak;\n\t\t\tcase 1377:\n\t\t\t\t// d battleaxe\n\t\t\t\tplayer.getPA().sendFrame171(0, 7499);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7511);\n\t\t\t\tbreak;\n\n\t\t\tcase 12848:\n\t\t\tcase 13576:\n\t\t\tcase 21015: // Dinh's bulwark\n\t\t\tcase 16259:\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\tbreak;\n\t\t\tcase 1249:\n\t\t\tcase 11824:\n\t\t\t\t// dspear //zammy spear\n\t\t\tcase 13905:\n\t\t\tcase 13907:\n\t\t\tcase 11889: // Zamorakian hasta\n\t\t\tcase 22610: // Vesta's spear osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7674);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7686);\n\t\t\t\tbreak;\n\n\t\t\tcase 12926: // Toxic blowpipe.\n\t\t\t\tplayer.getPA().sendFrame171(0, 7649);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7661);\n\t\t\t\tbreak;\n\n\t\t\tcase 1215:\n\t\t\t\t// dragon dagger\n\t\t\tcase 1231:\n\t\t\tcase 5680:\n\t\t\tcase 5698:\n\t\t\tcase 13271: // Abyssal dagger.\n\t\t\tcase 21009: // Dragon sword\n\t\t\t\tplayer.getPA().sendFrame171(0, 7574);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7586);\n\t\t\t\tbreak;\n\t\t\tcase 1434:\n\t\t\tcase 10887:\n\t\t\t\t// dragon mace\n\t\t\tcase 11061: // Ancient mace\n\t\t\t\tplayer.getPA().sendFrame171(0, 7624);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7636);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tplayer.getPA().sendFrame171(1, 7649);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7674);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7800);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7624); // mace interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7474); // hammer, gmaul\n\t\t\t\tplayer.getPA().sendFrame171(1, 7499); // axe\n\t\t\t\tplayer.getPA().sendFrame171(1, 7549); // bow interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7574); // sword interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7599); // scimmy sword interface, for most swords.\n\t\t\t\tplayer.getPA().sendFrame171(1, 7699); // scimmy sword interface, for most swords.\n\t\t\t\tplayer.getPA().sendFrame171(1, 8493);\n\t\t\t\tplayer.getPA().sendFrame171(1, 12323); // whip interface\n\n\t\t\t\tshowCombatInterface(player, weapon);\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}",
"private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }",
"public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}",
"public Weapon (Player player) {\n\t\tthis.player = player;\n\t}",
"void addElementToInventory(String elementName);",
"public void setWeapon(int weapon)\n\t{\n\t\tthis.weapon = weapon;\n\t}",
"public void selectWeaponFromInventory(int weaponIndex) {\n }",
"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 }",
"boolean addSteam(ItemStack me, int amount, EntityPlayer player);",
"public boolean addWeapon(Weapon wp, int row, int col)\r\n\t{\r\n\t\tif(row < rows && row >= 0 && col < columns && col >= 0)\r\n\t\t\treturn cells[row][col].addWeapon(wp);\r\n\t\treturn false;\r\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 void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }",
"public void equip();",
"@Override\n public Type getItemType() {\n return Type.WEAPON;\n }",
"public void equip(Equip equipment)\r\n { \r\n if (equipment.getType() == Equip.WEAPON)\r\n {\r\n if (weapon!=null) unequip(weapon);\r\n items.remove(equipment);\r\n weapon = equipment;\r\n attack = attack + equipment.getRating();\r\n }\r\n else //if (equipment.getType() == Equip.ARMOR)\r\n {\r\n if (armor!=null) unequip(armor);\r\n items.remove(equipment);\r\n armor = equipment;\r\n defense += equipment.getRating();\r\n }\r\n }",
"public void buy() throws CannotAffordException {\r\n\t\tGame game = Game.getInstance();\r\n\t\tgame.decreaseBudget(price);\r\n\t\tgame.getInventory().add(id);\r\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 static void addItem(Item item)\n {\n inventory.add(item);\n if(!(item.getRoomNumber() == -1 || item.getEventNumber() == -1))\n {\n Map.getRoom(item.getRoomNumber()).getEvent(item.getEventNumber()).enable();\n }\n }",
"public boolean addPlayerItem(PlayerItem playerItem);",
"public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}",
"public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }",
"public void getKilledProduct() \n {\n try{\n Player.getInstance().getInventory().add(new CowMeat());\n } catch (IllegalAccessException e) {\n //Do nothing\n }\n }",
"@POST(\"/UpdateWeapon\")\n\tWeapon updateWeapon(@Body Weapon weapon,@Body int id) throws GameNotFoundException;",
"public void softAddItem(ItemStack item, Player player){\n\t\tHashMap<Integer,ItemStack> excess = player.getInventory().addItem(item);\n\t\tfor( Map.Entry<Integer, ItemStack> me : excess.entrySet() ){\n\t\t\tplayer.getWorld().dropItem(player.getLocation(), me.getValue() );\n\t\t}\n\t}",
"private void addPlayerSheild() {\n this.playerShield += 1;\n }",
"public void addItem(Item item, int x, int y) {\n\t\tInventory items = getItemsAt(x, y);\n\t\titems.add(item);\n\t}",
"public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}",
"private void unequip(Equip e)\r\n { \r\n if (e.getType()==Equip.WEAPON)\r\n {\r\n attack -= e.getRating();\r\n items.add(e);\r\n }\r\n else if (e.getType() == Equip.ARMOR)\r\n {\r\n items.add(e);\r\n defense -= e.getRating();\r\n }\r\n }",
"public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}",
"public PickupWeaponBase(Vec2 position, WeaponBase weaponBarrel) {\n super(position, Vec2.ZERO, new Sprite(\"items/weaponBody\"));\n setSize(new Vec2(0.7, 0.7));\n setRenderLayer(RenderLayer.RenderLayerName.HIGH_BLOCKS);\n\n this.cli = weaponBarrel;\n\n collider = new CircleCollider(this, 30);\n collider.setTag(\"Item\");\n collider.addInteractionLayer(\"Walk\");\n\n }",
"public void add(Equipment equipment) {\n equipments.add(equipment);\n }",
"@Override\n\tpublic int buy(Weapon item) {\n\t\treturn 0;\n\t}",
"public void toSelectingWeapon() {\n }",
"public static Weapon spawnWeapon()\r\n\t{\r\n\t\tfinal int numberOfWeapons = 5; //update as weapons are added\r\n\t\t\r\n\t\t//Create weapons in order to access attributes / randomly select a weapon\r\n\t\tSword sword = new Sword();\r\n\t\tStick stick = new Stick();\r\n\t\tBazooka bazooka = new Bazooka();\r\n\t\tAtomicBomb atomicBomb = new AtomicBomb();\r\n\t\tPotatoCannon potatoCannon = new PotatoCannon();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWeapon[] weapons = new Weapon[] {sword, stick,bazooka,atomicBomb,potatoCannon}; //store weapons in an array to randomly grab one to use in Game\r\n\t\t\r\n\t\tint randomWeapon; //weapon chosen\t\t\r\n\t\tRandom rng = new Random (); //create generator based upon current number of weapons\r\n\t\trandomWeapon = rng.nextInt(numberOfWeapons); //get a weapon object at random from array\r\n\r\n\t\treturn (weapons[randomWeapon]); //we have no need to create separate instance\r\n\t}",
"public void useWeapon(Character victim) {\n Weapons weapons = this.getInventory().getFirstWeapon();\n if (weapons == null)\n this.hit(victim);\n else {\n int vStrength = victim.getStrength();\n int mStrength = this.getStrength() * Hero.HERO_BONUS_OVER_ALL_CHARS + weapons.getDamage();\n if (vStrength >= mStrength) return;\n int strDif = mStrength - vStrength;\n int vLife = victim.getLife();\n vLife -= strDif;\n victim.setLife(vLife);\n this.getInventory().removeItems(weapons);\n }\n }",
"public void addItem(Item item)\n\t{\n\t\tif(inventory.size()<=9)\n\t\t\tinventory.add(item);\n\t\telse\n\t\t\tSystem.out.println(\"Inventory is full.\");\n\t}",
"private Card murderWeapon(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"weapons\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the weapon you think \" + murderer.getName() + \" killed Gunther in \" + location.getName() + \". Listed Below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < WEAPON_NAMES.length; i++) {\n ui.getInfo().addText(WEAPON_NAMES[i].toString().substring(0,1) + WEAPON_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n WeaponTypes murderWeapon = null;\n String weapon;\n\n // check the input from the user whether it is a weapon, help command, notes command or the wrong input\n do {\n weapon = ui.getCmd().getCommand().toLowerCase();\n switch (weapon) {\n case \"rope\":\n murderWeapon = WeaponTypes.ROPE;\n break;\n case \"dagger\":\n murderWeapon = WeaponTypes.DAGGER;\n break;\n case \"wrench\":\n murderWeapon = WeaponTypes.WRENCH;\n break;\n case \"pistol\":\n murderWeapon = WeaponTypes.PISTOL;\n break;\n case \"candlestick\":\n murderWeapon = WeaponTypes.CANDLESTICK;\n break;\n case \"pipe\":\n murderWeapon = WeaponTypes.PIPE;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Select a weapon from the list above for the questioning!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter a weapon from the list above for the questioning!\");\n break;\n }\n } while (murderWeapon == null); // while the player input was not a weapon\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderWeapon.toString()); // return a card with the murder weapon selected by the user\n }",
"public void fireOnItemAddedToInventoryCommands();",
"private void inventoryHandler(){\n final Button TAB = getOwnerArea().getKeyboard().get(Keyboard.TAB);\n final Button SPACE = getOwnerArea().getKeyboard().get(Keyboard.SPACE);\n final Button R = getOwnerArea().getKeyboard().get(Keyboard.R);\n final Button T = getOwnerArea().getKeyboard().get(Keyboard.T);\n final Button Y = getOwnerArea().getKeyboard().get(Keyboard.Y);\n final Button U = getOwnerArea().getKeyboard().get(Keyboard.U);\n final Button I = getOwnerArea().getKeyboard().get(Keyboard.I);\n final Button O = getOwnerArea().getKeyboard().get(Keyboard.O);\n final Button P = getOwnerArea().getKeyboard().get(Keyboard.P);\n final Button K = getOwnerArea().getKeyboard().get(Keyboard.K);\n\n //Used for tests, as asked in the instructions\n if (R.isPressed()) {\n inventory.add(ARPGItem.ARROW, 1);\n } else if (T.isPressed()) {\n inventory.add(ARPGItem.SWORD, 1);\n } else if (Y.isPressed()) {\n inventory.add(ARPGItem.STAFF, 1);\n } else if (U.isPressed()) {\n inventory.add(ARPGItem.BOW, 1);\n } else if (I.isPressed()) {\n inventory.add(ARPGItem.BOMB, 1);\n } else if (O.isPressed()) {\n inventory.add(ARPGItem.CASTLEKEY, 1);\n } else if (P.isPressed()) {\n inventory.add(ARPGItem.WINGS, 1);\n } else if (K.isPressed()) {\n inventory.add(ARPGItem.CHESTKEY, 1);\n }\n\n /*If the player does not have any currentItem anymore we switch it (f. ex. if a player\n uses his last bomb or if the constructor assigns as the player's current item an item\n he does not possess by mistake)\n */\n if(!possess(currentItem)) {\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n\n //Switches item.\n if(TAB.isPressed()){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n if(currentItem == ARPGItem.ARROW){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n }\n\n //Uses the item and adapts the animations\n if(SPACE.isPressed() && !isDisplacementOccurs()){\n if(currentItem.use(getOwnerArea(), getOrientation(), getCurrentMainCellCoordinates())){\n switch(currentItem){\n case BOMB:\n inventory.remove(currentItem, 1);\n break;\n case BOW:\n if(actionTimer >= COOLDOWN) {\n animateAction = true;\n currentAnimation = bowAnimations[getOrientation().ordinal()];\n shootArrow = true;\n actionTimer = 0.f;\n }\n break;\n case SWORD:\n animateAction = true;\n currentAnimation = swordAnimations[getOrientation().ordinal()];\n break;\n case STAFF:\n animateAction = true;\n currentAnimation = staffAnimations[getOrientation().ordinal()];\n break;\n }\n\n }\n }\n\n //Wings have a special treatment because SPACE needs to be down and not pressed\n if (currentItem == ARPGItem.WINGS && SPACE.isDown()) {\n //Sets the animation for the current orientation. Make sure it doesn't fly yet\n // so that the animation is not stuck.\n if (!canFly) {\n currentAnimation = flyAnimations[getOrientation().ordinal()];\n }\n canFly = true;\n } else {\n //Resets to idleAnimations\n if (canFly) {\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n }\n canFly = false;\n }\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 }",
"protected void addInventoryItemType() {\n\t\tProperties props = new Properties();\n\n\t\t/* DEBUG\n\t\t\n\t\tSystem.out.println(typeNameTF.getText());\n\t\tSystem.out.println(unitsTF.getText());\n\t\tSystem.out.println(unitMeasureTF.getText());\n\t\tSystem.out.println(validityDaysTF.getText());\n\t\tSystem.out.println(reorderPointTF.getText());\n\t\tSystem.out.println(notesTF.getText());\n\t\tSystem.out.println(statusCB.getValue());\n\t\n\t\t*/ \n\n\t\t// Set the values.\n\t\tprops.setProperty(\"ItemTypeName\", typeNameTF.getText());\n\t\tprops.setProperty(\"Units\", unitsTF.getText());\n\t\tprops.setProperty(\"UnitMeasure\", unitMeasureTF.getText());\n\t\tprops.setProperty(\"ValidityDays\", validityDaysTF.getText());\n\t\tprops.setProperty(\"ReorderPoint\", reorderPointTF.getText());\n\t\tprops.setProperty(\"Notes\", notesTF.getText());\n\t\tprops.setProperty(\"Status\", (String) statusCB.getValue());\n\n\t\t// Create the inventory item type.\n\t\tInventoryItemType iit = new InventoryItemType(props);\n\n\t\t// Save it into the database.\n\t\tiit.update();\n\n\t\tpopulateFields();\n\t\t\n\t\t// Display message on GUI.\n\t\t//submitBTN.setVisible(false);\n\t\tcancelBTN.setText(\"Back\");\n\t\tmessageLBL.setText(\"Inventory Item Type added.\");\n\t}",
"@Override\r\n\t@SuppressWarnings(\"deprecation\")\r\n\tpublic void raiseEvent(Event e) {\r\n\t\tPlayer p = ((PlayerInteractEvent) e).getPlayer();\r\n\t\tPlayerStats stats = plugin.getStats(p);\r\n\t\tif (stats.subtractmoney(cost)) {\r\n\t\t\tif (!items.isEmpty()) {\r\n\t\t\t\tLinkedList<ItemStack> givenItems = new LinkedList<ItemStack>();\r\n\t\t\t\tfor (ItemStack item : items.getItemStacks()) {\r\n\t\t\t\t\tgivenItems.add(item);\r\n\t\t\t\t\tHashMap<Integer, ItemStack> failed = p.getInventory().addItem(item);\r\n\r\n\t\t\t\t\tif (failed != null && failed.size() > 0) {\r\n\t\t\t\t\t\t// the inventory may be full\r\n\t\t\t\t\t\tTribu.messagePlayer(p, (plugin.getLocale(\"Message.UnableToGiveYouThatItem\")),ChatColor.RED);\r\n\t\t\t\t\t\tstats.addMoney(cost);\r\n\t\t\t\t\t\tfor (ItemStack i : givenItems)\r\n\t\t\t\t\t\t\tp.getInventory().remove(i);\r\n\t\t\t\t\t\tgivenItems = null;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tp.updateInventory();\r\n\t\t\t\t// Alright\r\n\t\t\t\tTribu.messagePlayer(p,String.format(plugin.getLocale(\"Message.PurchaseSuccessfulMoney\"), String.valueOf(stats.getMoney())),ChatColor.GREEN);\r\n\t\t\t} else {\r\n\t\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.UnknownItem\"),ChatColor.RED);\r\n\t\t\t\tstats.addMoney(cost);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.YouDontHaveEnoughMoney\"),ChatColor.RED);\r\n\t\t}\r\n\r\n\t}",
"public ShotgunWeapon() {\n description = \" Weapon: Shotgun has\";\n }",
"public Weapon(WeaponType type, int level) {\n \tthis.effects = new ArrayList<>();\n this.type = type;\n this.level = level;\n this.effects.add(new AttackEffect(getWeaponDamage(), getWeaponSpeed(), getWeaponRange(), Target.SELF));\n }",
"private void addEnemySheild() {\n this.enemyShield += 1;\n }",
"public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }",
"public Weapon (String name) {\n\t\tsuper(name, weight, itemDamage, 0, 0, quantity);\n\t}",
"@Override\n public void applyItem() {\n Player player;\n if (Battle.getRunningBattle().getTurn() % 2 == 1)\n player = Battle.getRunningBattle().getPlayer2();\n else\n player = Battle.getRunningBattle().getPlayer1();\n\n if (player.getInGameCards().size() == 0)\n return;\n Random random = new Random();\n int randomIndex = random.nextInt(player.getInGameCards().size());\n while (!(getPlayer().getInGameCards().get(randomIndex) instanceof Warrior)) {\n randomIndex = random.nextInt(getPlayer().getInGameCards().size());\n }\n\n Buff buff = new PoisonBuff(1, true);\n buff.setWarrior((Warrior) player.getInGameCards().get(randomIndex));\n Battle.getRunningBattle().getPassiveBuffs().add(buff);\n }",
"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 }",
"@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}",
"public void attack(ItemWeapon w, Monster target) {\n\t\ttarget.takeDamage(w.getDamage()+level*20);\n\t}",
"private void setWeapons()\n {\n sewers.setWeapon(woodSword);\n promenade.setWeapon(woodSword);\n depths.setWeapon(rustedSword);\n forest.setWeapon(goldSword);\n bridge.setWeapon(silverSpear);\n ramparts.setWeapon(infantryBow);\n }",
"private void updateShop(List<ItemType> items, int level) {\n\t\tfor (ItemType item : items) {\n\t\t\tString text = item.getTextureString();\n\t\t\ttext = item instanceof SpecialType ? text\n\t\t\t\t\t: text.substring(0, text.length() - 1)\n\t\t\t\t\t\t\t+ Integer.toString(level);\n\t\t\tTexture texture = textureManager.getTexture(text);\n\t\t\tImageButton button = generateItemButton(texture);\n\n\t\t\tbutton.addListener(new ClickListener() {\n\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\tstatus.setText(item.getName());\n\t\t\t\t\tif (selectedHero == null) {\n\t\t\t\t\t\tstatus.setText(\"Unsuccessful shopping, No hero exist.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (selectedHero.getHealth() <= 0) {\n\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\"Your Commander is dead. Can't buy anything.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tboolean enoughResources = checkCost(selectedHero.getOwner(),\n\t\t\t\t\t\t\titem);\n\t\t\t\t\tif (enoughResources) {\n\t\t\t\t\t\tif (item instanceof WeaponType) {\n\t\t\t\t\t\t\tWeapon weapon = new Weapon((WeaponType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(weapon);\n\t\t\t\t\t\t\tstatus.setText(boughtString + weapon.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Weapon) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else if (item instanceof ArmourType) {\n\t\t\t\t\t\t\tArmour armour = new Armour((ArmourType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(armour);\n\t\t\t\t\t\t\tstatus.setText(boughtString + armour.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Armour) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tboolean transactSuccess;\n\t\t\t\t\t\t\tSpecial special = new Special((SpecialType) item);\n\t\t\t\t\t\t\ttransactSuccess = selectedHero\n\t\t\t\t\t\t\t\t\t.addItemToInventory(special);\n\t\t\t\t\t\t\tif (transactSuccess) {\n\t\t\t\t\t\t\t\tstatus.setText(boughtString + special.getName()\n\t\t\t\t\t\t\t\t\t\t+ \"(Special) for \"\n\t\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\t\t\"Unsuccessful Shopping, can only hold 4 specials\");\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\tselectedHero.setStatsChange(true);\n\t\t\t\t\t\ttransact(selectedHero.getOwner(), item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString mes = \"Not enough resources.\";\n\t\t\t\t\t\tstatus.setText(mes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tprivate boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tscrollTable.add(button).width(iconSize).height(iconSize).top();\n\t\t\tString stats = getItemStats(item, level);\n\t\t\tString cost = getItemCost(item, level);\n\t\t\tscrollTable.add(new Label(stats, skin)).width(iconSize).top()\n\t\t\t\t\t.left();\n\t\t\tscrollTable.add(new Label(cost, skin)).width(iconSize).top().left();\n\t\t\tscrollTable.row();\n\t\t}\n\t}",
"public void updateWeapon(int currentWeaponId) {\r\n\t\tcollectionManager.updateWeapon(currentWeaponId);\r\n\t}",
"public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\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 }",
"public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}",
"public boolean damage(Item weapon) {\n\t\tif (weapon instanceof assets.Sword) {\n\t\t\tSystem.out.println(\"The jubjub bird falls to the ground, dead.\");\n\t\t\tisAlive = false;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"void addUses(Equipment newUses);",
"public void lootObject(Items loot) {\n if (loot != null)\n this.inventory.add(loot);\n }",
"@Override\n public void setEquippedItem(IEquipableItem item) {}",
"public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }",
"public void fire(Vector2 dir, Vector2 weaponPos, Boolean multiplayer) {\n\t\t\n\t}",
"public Weapon(Player player)\n\t{\n\t\tthis.bullets=new ArrayList<Bullet>();\n\t\tthis.player=player;\n\t\tpause = cooldown;\n\t}",
"public abstract BossBar addPlayer(UUID player);",
"public boolean hasWeapon() { \n\t\tif (weaponHeld == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public void addRandomItem(double x, double y) {\r\n\r\n\t\tint choice = random.nextInt(3);\r\n\r\n\t\tString weaponchoices = Resources.getString(\"weaponchoices\");\r\n\t\tString delim = Resources.getString(\"delim\");\r\n\r\n\t\tString[] options = weaponchoices.split(delim);\r\n\t\tString option = options[choice];\r\n\r\n\t\tBufferedImage itemimage = Resources.getImage(option);\r\n\t\tSpriteGroup items = playField.getGroup(\"Items\");\r\n\t\tint healthOption = Resources.getInt(\"healthOption\");\r\n\r\n\t\tif (choice == healthOption) {\r\n\t\t\tgetHealthItem(x, y, option, itemimage, items);\r\n\t\t} else {\r\n\t\t\tgetWeaponItem(x, y, option, itemimage, items);\r\n\t\t}\r\n\r\n\t}",
"public void unequip(Hero h) {\n\t\t// TODO Auto-generated method stub\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.equipped && w.getName().equals(this.getName())) {\n\t\t\t\tsetEquipped(false);\n\t\t\t\tstatsDecrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public Weapon getWeapon(){\n return this.weaponPos;\n }",
"public final void give(final Player player, final int slot) {\n\t\tplayer.getInventory().setItem(slot, this.getItem());\n\t}"
] | [
"0.8111338",
"0.75425047",
"0.74859816",
"0.7381317",
"0.73747534",
"0.7310421",
"0.72963125",
"0.722041",
"0.7203253",
"0.7149243",
"0.7070038",
"0.68522644",
"0.6800515",
"0.67557937",
"0.66680324",
"0.6666397",
"0.6655016",
"0.66265804",
"0.6604687",
"0.6601192",
"0.6561205",
"0.64658475",
"0.6460515",
"0.64525855",
"0.64416915",
"0.6437463",
"0.64365",
"0.6374224",
"0.63607377",
"0.6357396",
"0.6313897",
"0.6289573",
"0.62647384",
"0.62253463",
"0.62161756",
"0.6207442",
"0.620596",
"0.61952645",
"0.61707395",
"0.6148162",
"0.611902",
"0.61172503",
"0.610803",
"0.60954386",
"0.6091471",
"0.60734695",
"0.6066783",
"0.60534096",
"0.60350996",
"0.6003958",
"0.59988934",
"0.5987558",
"0.59665537",
"0.59602857",
"0.59331393",
"0.59244716",
"0.592135",
"0.5907084",
"0.5900281",
"0.58913165",
"0.5888844",
"0.5886028",
"0.5877196",
"0.58620906",
"0.5852782",
"0.58472854",
"0.5832325",
"0.5825372",
"0.58115876",
"0.5799607",
"0.57895446",
"0.5774253",
"0.57659286",
"0.5756052",
"0.5746527",
"0.57451034",
"0.5735429",
"0.57265943",
"0.5724385",
"0.57197195",
"0.5716897",
"0.57162267",
"0.56991947",
"0.5683251",
"0.5683014",
"0.5674997",
"0.56688386",
"0.5668781",
"0.5667201",
"0.5649022",
"0.56469756",
"0.5646025",
"0.5640033",
"0.5638553",
"0.56352496",
"0.5633757",
"0.5630065",
"0.56172353",
"0.5615384",
"0.5608491"
] | 0.7062099 | 11 |
Removes weapon found at given position in the players inventory | public void removeWeapon(int weaponPosition){
//Set the weapon entry to null and
//remove the index from the entry tracker
weapons.set(weaponPosition,new Pair<>(NO_WEAPON_ID, (short) 0));
weaponEntryTracker.remove((Integer) weaponPosition);
switch(weaponPosition) {
case 1:
System.out.println("Position is 1");
setCurrentWeapon(getWeapons().get(0));
break;
case 2:
System.out.println("Position is 2");
if (getWeapons().get(1).getKey() != NO_WEAPON_ID) {
System.out.println("Weapon at 1");
setCurrentWeapon(getWeapons().get(1));
} else {
System.out.println("Weapon at 2");
setCurrentWeapon(getWeapons().get(0));
}
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Weapon removeWeapon(int position, int row, int col)\r\n\t{\r\n\t\tif(row < rows && row >= 0 && col < columns && col >= 0)\r\n\t\t\treturn cells[row][col].removeWeapon(position);\r\n\t\treturn null;\r\n\t}",
"public void removeWeapon(Weapon w) {\n try {\n this.validChoice(w);\n weaponSpawnpoint.removeWeapon(w);\n } catch (WrongValueException wvE) {\n wvE.wrong();\n }\n }",
"@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 }",
"public void removeItemInventory(Item item){\r\n playerItem.remove(item);\r\n System.out.println(item.getName() + \" was removed from your inventory\");\r\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 Weapon removeWeaponByIndex(int indexToDiscard) {\n\n Weapon toReturn = weaponList.get(indexToDiscard);\n\n weaponList.remove(toReturn);\n\n return toReturn;\n\n }",
"public void removeItemInventory(Item item){\n playerItem.remove(item);\n System.out.println(item.getName() + \" was removed from your inventory\");\n }",
"public void removeItemAt(int theIndex) {\n\t\tList<Item> keys = new ArrayList<Item>(inventory.keySet());\t\n\t\tItem item = keys.get(theIndex);\n\t\tinventory.remove(item);\t\t\n\t}",
"public void removePlayerItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = getPerson(PLAYER).getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's item arraylist.\n if(item.getName().equals(seekItem.getName())){\n\n it.remove(); // removes the item.\n }\n }\n }",
"public Die removeDie(int position) {\n return this.bag.remove(position);\n }",
"public void removeItem(Item theItem) {\n\t\tinventory.remove(theItem);\t\n\t}",
"public Weapon removeWeaponByName(String weaponName) {\n\n for (Weapon w : weaponList) {\n if (w.getWeaponName().equals(weaponName)) {\n weaponList.remove(w);\n return w;\n }\n }\n\n throw new RuntimeException(\"This weapon is not present in the weaponList\");\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 void removeByequip_id(long equip_id);",
"public void removeRoomItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = currentRoom.getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's item arraylist.\n if(item.getName().equals(seekItem.getName())){\n\n it.remove(); // removes the item.\n }\n }\n }",
"@Override\n\tpublic Weapon sell(int itemNumber) {\n\t\t\n\t\t\n\t\treturn inventory.removeItem(itemNumber);\n\t}",
"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 }",
"public void removeItem(int itemToRemove){\n\t\tinventoryItems[itemToRemove] = null;\n\t}",
"public static void removeItem(String itemName)\n {\n inventory.remove(getItem(itemName));\n }",
"public void removeItem(Item item)\n\t{\n\t\tinventory.remove(item);\n\t}",
"void removeProduct(int position) throws ProductNotFoundException;",
"private void removeEquippedItemByCoordinates(int nodeX, int nodeY) {\n world.removeEquippedInventoryItemByCoordinates(nodeX, nodeY);\n }",
"public void removeProduct(Product item) {\n inventory.remove(item);\n }",
"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 }",
"ItemStack removePage(EntityPlayer player, ItemStack itemstack, int index);",
"public abstract BossBar removePlayer(UUID uuid);",
"public void unequip(Hero h) {\n\t\t// TODO Auto-generated method stub\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.equipped && w.getName().equals(this.getName())) {\n\t\t\t\tsetEquipped(false);\n\t\t\t\tstatsDecrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private void unequip(Equip e)\r\n { \r\n if (e.getType()==Equip.WEAPON)\r\n {\r\n attack -= e.getRating();\r\n items.add(e);\r\n }\r\n else if (e.getType() == Equip.ARMOR)\r\n {\r\n items.add(e);\r\n defense -= e.getRating();\r\n }\r\n }",
"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 void playerDropItem(Player p, Item i) {\n\t\tTile tileInFront = p.getLocation().getTileInDirection(p.getPosition(), p.getFacing());\n\t\tif (tileInFront.getGameObject() == null) {\n\t\t\ttileInFront.setGameObject(i);\n\t\t\tp.getInventory().remove(i);\n\t\t}\n\n\t}",
"public void removePlayerItem(Player player, ItemStack item, int amountToRemove){\n\t\tint amountLeft = amountToRemove;\n\t\tdebugOut(\"Searching for \"+amountLeft+\" items\");\n\t\tItemStack[] inventory = player.getInventory().getContents();\n\t\tint invSlot = 1;\n\t\tfor(ItemStack currentItem:inventory){\n\t\t\tif(amountLeft > 0){\n\t\t\t\tdebugOut(\"Inventory slot: \"+invSlot);\n\t\t\t\tdebugOut(\"Amount remaining:\"+amountLeft);\n\t\t\t\tinvSlot++;\n\t\t\t\tif(areEqualItems(currentItem, item)){\n\t\t\t\t\tdebugOut(\"Items match -- getting stack size\");\n\t\t\t\t\tdebugOut(\"Stack size:\"+currentItem.getAmount());\n\t\t\t\t\tint stackSize = currentItem.getAmount();\n\t\t\t\t\tif(stackSize > amountLeft){\n\t\t\t\t\t\tdebugOut(\"There are more items in this stack than needed\");\n\t\t\t\t\t\tcurrentItem.setAmount(stackSize-amountLeft);\n\t\t\t\t\t\tamountLeft = 0;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdebugOut(\"This stack does not have enough to deposit the item -- deducting amount\");\n\t\t\t\t\t\tplayer.getInventory().removeItem(currentItem);\n\t\t\t\t\t\tdebugOut(\"removingItemAmount: \"+currentItem.getAmount() );\n\t\t\t\t\t\tamountLeft -= currentItem.getAmount();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tdebugOut(\"Not the same item\");\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tdebugOut(\"Amount left is 0; breaking loop\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@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 }",
"public void selectWeaponFromInventory(int weaponIndex) {\n }",
"public boolean deletePlayerItem(PlayerItem playerItem);",
"private void removeItemByCoordinates(int nodeX, int nodeY) {\n world.removeUnequippedInventoryItemByCoordinates(nodeX, nodeY);\n }",
"void removeMenuItem(int itemId, String itemName);",
"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 abstract boolean canRemoveItem(Player player, Item item, int slot);",
"public void removeItem(Item item) {\r\n for (Iterator<Item> it = inventoryItems.iterator(); it.hasNext(); ) {\r\n Item i = it.next();\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() - 1);\r\n }\r\n if (i.getCount() <= 0) {\r\n it.remove();\r\n }\r\n }\r\n }",
"public void drop(String itemName, World world) {\n\t\tItem item = world.dbItems().get(itemName);\n\n\t\tList<Item> items = super.getItems();\n\t\tRoom room = super.getRoom();\n\t\tList<Item> roomItems = room.getItems();\n\n\t\tif (items.contains(item)) {\n\t\t\troom.addItem(item);\n\t\t\tsuper.removeItem(item);\n\t\t\tSystem.out.println(\"Dropped \" + item + \" on the floor.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No \" + item + \" in inventory.\");\n\t\t}\n\t}",
"public Spell removeAt(int pos) {\n\t\tif (pos < 0)\n\t\t\tthrow new IndexOutOfBoundsException();\n\n\t\tif (pos == 0)\n\t\t\treturn spell;\n\t\telse if (spell instanceof SpellDecorator) {\n\t\t\tspell = ((SpellDecorator) spell).removeAt(pos - 1);\n\t\t\treturn this;\n\t\t} else {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t}",
"public void removeItem(String itemName, int Qty) {\n if (checkExist(itemName, Qty) == true) {\n int i;\n //System.out.println(checkExist(itemName));\n for (i = 0; i < inventory.size(); i++) {\n Map<String, Object> removedItem = new HashMap<>();\n removedItem = inventory.get(i);\n\n if (itemName.equals(removedItem.get(\"Name\").toString())) {\n int a = Integer.parseInt((String) removedItem.get(\"Amount\"));\n removedItem.put(\"Amount\", a - Qty);\n\n if (a - Qty < 1) {\n removedItem.put(\"Existence\", \"N\");\n }\n }\n }\n } else {\n System.out.println(\"Item \" + itemName + \" is not available.\");\n for (int i = 0; i < inventory.size(); i++) {\n Map<String, Object> removedItem = new HashMap<>();\n removedItem = inventory.get(i);\n\n if (itemName.equals(removedItem.get(\"Name\").toString())) {\n System.out.println(\"Since item \" + itemName + \"'s amout is not enough, try less amount.\");\n }\n }\n }\n outPutFile();\n }",
"private void removeAtIndex(int index) {\n // save the last item\n FoodItem toMoveBack = this._stock[this._noOfItems-1];\n // make it null\n this._stock[this._noOfItems-1] = null;\n // for each item until the index to remove from:\n for (int i = this._noOfItems-2; i > index-1; i--) {\n // save the last moved back temporarily\n FoodItem tempToMoveBack = toMoveBack;\n // assign to the next iteration item to move back\n toMoveBack = this._stock[i];\n // move back the item for current iteration\n this._stock[i] = tempToMoveBack;\n }\n // we removed an item - so let's decrease the item counter.\n this._noOfItems--;\n }",
"public static void removeItem(final Player p, final Material material, final int amount) {\n for (int i = 1; i <= amount; ++i) {\n final ItemStack ite = p.getInventory().getItem(p.getInventory().first(material));\n final ItemStack it = new ItemStack(ite.getType(), 1, ite.getDurability());\n it.setItemMeta(ite.getItemMeta());\n p.getInventory().removeItem(new ItemStack[]{it});\n }\n }",
"public void dropItems() {\n\t\tlocation.getChunk().load();\n\t\tArrays.stream(inventory.getContents())\n\t\t\t.filter(ItemStackUtils::isValid)\n\t\t\t.forEach((item) -> location.getWorld().dropItemNaturally(location, item));\n\t\tinventory.clear();\n\t}",
"private void removeItem(int item) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == item) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"없어진 상품:\"+products[i].toString());\r\n\t\t\t\tproducts[i] = null;\r\n\t\t\t\tindex--;\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 상품이 없습니다.\");\r\n\t}",
"public void removeAt(int pos)\n {\n for (int i = pos; i < length - 1; i++)\n {\n list[i] = list[i + 1];\n }\n length--;\n }",
"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 removeItem(Item iToRemove, int amount) {\n for (Item i : inventory) {\n if (iToRemove.getClass().equals(i.getClass())) {\n int tempQuantity = i.getQuantity() - amount;\n if (tempQuantity > 0) {\n i.setQuantity(tempQuantity);\n } else {\n inventory.remove(i);\n }\n }\n }\n }",
"public void unlockWeapons(int level) {\n\t\tif (level <= weaponLevel) {\n\t\t\treturn;\n\t\t}\n\t\tList<ItemType> items = new ArrayList<>();\n\t\t// Adding all the defined weapons in WeaponType enumerate class\n\t\tfor (WeaponType wep : WeaponType.values()) {\n\t\t\titems.add(wep);\n\t\t}\n\t\tupdateShop(items, level);\n\t\tweaponLevel = level;\n\t}",
"public void removeItem(int idx)\n\t{\n\t\titemList.remove(idx);\n\t\t\n\t}",
"private static String[] removeFromBag(String[] inventory, String item){\r\n for(int i=0; i<inventory.length; i++){\r\n if(inventory[i].equals(item)){\r\n inventory[i] = \"\";\r\n break;\r\n }\r\n }\r\n return inventory;\r\n }",
"private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }",
"public void removePlayer(int index) {\n trickPoints.remove(index);\n gamePoints.remove(index);\n lives.remove(index);\n }",
"public void remove(Equipment equipment) {\n equipments.remove(equipment);\n }",
"private static void removeItemFromCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t it.remove();\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item removed from the cart successfully\");\r\n\t\tSystem.out.println();\r\n\t}",
"protected void removeItem(Item item, boolean moving) {\n/* 2393 */ if (this.vitems != null)\n/* */ {\n/* 2395 */ if (!this.vitems.isEmpty()) {\n/* */ \n/* 2397 */ if (item.getTemplateId() == 726)\n/* 2398 */ Zones.removeDuelRing(item); \n/* 2399 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* 2400 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2402 */ this.vitems.removePileItem(item.getFloorLevel());\n/* 2403 */ if (this.vitems.isEmpty())\n/* */ {\n/* */ \n/* 2406 */ this.vitems.destroy(this);\n/* 2407 */ this.vitems = null;\n/* */ }\n/* */ \n/* 2410 */ } else if (this.vitems.removeItem(item)) {\n/* */ \n/* */ \n/* 2413 */ this.vitems.destroy(this);\n/* */ \n/* 2415 */ this.vitems = null;\n/* 2416 */ if (pileItem != null)\n/* */ {\n/* 2418 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* */ }\n/* 2421 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(pileItem.getFloorLevel())) {\n/* */ \n/* 2423 */ if (!moving) {\n/* 2424 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* 2426 */ } else if (!item.isDecoration() && pileItem != null) {\n/* */ \n/* 2428 */ checkIfRenamePileItem(pileItem);\n/* */ } \n/* 2430 */ if (item.isDomainItem())\n/* 2431 */ Zones.removeAltar(item, moving); \n/* 2432 */ if (item.getTemplateId() == 1175 || item.getTemplateId() == 1239)\n/* 2433 */ Zones.removeHive(item, moving); \n/* 2434 */ if (item.getTemplateId() == 939 || item.isEnchantedTurret())\n/* 2435 */ Zones.removeTurret(item, moving); \n/* 2436 */ if (item.isEpicTargetItem())\n/* 2437 */ EpicTargetItems.removeRitualTargetItem(item); \n/* 2438 */ if (item.isKingdomMarker())\n/* */ {\n/* 2440 */ if (item.getTemplateId() != 328)\n/* 2441 */ Kingdoms.destroyTower(item); \n/* */ }\n/* 2443 */ if (item.getTemplateId() == 521) {\n/* */ \n/* 2445 */ this.zone.creatureSpawn = null;\n/* 2446 */ Zone.spawnPoints--;\n/* */ } \n/* 2448 */ if (this.village != null && item.getTemplateId() == 757)\n/* */ {\n/* 2450 */ this.village.removeBarrel(item);\n/* */ }\n/* */ }\n/* */ else {\n/* */ \n/* 2455 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* */ \n/* 2457 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2459 */ this.vitems.removePileItem(item.getFloorLevel());\n/* */ }\n/* 2461 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(item.getFloorLevel())) {\n/* */ \n/* 2463 */ destroyPileItem(item.getFloorLevel());\n/* */ } \n/* */ } \n/* */ }\n/* 2467 */ if (item.isFence()) {\n/* */ \n/* 2469 */ int offz = 0;\n/* */ \n/* */ try {\n/* 2472 */ offz = (int)((item.getPosZ() - Zones.calculateHeight(item.getPosX(), item.getPosY(), item\n/* 2473 */ .isOnSurface())) / 10.0F);\n/* */ }\n/* 2475 */ catch (NoSuchZoneException nsz) {\n/* */ \n/* 2477 */ logger.log(Level.WARNING, \"Dropping fence item outside zones.\");\n/* */ } \n/* 2479 */ float rot = Creature.normalizeAngle(item.getRotation());\n/* 2480 */ if (rot >= 45.0F && rot < 135.0F) {\n/* */ \n/* 2482 */ VolaTile next = Zones.getOrCreateTile(this.tilex + 1, this.tiley, (item\n/* 2483 */ .isOnSurface() || this.isTransition));\n/* 2484 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex + 1, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, next\n/* 2485 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2487 */ else if (rot >= 135.0F && rot < 225.0F) {\n/* */ \n/* 2489 */ VolaTile next = Zones.getOrCreateTile(this.tilex, this.tiley + 1, (item\n/* 2490 */ .isOnSurface() || this.isTransition));\n/* 2491 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley + 1, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, next\n/* 2492 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2494 */ else if (rot >= 225.0F && rot < 315.0F) {\n/* */ \n/* 2496 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, \n/* 2497 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ }\n/* */ else {\n/* */ \n/* 2501 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, \n/* 2502 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ } \n/* */ } \n/* */ \n/* 2506 */ sendRemoveItem(item, moving);\n/* 2507 */ if (!moving) {\n/* 2508 */ item.setZoneId(-10, this.surfaced);\n/* */ }\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 WeaponCardClient remove(String weaponCard) {\n WeaponCardClient toRemove = null;\n for (WeaponCardClient weaponCardClient: weaponCards)\n if (weaponCard.equals(weaponCardClient.getWeaponName()))\n toRemove = weaponCardClient;\n toRemove.setSlotPosition(null, -1);\n weaponCards.remove(toRemove);\n return toRemove;\n }",
"public static void clearInventoryCrafting(Player player)\n\t{\n\t\tPlayerInventory inv = player.getInventory();\n\t\tfor(int i = 0; i < 4; i++)\n\t\t\tinv.setItem(1 + i, null);\n\t}",
"public void removePowerUp(PowerUp p) {\n for (Location loc : p.getLocations()) {\n Location replacement = new Location(loc.getX(), loc.getY());\n gridCache.add(replacement);\n }\n\n powerUps.remove(p);\n render();\n}",
"public void removePowerUpByIndex(int index) {\n powerUpList.remove(index);\n return;\n }",
"public void removeTomb(String player) {\r\n\t\ttombs.remove(player);\r\n\t}",
"public void remove(int index){\n if (myBasket.size() == 0)\n System.out.println(\"List is empty.\");\n int i = 0 ;\n boolean isFound = false;\n Product toRemove = null;\n for (Product product: myBasket.keySet())\n {\n i++;\n if (i == index && myBasket.get(product) > 0)\n {\n isFound = true;\n toRemove = product;\n break;\n\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index!\");\n\n // now , checking how many of this product is in the basket\n\n else if (myBasket.get(toRemove) > 1){\n System.out.println(\"How many of this product do you want to give back?\");\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n if (num < myBasket.get(toRemove)) {\n totalCost -= toRemove.getPrice() * num;\n myBasket.replace(toRemove,myBasket.get(toRemove) - num);\n for (int j = 0 ; j < num ; j++)\n inventory.updateStock(toRemove , '+');\n }\n else {\n totalCost -= toRemove.getPrice() * myBasket.get(toRemove);\n myBasket.remove(toRemove);\n for (int j = 0 ; j < myBasket.get(toRemove) ; j++)\n inventory.updateStock(toRemove,'+');\n }\n System.out.println(\"Product removed.\");\n }\n\n // there is just one of this product in basket\n\n else {\n totalCost -= toRemove.getPrice();\n myBasket.remove(toRemove);\n System.out.println(\"Product removed.\");\n inventory.updateStock(toRemove , '+');\n }\n }",
"public void removePokemon(int pokemonToRemove)\n {\n caughtPokemon.remove(pokemonToRemove);\n }",
"public void deleteItemFromInventory(Item item) {\n\t\tinventory.deleteItem(item);\n\t}",
"public void dropItem(Location loc){\n\t\t\n\t\tPlayer p = getThrower();\n\t\tItemStack droppedItem;\n\t\t\n\t\tdroppable.clear();\n\t\t\n\t\taddItem(Material.IRON_INGOT, 8, 8, 3); //Item, weight, maximum stack size, minimum stack size\n\t\taddItem(Material.GOLD_INGOT, 5, 5, 1);\n\t\taddItem(Material.DIAMOND, 3, 3, 1);\n\t\taddItem(Material.GOLDEN_APPLE, 1, 1, 1);\n\t\taddItem(Material.ROTTEN_FLESH, 10, 5, 1);\n\t\taddItem(Material.BREAD, 15, 32, 15);\n\t\taddItem(Material.BONE, 10, 5, 1);\n\t\taddItem(Material.SULPHUR, 10, 5, 1);\n\t\taddItem(Material.SADDLE, 1, 1, 1);\n\t\t\n\t\tint Size = droppable.size();\n\t\trandNum = ThreadLocalRandom.current().nextInt(Size);\n\t\t\n\t\tdroppedItem = droppable.get(randNum);\n\t\t\n\t\tp.getWorld().dropItem(loc, droppedItem);\n\t\tp.getWorld().dropItem(loc, new ItemStack(Material.GOLD_NUGGET, rand.nextInt(10) + 1));\n\t\t\n\t}",
"void removeRobot(Position pos);",
"public void drop(){\r\n if(activeFish.isEmpty()) return;\r\n \r\n ArrayList<Fish> toremove = new ArrayList<Fish>();\r\n for(Fish bone : activeFish){\r\n bone.drop();\r\n\r\n if(!(bone.inBounds())){ // branch for out of bound fh\r\n toremove.add(bone);\r\n }\r\n }\r\n missedFish(toremove);\r\n\r\n update();\r\n }",
"protected abstract void removeItem();",
"public void removeGroceryItem(String item){\n int position = findItem(item);\n if(position > 0)\n myGrocery.remove(position);\n }",
"public void removeItem(int r, int c, boolean damage)\r\n\t{\n\t\tif (map[r][c].currentItems()!=0)\r\n\t\t{\r\n\t\t\tif (damage)\r\n\t\t\t{\r\n\t\t\t\tstolen++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tbought++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//change number of items available. doesn't decrease if number of items is 0.\r\n\t\tmap[r][c].removeItem();\r\n\t}",
"public Weapon useWeapon() {\n\t\tWeapon weapon = weaponList.get(weaponList.size() - 1);\n\t\tif(weaponList.size() > 1){\n\t\t\tweaponList.remove(weaponList.size() - 1);\n\t\t}\n\t\telse {\n\t\t}\n\t\treturn weapon;\n\t}",
"public static void removeEnchantments(ItemStack item) {\n if(item != null) {\n for(Enchantment en : item.getEnchantments().keySet()) {\n item.removeEnchantment(en);\n }\n }\n }",
"private void removeEnchantRecipe() {\n Iterator<Recipe> it = Bukkit.recipeIterator();\n\n while (it.hasNext()) {\n Recipe res = it.next();\n\n if (res.getResult().getType() == ENCHANT_TABLE.getType()) {\n it.remove();\n }\n }\n }",
"public void removeSword() {\n \tthis.sword =null;\n \tthis.UIsword().set(false);\n \tdungeon.swordLeft().set(\"Sword Hits Left: 0\\n\");\n }",
"public final void consume(Player player, Collection<ItemStack> items)\n\t{\n\t\tInventoryHelper.remove(player, items);\n\t}",
"public ItemStack remove(int debug1) {\n/* 104 */ return this.container.removeItem(this.slot, debug1);\n/* */ }",
"private void destroyBlockAndDropItem(final Location at) {\n if (at == null) {\n return;\n }\n\n final Block b = at.getBlock();\n\n if (!MaterialManager.getInstance().contains(b.getType().name())) {\n return;\n }\n\n double chance = MaterialManager.getInstance().getChanceToDropBlock(b.getType().name());\n\n if (chance > 1.0)\n chance = 1.0;\n if (chance < 0.0)\n chance = 0.0;\n\n final double random = Math.random();\n\n if (chance == 1.0 || chance <= random) {\n ItemStack is = new ItemStack(b.getType(), 1);\n\n if (is.getType() == Material.AIR) {\n return;\n }\n\n // drop item\n at.getWorld().dropItemNaturally(at, is);\n }\n\n // changes original block to Air block\n b.setType(Material.AIR);\n }",
"public void removePlayer(Player player) {\r\n players.remove(player);\r\n player.damage(Double.MAX_VALUE);\r\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 }",
"public void removePlayer(Player player){\n for(int x = 0; x < players.size(); x++){\n if(players.get(x) == player){\n players.remove(x);\n }\n }\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}",
"@Override\n public void dropBlockAsItemWithChance(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state, float chance, int fortune)\n {\n }",
"@Override\r\n\tpublic void onUnequipped(ItemStack stack, EntityLivingBase living)\r\n\t{\n\t}",
"public void removeItem(Carryable g) {\r\n for (int i=0; i<numItems; i++) {\r\n if (cart[i] == g) {\r\n cart[i] = cart[numItems - 1];\r\n numItems -= 1;\r\n return;\r\n }\r\n }\r\n }",
"public void useKey() {\n Key key = this.getInventory().getFirstKey();\n if (key != null){\n this.getInventory().removeItems(key);\n }\n }",
"private void removeProducto(int position) {\n losproductos.remove(position);\n // Notificamos de un item borrado en nuestro array\n eladaptador.notifyItemRemoved(position);\n }",
"@Override\n\tpublic ItemStack removeStackFromSlot(int index) {\n\t\treturn null;\n\t}",
"public void removeTile(Tile a_tile){\n for(int i = 0; i < playerHand.size(); i++){\n if(playerHand.get(i).getRight() == a_tile.getRight() && playerHand.get(i).getLeft() == a_tile.getLeft()){\n playerHand.remove(i);\n break;\n }\n }\n }",
"public void removeItem(int n)\n {\n items.remove(n);\n }",
"@Override\r\n\tpublic void sellItem(AbstractItemAPI item) {\n\t\titems.remove(item);\r\n\t\t\r\n\t}",
"public void hapusItem(Item objItem) {\n arrItem.remove(objItem); //buang item\n }",
"public Item dropItem(String itemName) {\n Item item = items.remove(itemName);\n if(item != null) {\n currentRoom.addItem(item);\n }\n return item;\n }",
"public void removeIngredient(String type) {\n\t\tMyStack newBurger = new MyStack();\n\t\twhile (myBurger.size() != 0) {\n\t\t\tif (myBurger.peek().equals(type)) {\n\t\t\t\tmyBurger.pop();\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\tnewBurger.push(ingredient);\n\t\t\t}\n\t\t}\n\t\twhile (newBurger.size() != 0) {\n\t\t\tString ingredient = (String) newBurger.pop();\n\t\t\tmyBurger.push(ingredient);\n\t\t}\n\t\tif (type.equals(\"Beef\") || type.equals(\"Chicken\") || type.equals(\"Veggie\")) {\n\t\t\tpattyCount--;\n\t\t}\n\t}",
"public static boolean[] drop(String enemy, int enemyHealth, int enemyDamage, int playerHealth, int playerDamage, int elixirCount, int elixirHealth, int wins, boolean[] items, int itemCount, int level) {\r\n //Level 2\r\n if (level == 2) {\r\n if (itemCount < 4) {\r\n items[wins-1] = true;\r\n }\r\n }\r\n //Level 3\r\n if (level == 3) {\r\n boolean chance = chance();\r\n if ((chance) && (itemCount < 4)) {\r\n items[wins-1] = true;\r\n }\r\n }\r\n return items;\r\n }",
"@Override\r\n\tpublic GlobalResult deleteEquip(String mspno) {\n\t\treturn null;\r\n\t}",
"public void remove(int index) {\n items.remove(index);\n }",
"public void removeFruit(int i) {\n\t\tfruits.remove(i);\n\t}",
"public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) {}"
] | [
"0.69935524",
"0.67478645",
"0.66559243",
"0.66171104",
"0.65868545",
"0.65731734",
"0.6569775",
"0.65337783",
"0.6524572",
"0.6481212",
"0.6416219",
"0.6347981",
"0.63363075",
"0.6289892",
"0.62489146",
"0.6228824",
"0.6216696",
"0.61584413",
"0.6152073",
"0.61295474",
"0.61278176",
"0.6123366",
"0.61151326",
"0.60478985",
"0.59874564",
"0.5981125",
"0.5979831",
"0.596011",
"0.59370947",
"0.59270877",
"0.5903654",
"0.588959",
"0.5853106",
"0.58243227",
"0.5816883",
"0.5815231",
"0.5813987",
"0.5807795",
"0.57797134",
"0.5764974",
"0.57600826",
"0.5752222",
"0.5744788",
"0.5742217",
"0.5727651",
"0.57232493",
"0.57158434",
"0.57029253",
"0.56927764",
"0.5683173",
"0.5681454",
"0.56769425",
"0.56766284",
"0.56693596",
"0.5667553",
"0.5664866",
"0.56547266",
"0.56418943",
"0.5640285",
"0.56323516",
"0.56253105",
"0.56154907",
"0.5612898",
"0.56115645",
"0.5604655",
"0.55879754",
"0.5587938",
"0.5579352",
"0.55762297",
"0.55745685",
"0.5569667",
"0.55623925",
"0.5560706",
"0.5560546",
"0.5558174",
"0.55524963",
"0.55502284",
"0.5544306",
"0.55347705",
"0.55319244",
"0.55258656",
"0.5523377",
"0.5518933",
"0.55124277",
"0.55086946",
"0.5496801",
"0.54916906",
"0.5491477",
"0.54884493",
"0.5486144",
"0.54682785",
"0.5467803",
"0.5466288",
"0.54659504",
"0.5460726",
"0.54593056",
"0.54519546",
"0.5447406",
"0.54462945",
"0.5446145"
] | 0.7606236 | 0 |
Returns the health value of the player | public byte getHp(){
return hp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getHealth() {\n return getStat(health);\n }",
"Float getHealth();",
"public static int getHealth()\r\n\t{\r\n\t\treturn health;\r\n\t}",
"public float getHealth(){\n return health.getHealth();\n }",
"public int getHealth() {\n return this.health;\n }",
"public int getHealth()\r\n {\r\n return health;\r\n }",
"public double getHealth() {\r\n\t\treturn health;\r\n\t}",
"public double getHealth() {\n return classData.getHealth(level);\n }",
"public double getPlayerFullHP();",
"public int getHealth() {\r\n\t\treturn health;\r\n\t}",
"public int getHealth()\r\n {\r\n return this.health;\r\n }",
"int getHealth() {\n return health;\n }",
"public int getHealth() {\n \t\treturn health;\n \t}",
"int getHealth();",
"public float getHealth()\n {\n return health;\n }",
"public int getHealth() {\n\t\treturn health;\n\t}",
"public int getHealth() {\n\t\treturn health;\n\t}",
"public int getHealth() {\n\t\treturn this.Health;\n\t}",
"public Integer getHealth();",
"public int getHealth();",
"public int getCurrentHealth() {\r\n return currentHealth;\r\n }",
"float getPercentHealth();",
"public float getHealth() {\n\t\treturn _health;\n\t}",
"public int getCurrentHealth() {\n return currentHealth;\n }",
"@Override\r\n\tpublic int getHealth() {\n\t\treturn health;\r\n\t}",
"public int getHealth() {\n\t\treturn currentHealth;\n\t}",
"public int getHealth() { return this.health; }",
"public int getHealth(){\n return health;\n }",
"public double getHealth(){\r\n return health;\r\n }",
"int getHPValue();",
"public double getHealth() { return health; }",
"public int getCurHealth() {\n return this.curHealth;\n }",
"public double getCurrentHealth() {\n return ((Growable)delegate).currentHealth;\n }",
"@Override\r\n\tprotected double getHealth() \r\n\t{\r\n\t\treturn this._health;\r\n\t}",
"public int getCurHealth() {\n\t\treturn curHealth;\n\t}",
"public int getCurHealth()\n\t{\n\t\treturn this.curHealth;\n\t}",
"public int getBaseHealth()\r\n {\r\n return mBaseHealth;\r\n }",
"public int getMaxHealth();",
"public int getHP()\n\t{\n\t\tUnit u = this;\n\t\tint hp = 0;\n\t\tfor(Command c : u.race.unitcommands)\n\t\t\tif(c.command.equals(\"#hp\"))\n\t\t\t\thp += Integer.parseInt(c.args.get(0));\n\t\t\n\t\tfor(Command c : u.getSlot(\"basesprite\").commands)\n\t\t\tif(c.command.equals(\"#hp\"))\n\t\t\t{\n\t\t\t\tString arg = c.args.get(0);\n\t\t\t\tif(c.args.get(0).startsWith(\"+\"))\n\t\t\t\t\targ = arg.substring(1);\n\t\t\t\t\n\t\t\t\thp += Integer.parseInt(arg);\n\t\t\t}\n\t\t\n\t\tif(hp > 0)\n\t\t\treturn hp;\n\t\telse\n\t\t\treturn 10;\n\t}",
"int getCurrentHP();",
"public int getHPValue() {\n return hPValue_;\n }",
"protected float getHealthPoint() {\n\t\treturn healthPoint;\n\t}",
"public int getHPValue() {\n return hPValue_;\n }",
"public double getMaxHealth() {\n return maxHealth;\n }",
"public float getAddHealth()\n {\n return addHealth;\n }",
"public int getHealthGain();",
"public float getMaxHealth()\n {\n return maxHealth;\n }",
"public double getHealthRelative() {\n\t\treturn getHealth() / (double) getMaxHealth();\n\t}",
"String getHealthString() {\n return Integer.toString(health);\n }",
"public int getHp() {\n return hp;\n }",
"public int getHumanPlayerHits() {\n return humanPlayerHits;\n }",
"public int getMaxHealth() {\n return maxHealth;\n }",
"public int getHp() {\r\n return hp;\r\n }",
"@Override\n\tpublic double getHealth() {\n\t\treturn 0;\n\t}",
"public int getHp() {\n return hp;\n }",
"public int getMaxHealth() {\r\n return maxHealth;\r\n }",
"public int getMaxHealth() {\n return this.maxHealth;\n }",
"public int getHP() {\r\n return currHP;\r\n }",
"public double getHp() {\n return hp;\n }",
"public int getHealthCount() {\n return healthCount;\n }",
"public int getHP() {\n\t\treturn HP;\n\t}",
"public int getCurrentHP() {\n return currentHP;\n }",
"public int getMaxHealth()\r\n\t{\r\n\t\treturn MaxHealth;\r\n\t}",
"float getBonusPercentHP();",
"@Override\n public double getValue() {\n return healthPackAmount;\n }",
"public int getHp(){\r\n return hp;\r\n }",
"public int getHp() \n\t{\n\t\treturn hp;\n\t}",
"public Integer getHealthPoints() {\n return healthPoints;\n }",
"public int getHealthCost();",
"public static double valueForBuff(int attack, int magic, int health) {\n return attack * 0.5 + health * 0.5 + magic * 0.3;\n }",
"public Health getHealthObj() {\n return health;\n }",
"public int getHP()\n\t{\n\t\treturn iHP;\n\t\t\n\t}",
"public static int getPlayerScore()\r\n\t{\r\n\t\treturn playerScore;\r\n\t}",
"public boolean health(){\n return health;\n }",
"@Override\n public PlayerStatistics getPlayerStats() {\n return this.playerStats;\n }",
"public String getHealthinfo() {\n return healthinfo;\n }",
"public int getHp() {\n\t\treturn this.hp;\n\t}",
"public int getShipHealth()\r\n\t{\r\n\t\treturn ShipHealth;\r\n\t}",
"public int getValue(final Player player) {\r\n\t\treturn board.getValue(player);\r\n\t}",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"public int getMaxHealth() {\n \t\treturn (int)(maxHealthModifier + (stamina/2 + strength/4)*Math.PI);\n \t}",
"public String getPokemonHP() {\n\t\treturn pokemon.getCurHP() + \"/\" + pokemon.getMaxHP();\n\t}",
"@Override\r\n public int getSpecialValue() {\n int num = this.getCombatLevel();\r\n num += this.levelChangeAgainstCultistPlayer;\r\n \r\n return num;\r\n }",
"int getBonusHP();",
"public double calculateHpPercent();",
"public int getPlayerScore();",
"public int getPlayerScore(){\n\t\treturn playerScore;\n\t}",
"public int getMaxHealth() {\n\t\treturn maxHealth;\n\t}",
"public int getMaxHealth() {\n\t\treturn maxHealth;\n\t}",
"public float getBonusPercentHP() {\n return bonusPercentHP_;\n }",
"int getMaxHP();",
"int getMaxHP();",
"int getMaxHP();",
"int getMaxHP();",
"int getMaxHP();",
"int getMaxHP();"
] | [
"0.7847566",
"0.7772136",
"0.77366406",
"0.7668886",
"0.75850827",
"0.7572119",
"0.75577027",
"0.7549857",
"0.7528112",
"0.7523155",
"0.7522444",
"0.7491254",
"0.7489919",
"0.7478377",
"0.7474593",
"0.74410766",
"0.74410766",
"0.74264735",
"0.7415858",
"0.739176",
"0.73738146",
"0.7370498",
"0.73699737",
"0.7350227",
"0.73488265",
"0.7307584",
"0.72953403",
"0.722931",
"0.7222366",
"0.71235925",
"0.7071177",
"0.70396066",
"0.69852793",
"0.6973304",
"0.68857664",
"0.6864255",
"0.68450224",
"0.6825067",
"0.6809293",
"0.6806455",
"0.6775585",
"0.67603785",
"0.6757827",
"0.6719001",
"0.67142093",
"0.6712159",
"0.669147",
"0.6687916",
"0.66819686",
"0.66763484",
"0.66566205",
"0.6634938",
"0.66296375",
"0.6629522",
"0.662851",
"0.6619682",
"0.65900606",
"0.656299",
"0.6550978",
"0.65491635",
"0.6531891",
"0.65315485",
"0.65250564",
"0.6519451",
"0.65172726",
"0.65028197",
"0.6482248",
"0.64753366",
"0.64630574",
"0.64625174",
"0.6453903",
"0.64336526",
"0.64234537",
"0.640966",
"0.640383",
"0.6401803",
"0.63962483",
"0.6387875",
"0.63612616",
"0.6357634",
"0.6357634",
"0.6357634",
"0.6357634",
"0.6357634",
"0.6357634",
"0.6336228",
"0.6318427",
"0.6299412",
"0.6264349",
"0.62625456",
"0.62608564",
"0.62584007",
"0.6253991",
"0.6253991",
"0.62457746",
"0.62359047",
"0.62359047",
"0.62359047",
"0.62359047",
"0.62359047",
"0.62359047"
] | 0.0 | -1 |
Returns the id of the player | public byte getId(){
return id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getPlayerId();",
"int getPlayerId();",
"int getPlayerId();",
"long getPlayerId();",
"public int getPlayerId();",
"public int getId() {\n return playerId;\n }",
"public String getId() {\n\t\treturn this.playerid;\n\t}",
"public int getIdPlayer() {\n\t\treturn idPlayer;\n\t}",
"public long getPlayerId() {\n return playerId_;\n }",
"public long getPlayerId() {\n return playerId_;\n }",
"public String getPlayerId() {\n\t\treturn playerId;\n\t}",
"public int getPlayerId() {\r\n\t\treturn playerId;\r\n\t}",
"public java.lang.String getPlayerId() {\n java.lang.Object ref = playerId_;\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 playerId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Integer getPlayerId() {\n return PlayerId;\n }",
"public int getPlayerID() {\r\n\t\treturn playerID;\r\n\t}",
"public int getPlayerID() {\r\n\t\treturn playerID;\r\n\t}",
"public int getPlayerID(){\n\t\treturn 0;\n\t\t/*\n\t\ttry{\n\t\t\tint player_id=-1;\t\t\t//save player_id, start with -1 as unknown\n\t\t\tString request = \"{\\\"jsonrpc\\\": \\\"2.0\\\", \\\"method\\\": \\\"Player.GetActivePlayers\\\", \\\"id\\\": 1}\";\n\t\t\tString url = kodiURL + URLEncoder.encode(request, \"UTF-8\");\n\t\t\t//send request\n\t\t\tJSONObject result = Connectors.httpGET_JSON(url.trim());\n\t\t\tSystem.out.println(\"result: \" + result);\t\t//debug\n\t\t\t//connection error\n\t\t\tif (result.toJSONString().trim().matches(\".*<connection error>.*\")){\n\t\t\t\treturn -2;\n\t\t\t}\n\t\t\tplayer_id = Integer.parseInt(result.get(\"id\").toString());\n\t\t\treturn player_id;\t\t//return ID if found\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn -1;\n\t\t}\n\t\t*/\n\t}",
"public int getPlayerID() {\n\t\treturn playerID;\n\t}",
"@java.lang.Override\n public java.lang.String getPlayerId() {\n java.lang.Object ref = playerId_;\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 playerId_ = s;\n return s;\n }\n }",
"public int getPlayerID() {\r\n return playerID;\r\n }",
"public String getPlayerID() {\n return playerID;\n }",
"public int getPlayerID() {\n return playerID;\n }",
"public byte getPlayerId() {\n return playerId;\n }",
"public PlayerID getID()\r\n\t{\r\n\t\treturn ID;\r\n\t}",
"UUID getActivePlayerId();",
"com.google.protobuf.ByteString\n getPlayerIdBytes();",
"public com.google.protobuf.ByteString\n getPlayerIdBytes() {\n java.lang.Object ref = playerId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n playerId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getPlayerIdBytes() {\n java.lang.Object ref = playerId_;\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 playerId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}",
"public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}",
"public int getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }",
"public short getPlayerID() {\n\n return m_playerID;\n }",
"String getGameId();",
"public int getCurrentPlayer() {\n return player;\n }",
"Player getPlayer(UUID playerId);",
"public int getPlayer()\n {\n return this.player;\n }",
"public int getPlayerNumber() {\n\t\tint playerNumber=super.getPlayerNumber();\n\t\treturn playerNumber;\n\t}",
"public int getPlayerNumber() {\n\t\tif(this.player == null) return 0;\n\t\telse return this.player.number;\n\t}",
"public UUID getPlayerUuid() { return uuid; }",
"public int getPickedPlayerID()\n {\n return picked;\n }",
"public int getCurrentPlayer() {\n\t\treturn player;\n\t}",
"static String get_playerID(String username)\n {\n return request(\"GET\", \"\", \"get_playerID/\" + username);\n }",
"public int getIdentityFromSummonerID(Match match)\n {\n int playerNum=-1;\n\n for(int i = 0; i<10; i++)\n {\n if(match.getParticipants().get(i).getSummonerID() == playerID)\n playerNum = match.getParticipants().get(i).getParticipantID();\n\n }\n\n return playerNum;\n }",
"public String getPlayer(int id) {\n if(id == -1 || mdb == null) {\n return null;\n }\n \n Set<String> strings = mdb.getKeys(false);\n for (String key : strings) {\n List<Integer> messageids = mdb.getIntegerList(key + \".messageids\");\n if (messageids != null && messageids.contains(id)) {\n return key;\n }\n }\n return null;\n }",
"public Integer getIDByPlayer(Player player){\n // This is operating under the assumption that\n // a player is only in one game.\n\n synchronized (games) {\n for (Integer id: games.keySet()){\n CheckersGame game = games.get(id);\n if (game.hasPlayer(player) && !game.isGameOver()) {\n return id;\n }\n }\n return null;\n }\n }",
"public int getPlayerNumber() {\n return this.playerNumber;\n }",
"public void setPlayerId(String s) {\n\t\tplayerId = s;\n\t}",
"public int getPlayerNumber() {\n return playerNumber;\n }",
"public int getCurrentPlayer(){\n return this.currentPlayer;\n }",
"public String getPlayer() {\r\n return player;\r\n }",
"public int getPlayerNumber() {\n\t\treturn playerNumber;\n\t}",
"public int getPlayerNumber() {\n\t\treturn playerNumber;\n\t}",
"public Integer getPlayId() {\n return playId;\n }",
"public int getMyPlayerNumber() {\n if (gameStatus == null || userId == null) return -1;\n if (userId.equals(gameStatus.getPlayerOne())) return 1;\n if (userId.equals(gameStatus.getPlayerTwo())) return 2;\n return -2;\n }",
"Player getCurrentPlayer();",
"Player getCurrentPlayer();",
"@java.lang.Override\n public java.lang.String getPlayerExternalUaId() {\n java.lang.Object ref = playerExternalUaId_;\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 playerExternalUaId_ = s;\n return s;\n }\n }",
"@Override\n public int getPlayerHashID() {\n return this.hashID;\n }",
"private int readId(String playerName) {\n int id = -1;\n\n try {\n PreparedStatement statement = connection.prepareStatement(\"SELECT id FROM \" + tablePrefix + \"users WHERE user = ?\");\n statement.setString(1, playerName);\n id = readInt(statement);\n }\n catch (SQLException ex) {\n printErrors(ex);\n }\n\n return id;\n }",
"public int getIdentityFromSummonerName(Match match)\n {\n int playerNum=-1;\n\n for(int i = 0; i<10; i++)\n {\n if(match.getParticipants().get(i).getSummonerName().equals(summonerName))\n playerNum=match.getParticipants().get(i).getParticipantID();\n\n }\n\n return playerNum;\n }",
"boolean hasPlayerId();",
"public String generatePlayerID() {\n List<Player> players = getAllOrdered();\n int idNum;\n \n if (players == null || players.isEmpty())\n idNum = 0;\n else {\n String idStr = players.get(players.size() - 1).getPlayerID();\n idNum = Integer.parseInt(idStr.substring(2, idStr.length()));\n }\n \n String playerID;\n int newIdNum = idNum + 1;\n if (newIdNum <= 9)\n playerID = \"P_000\" + newIdNum;\n else if (newIdNum <= 99) \n playerID = \"P_00\" + newIdNum;\n else if (newIdNum <= 999)\n playerID = \"P_0\" + newIdNum;\n else \n playerID = \"P_\" + newIdNum;\n \n return playerID;\n }",
"String getPlayer();",
"public JTextField getPlayerID() {\n return PlayerID;\n }",
"java.lang.String getLobbyId();",
"public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}",
"public java.lang.String getPlayerExternalUaId() {\n java.lang.Object ref = playerExternalUaId_;\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 playerExternalUaId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getActivePlayer() {\n return activePlayer;\n }",
"public static Object getIdentificationFor(String playerName) {\n try {\n return UUIDFetcher.getUUIDOf(playerName);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return playerName;\n }",
"public void setPlayerId(Integer playerId) {\n this.PlayerId = playerId;\n }",
"@Override\n public Player getPlayerById(long id) {\n Player player=entityManager.find(Player.class,id);\n return player;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getPlayerExternalUaIdBytes() {\n java.lang.Object ref = playerExternalUaId_;\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 playerExternalUaId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String toString() {\n\t\treturn \"player \" + player.id + \"\\n\";\n\t}",
"public int getPlayerPosition(int player)\n {\n return players[player];\n }",
"public int activePlayer() {\n return this.activePlayer;\n }",
"public static Object getIdentificationFor(OfflinePlayer player) {\n return getIdentificationFor(player, true);\n }",
"public final int getPlayerIndex() {\r\n return this.playerIndex;\r\n }",
"public Player getPlayer(UUID id) {\r\n for (Player player : players) {\r\n if (player.getId().equals(id)) {\r\n return player;\r\n }\r\n }\r\n return null;\r\n }",
"Player getSelectedPlayer();",
"java.lang.String getSpawnpointId();",
"public String getGameId() {\n return gameId;\n }",
"public String getGameId() {\n return gameId;\n }",
"public String getPlayer() {\n return p;\n }",
"public PlayerParticipant getPlayer(int playerId) {\n try {\n String query = \"SELECT * from playerparticpant WHERE Id = \" + playerId;\n ResultSet resultSet = dbhelper.ExecuteSqlQuery(query);\n if (resultSet.next()) {\n PlayerParticipant playerParticipant = new PlayerParticipant();\n playerParticipant.matchHistoryUri = resultSet.getString(\"MatchHistoryUri\");\n playerParticipant.profileIcon = resultSet.getInt(\"ProfileIconId\");\n playerParticipant.summonerId = resultSet.getLong(\"SummonerId\");\n playerParticipant.summonerName = resultSet.getString(\"SummonerName\");\n \n return playerParticipant;\n }\n } catch (SQLException | IllegalStateException ex) {\n System.out.println(\"An error occurred: \" + ex.getMessage());\n }\n \n return null;\n }",
"public int getCurrentPlayerIndex(){\r\n return currentPlayerIndex;\r\n }",
"void setPlayerId(int playerId);",
"Player getPlayer();",
"ParticipantId getId();",
"private void receiveId() throws Exception {\n\t\tint id = in.readInt();\n\t\t//intByteBuffer.clear();\n\t\t\n\t //if(numOfBytes < 0)\n\t // throw new Exception(\"Connection to server lost\");\n\t \n\t //if(numOfBytes < 4) {\n\t // System.err.println(\"Received only \" + numOfBytes + \" bytes in receiveId\");\n\t // return;\n\t //}\n\t \n\t GameActivity.getInstance().model().player().setId(id);\n\t \n\t System.out.println(\"id: \" + GameActivity.getInstance().model().player().id());\n\t}",
"public Player getPlayer() {\n\t\treturn this.player;\r\n\t}",
"java.lang.String getFriendId();",
"java.lang.String getFriendId();",
"public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}",
"public Player getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public int getIdForName(String name)\n\t{\n\t\tint id = 0;\n\t\ttry\n\t\t{\n\t\t\tif (database==null)\n\t\t\t\tdatabase = this.getWritableDatabase();\n\t\t\t\n\t\t\tCursor c = database.rawQuery(\"SELECT * FROM \"+PLAYERS_TABLE_NAME+\" WHERE \"+PLAYER_NAME+\" = \\\"\"+name+\"\\\";\", null);\n\n\t\t\tc.moveToFirst();\n\t\t\tif (c != null) \n\t\t\t{\n\t\t\t\tid = c.getInt(c.getColumnIndex(PLAYER_ID));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\t Log.e(\"Error\", \"Error\", e);\n\t\t} \n\t\treturn id;\n\t}",
"public com.google.protobuf.ByteString\n getPlayerExternalUaIdBytes() {\n java.lang.Object ref = playerExternalUaId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n playerExternalUaId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getPlayerName(UUID id) {\n return playerRegistry.get(id);\n }",
"public Player getPlayer() {\r\n return world.getPlayer();\r\n }",
"long getPokemonId();",
"public int getPlayerToken() {\n\t\treturn playerToken;\n\t}"
] | [
"0.8986274",
"0.87600195",
"0.87600195",
"0.859782",
"0.8464242",
"0.83920294",
"0.83486235",
"0.82608086",
"0.8212873",
"0.8139817",
"0.8134184",
"0.8123571",
"0.79780465",
"0.7972089",
"0.7934156",
"0.7934156",
"0.7913852",
"0.78766316",
"0.7864046",
"0.7840039",
"0.78309244",
"0.78142625",
"0.77980834",
"0.7759394",
"0.7743981",
"0.7640755",
"0.7560145",
"0.74433905",
"0.7382708",
"0.72073364",
"0.7203961",
"0.7178398",
"0.7160048",
"0.71429735",
"0.6974664",
"0.6971238",
"0.6953914",
"0.6922106",
"0.69191384",
"0.6910255",
"0.69073427",
"0.68538827",
"0.68522364",
"0.68067783",
"0.6786674",
"0.6780152",
"0.67363656",
"0.6718026",
"0.670174",
"0.6682842",
"0.66493356",
"0.66444165",
"0.66444165",
"0.66317827",
"0.66269",
"0.6617605",
"0.6617605",
"0.6600351",
"0.65943074",
"0.65896106",
"0.65894425",
"0.6555691",
"0.6527158",
"0.65221304",
"0.65106237",
"0.64790124",
"0.6475115",
"0.64614034",
"0.64367414",
"0.6428849",
"0.6418792",
"0.6396006",
"0.63946",
"0.63761634",
"0.6370842",
"0.63663596",
"0.6361336",
"0.6359352",
"0.6320607",
"0.6318594",
"0.6314952",
"0.6308227",
"0.6308227",
"0.62923396",
"0.6284561",
"0.62785184",
"0.6276391",
"0.6274641",
"0.6270061",
"0.6260996",
"0.62590164",
"0.62563956",
"0.62563956",
"0.62551224",
"0.62516487",
"0.6250307",
"0.62421376",
"0.6237191",
"0.62333846",
"0.6232686",
"0.6226865"
] | 0.0 | -1 |
Sets the id of the player | public void setId(byte id){this.id = id;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPlayerId(int playerId);",
"public void setPlayerId(String s) {\n\t\tplayerId = s;\n\t}",
"public Builder setPlayerId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n playerId_ = value;\n onChanged();\n return this;\n }",
"public void setPlayerId(Integer playerId) {\n this.PlayerId = playerId;\n }",
"public Builder setPlayerId(long value) {\n \n playerId_ = value;\n onChanged();\n return this;\n }",
"public void setID(final PlayerID ID)\r\n\t{\r\n\t\tthis.ID = ID;\r\n\t}",
"public int getId() {\n return playerId;\n }",
"java.lang.String getPlayerId();",
"Player(int id, String name){\n\t\tthis();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public void setId(Object id) {\n this.id = id;\n }",
"public void setId(Object id) {\n this.id = id;\n }",
"public int getIdPlayer() {\n\t\treturn idPlayer;\n\t}",
"public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}",
"public int getPlayerId() {\r\n\t\treturn playerId;\r\n\t}",
"public void setId(final int id);",
"public String getPlayerId() {\n\t\treturn playerId;\n\t}",
"int getPlayerId();",
"int getPlayerId();",
"public void setId(ID id)\n {\n this.id = id;\n }",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"void setId(int id) {\n this.id = id;\n }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"public String getId() {\n\t\treturn this.playerid;\n\t}",
"public void setId(int value) {\r\n this.id = value;\r\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void assignId(int id);",
"void setId(final String id);",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"void setId(int id);",
"public void setId(final String id);",
"public void setId(final String id);",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"public void setId(java.lang.String value) {\n this.id = value;\n }",
"void setId(ID id);",
"void setId(String id);",
"void setId(String id);",
"void setId(String id);",
"public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}",
"public void setId (String id)\n {\n _id = id;\n }",
"public void setPlayerID(int playerID) {\n\t\tthis.playerID = playerID;\n\t}",
"public void setId(int id) {\n \t\tthis.id = id;\n \t}",
"public void setId(int value) {\n this.id = value;\n }",
"public void setId(int id)\n {\n this.id = id;\n }",
"public void setId(int id)\n {\n this.id = id;\n }",
"void setId(java.lang.String id);",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public void setId(int id) {\r\n this.id = id;\r\n }",
"public long getPlayerId() {\n return playerId_;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(String id) {\n }",
"public void setId(int id){\n\t\tthis.id = id;\n\t}",
"public void setId(int id)\n {\n\tthis.id = id;\n }",
"public void setId(String anId) {\n _theId = anId;\n }",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}",
"@Override\n public void setId(int id) {\n this.id = id;\n }",
"public void setId(String id){\r\n\t\tthis.id = id;\r\n\t}",
"public void setId(int id) {\n this.id = id;\n\t}",
"public void setId (String id);",
"public void setId(String id)\n {\n this.id = id;\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"public void setId(String id) {\r\n this.id = id;\r\n }",
"public Builder setPlayerIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n bitField0_ |= 0x00000002;\n playerId_ = value;\n onChanged();\n return this;\n }",
"public void setPlayer(String player) {\r\n this.player = player;\r\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }",
"public void setId(int id) {\n this.id = id;\n }"
] | [
"0.82654625",
"0.7616792",
"0.7325812",
"0.7317543",
"0.73157847",
"0.70914096",
"0.69375896",
"0.6902238",
"0.6880101",
"0.6844163",
"0.68259686",
"0.68147624",
"0.6767519",
"0.6767519",
"0.6750037",
"0.6723529",
"0.66955596",
"0.6688523",
"0.6676683",
"0.66757023",
"0.66757023",
"0.6671944",
"0.6671177",
"0.66626847",
"0.6654063",
"0.66485596",
"0.6644848",
"0.6644601",
"0.6644601",
"0.6644601",
"0.6644601",
"0.6644601",
"0.6644601",
"0.6644601",
"0.6634728",
"0.6623699",
"0.66182894",
"0.6608802",
"0.6606061",
"0.66029197",
"0.66029197",
"0.65962785",
"0.65962785",
"0.65962785",
"0.65962785",
"0.65962785",
"0.65962785",
"0.65962785",
"0.65962785",
"0.65962785",
"0.65890515",
"0.65890515",
"0.65890515",
"0.6584967",
"0.6584702",
"0.6584702",
"0.6584702",
"0.6580382",
"0.6580296",
"0.6573742",
"0.65708834",
"0.6567862",
"0.65678",
"0.65678",
"0.65644205",
"0.6560958",
"0.6560958",
"0.6560958",
"0.6560958",
"0.65551996",
"0.6550847",
"0.6550847",
"0.6550847",
"0.6535677",
"0.65339154",
"0.65322536",
"0.6526323",
"0.65217865",
"0.65130126",
"0.6512951",
"0.65104187",
"0.65075684",
"0.65064484",
"0.6500276",
"0.64969975",
"0.64939517",
"0.6491474",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117",
"0.6484117"
] | 0.0 | -1 |
Returns the x coordinate of the player | public short getXPos(){
return xPos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getPlayerX() {\n return playerX;\n }",
"public final int getPositionX() {\r\n return (int) position.x();\r\n }",
"public float getPositionX() {return this.position.getX();}",
"double getPositionX();",
"double getPositionX();",
"double getPositionX();",
"public float getX() {\n return pos.x;\n }",
"public int getXPosition() {\n\t\treturn this.position.x;\n\t}",
"public int getPos_x(){\n\t\treturn pos_x;\n\t}",
"public final int getX()\n\t{\n\t\treturn pos.x;\n\t}",
"public int getX() {\n return pos_x;\n }",
"public int getX() {\n return (int) xPos;\n }",
"public int getX() {\r\n\t\treturn xcoord;\r\n\t}",
"public int getPositionX(){\n\t\treturn positionx;\n\t}",
"public float getxPosition() {\n return xPosition;\n }",
"public int getX() {\n synchronized (this.xLock) {\n return (int) this.movementComposer.getXPosition();\n }\n }",
"public int getX() {\n\t\t\n\t\treturn xPosition;\t\t// Gets the x integer\n\t}",
"public int x() {\r\n\t\treturn xCoord;\r\n\t}",
"public int getXPosition()\n {\n return xPosition;\n }",
"public int getXPosition()\n {\n return xPosition;\n }",
"public final float getPositionX() {\r\n\t\treturn getState(false).getPositionX();\r\n\t}",
"public int getX()\r\n {\r\n \treturn xPos;\r\n }",
"public int getXPosition() {\n return xPosition;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public int getPositionX() {\r\n\t\treturn positionX;\r\n\t}",
"public double getPositionX() {\n\t\treturn this.tilePositionX;\n\t}",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public int getXPosition(){\n\t\treturn xPosition;\n\t}",
"public int getxPosition() {\n\t\treturn xPosition;\n\t}",
"double getXPosition();",
"public int getxPos() \n\t{\n\t\treturn xPos;\n\t}",
"public double getXPosition()\n\t{\n\t\treturn xPosition;\n\t}",
"public int getPositionX() {\n return positionX;\n }",
"public int getX() {\n return xCoord;\n }",
"void setPlayerXRelative(int x) {\n }",
"public int getXPosition() {\n return this.xPosition;\n }",
"public int getX()\r\n {\r\n return xCoord;\r\n }",
"public int getX()\n\t{\n\t\treturn m_nPosX;\n\t}",
"public int getCoordX() \r\n {\r\n \treturn this.coordX;\r\n }",
"public int getxPos() {\n\t\treturn xPos;\n\t}",
"public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}",
"public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}",
"public int getXPos() {\n\t\treturn xPos;\n\t}",
"public int getXPos() {\r\n\t\treturn this.cameraX;\r\n\t}",
"public int getxPos() {\n return xPos;\n }",
"public double getX() {\n return position.getX();\n }",
"public int getxCoord() {\r\n\t\treturn xCoord;\r\n\t}",
"public int getxCoord() {\r\n\t\treturn xCoord;\r\n\t}",
"public int getxCoord() {\n\t\treturn xCoord;\n\t}",
"public double getUserFriendlyXPos(){\n return xPos - myGrid.getWidth()/ HALF;\n }",
"public int getX() {\n return posX;\n }",
"public int getX() { return position.x; }",
"protected int getxCoord() {\n\t\treturn xCoord;\n\t}",
"public int getXPoint() {\r\n return this.x;\r\n }",
"int getX() {\n return xPos;\n }",
"public int getSpawnX() \n\t{\n\t\treturn spawnX;\n\t}",
"public int getX() {\r\n return xpos;\r\n }",
"public float getPosX() {\r\n\t\treturn posX;\r\n\t}",
"public float getX() { return xCoordinate;}",
"public int getX() {\n if (this.coordinates == null)\n return -1;\n return this.coordinates.x();\n }",
"@Override\n\tpublic float getX() {\n\t\treturn lilyPosX;\n\t}",
"public int getPosX() {\r\n\t\treturn posX;\r\n\t}",
"public int getPosX() {\n\t\treturn posX;\n\t}",
"private int get_x() {\n return center_x;\n }",
"public int getX() {\n return (int) this.center.getX();\n }",
"public int getPosX(){\n\t\treturn this.posX; \n\t}",
"private double getPosX() {\n\t\treturn this.posX.get();\n\t}",
"public int getX() {\n return positionX;\n }",
"public int getxCoordinate() {\n return xCoordinate;\n }",
"public int getxCoordinate() {\n return xCoordinate;\n }",
"public int getX() {\n return (int) center.getX();\n }",
"public int getX(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(0)/ AvesAblazeHardware.mmPerInch);\n\t}",
"@Override\n\tpublic int getPosX() {\n\t\treturn posX;\n\t}",
"public int getX() {\n return this.coordinate.x;\n }",
"public int getxCoordinate() {\n\t\treturn xCoordinate;\n\t}",
"public float getPosX() {\n return posX;\n }",
"public double getXPos(){\n return xPos;\n }",
"public int getPosX() {\n return posX;\n }",
"public int getX() {\r\n return (int) center.getX();\r\n }",
"public int xPos() {\n\t\treturn Engine.scaleX(x);\n\t}",
"@Override\n\tpublic int getX() {\n\t\treturn this.posicionX;\n\t}",
"public int getXCoordinate ()\n {\n return xCoordinate;\n }",
"public double getCardPosX(){\r\n return getX();\r\n }",
"public int getPosicaoX() {\r\n\t\treturn posicaoX;\r\n\t}",
"public double getXPos() {\n\t\treturn this.position[0];\n\t}",
"public float getX() {\n return this.x;\n }",
"public int getXPos();",
"protected Number getX() {\n return this.xCoordinate;\n }",
"public int get_X_Coordinate()\n {\n return currentBallX;\n }",
"public void updatePlayerXPos(){\n\t\tif(goRight&&Player.getxPlayerLoc()<=(screenWidth - (Player.getPlayerImage().getWidth()* Player.getPlayerScale() ) ) ){\n\t\t\tPlayer.updateXPos(true);\n\t\t\tPlayer.setPlayerImage(true);\n\t\t\t\n\t\t}\n\t\tif(goLeft&&Player.getxPlayerLoc() >=( (Player.getPlayerImage().getWidth() / 2) * Player.getPlayerScale() ) ){\n\t\t\tPlayer.updateXPos(false);\n\t\t\tPlayer.setPlayerImage(false);\n\t\t}\n\t}",
"double getMapPositionX();",
"public int getX()\n\t{\n\t\treturn mX;\n\t}",
"public int getSpawnX()\n {\n return spawnX;\n }",
"public ArrayList<Integer> getXPlayers() {\n return this.xPlayers;\n }",
"public int getX(){ return xPosition; }",
"public int getX() {\n\t\treturn this.x;\n\t}",
"public int getX() {\n\t\treturn this.x;\n\t}"
] | [
"0.82353586",
"0.7799148",
"0.7754791",
"0.7611311",
"0.7611311",
"0.7611311",
"0.76007175",
"0.7598927",
"0.75954",
"0.75651264",
"0.75255615",
"0.75215685",
"0.75012565",
"0.74996984",
"0.7499542",
"0.7495908",
"0.74912",
"0.74632215",
"0.7460829",
"0.7460829",
"0.7445861",
"0.7438113",
"0.7428356",
"0.74177897",
"0.74177897",
"0.7417382",
"0.7415913",
"0.7414007",
"0.7402001",
"0.7402001",
"0.740024",
"0.7396734",
"0.7384847",
"0.73843074",
"0.7381607",
"0.7377668",
"0.737401",
"0.737274",
"0.73575544",
"0.7343169",
"0.7331911",
"0.73309284",
"0.7317728",
"0.73054534",
"0.7301423",
"0.7301423",
"0.72911984",
"0.7285965",
"0.7263492",
"0.72493035",
"0.7245303",
"0.7245303",
"0.72290933",
"0.7219601",
"0.72007906",
"0.7200021",
"0.7197253",
"0.71953946",
"0.71918684",
"0.7187011",
"0.71850526",
"0.71832603",
"0.71800905",
"0.71733886",
"0.71660525",
"0.71617085",
"0.71615064",
"0.7156962",
"0.7142264",
"0.712496",
"0.7101673",
"0.70851374",
"0.70799816",
"0.70799816",
"0.7063678",
"0.70613337",
"0.70581806",
"0.7053421",
"0.70413697",
"0.70400816",
"0.70400393",
"0.7039677",
"0.70339805",
"0.70047396",
"0.69905394",
"0.6989936",
"0.6987293",
"0.69851464",
"0.6984949",
"0.69825715",
"0.69818187",
"0.6981563",
"0.6979423",
"0.6971024",
"0.6959889",
"0.69575006",
"0.69453853",
"0.69369674",
"0.6932848",
"0.693122",
"0.693122"
] | 0.0 | -1 |
Returns the y coordinate of the player | public short getYPos(){
return yPos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final int getY()\n\t{\n\t\treturn pos.y;\n\t}",
"public double getPlayerYPos() {\r\n return jumper.getYposition();\r\n }",
"public Point getXyLocation() {\n return playerxy;\n }",
"public int getY() {\n return (int) yPos;\n }",
"public int getY() {\n synchronized (this.yLock) {\n return (int) this.movementComposer.getYPosition();\n }\n }",
"public int getYPosition() {\n\t\treturn this.position.y;\n\t}",
"public int getY() {\n return pos_y;\n }",
"public int getY() {\n\t\t\n\t\treturn yPosition;\t\t// Gets the y integer\n\t}",
"public int getY() {\r\n\t\treturn ycoord;\r\n\t}",
"public float getY() {\n return pos.y;\n }",
"public double getY() {\n return position.getY();\n }",
"public int getY() {\n return posY;\n }",
"public int getY() {\n return yCoord;\n }",
"double getYPosition();",
"public final int getPositionY() {\r\n return (int) position.y();\r\n }",
"public int getY()\r\n {\r\n return yCoord;\r\n }",
"public int getY() {\n return positionY;\n }",
"public int y() {\r\n\t\treturn yCoord;\r\n\t}",
"public int getY()\n\t{\n\t\treturn this.y;\n\t}",
"public int getY()\n\t{\n\t\treturn this.y;\n\t}",
"public int getY()\n\t{\n\t\treturn mY;\n\t}",
"public int getY()\r\n\t{\r\n\t\treturn this.Y;\r\n\t}",
"public int getY()\r\n\t{\r\n\t\treturn (int)y;\r\n\t}",
"public int getY()\r\n\t{\r\n\t\treturn y;\r\n\t}",
"public int getY() {\r\n\t\treturn this.y;\r\n\t}",
"public int getY()\n {\n return this.y;\n }",
"public int getY() {\r\n return this.y;\r\n }",
"public int getYPoint() {\r\n return this.y;\r\n }",
"public int getY() {\r\n\t\treturn y;\r\n\t}",
"public int getY() {\r\n\t\treturn y;\r\n\t}",
"public int getY() {\r\n\t\treturn y;\r\n\t}",
"public int getY() {\n\t\treturn this.y;\n\t}",
"public int getY() {\n\t\treturn this.y;\n\t}",
"public int getY() {\n\t\treturn this.y;\n\t}",
"public int getY() {\r\n return y;\r\n }",
"public int getY() {\r\n return y;\r\n }",
"double getPositionY();",
"double getPositionY();",
"double getPositionY();",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY() {\n return y;\n }",
"public int getY()\r\n {\r\n return yLoc;\r\n }",
"public int getY()\n\t{\n\t\treturn m_nPosY;\n\t}",
"public int getY()\n\t{\n\t\treturn y;\n\t}",
"public int getY()\n\t{\n\t\treturn y;\n\t}",
"public int getY()\n\t{\n\t\treturn y;\n\t}",
"public int getY()\n\t{\n\t\treturn y;\n\t}",
"public int getY()\n\t{\n\t\treturn y;\n\t}",
"public int getY()\n\t{\n\t\treturn y;\n\t}",
"public int getY() {\r\n return (int) this.p.getY();\r\n }",
"public int getPos_y(){\n\t\treturn pos_y;\n\t}",
"public int getY() {\n return y;\r\n }",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public int getY() {\n\t\treturn y;\n\t}",
"public double getYPosition()\n\t{\n\t\treturn yPosition;\n\t}",
"public int getYPosition(){\n\t\treturn yPosition;\n\t}",
"public int getYPosition() {\n return yPosition;\n }",
"public int getYPosition()\n {\n return yPosition;\n }",
"public int getYPosition()\n {\n return yPosition;\n }",
"public int getCoordY() \r\n {\r\n \treturn this.coordY;\r\n }",
"public int getY(){\r\n\t\treturn y;\r\n\t}",
"public int getYPos();",
"public int getY()\n {\n return y;\n }",
"public int getY()\n {\n return y;\n }",
"public int getY() {\n return y_;\n }",
"public int getY() {\n return y_;\n }",
"public int getY() {\n return y_;\n }",
"public int getY() {\n return y_;\n }",
"public int getY() {\n return y_;\n }",
"public int getyCoord() {\r\n\t\treturn yCoord;\r\n\t}",
"public int getY(){\n\t\treturn y;\n\t}",
"public int getY(){\n\t\treturn y;\n\t}",
"public int getY() {\n return y_;\n }",
"public int getY() {\n return y_;\n }",
"public int getY() {\n return y_;\n }",
"public int getY() {\n return y_;\n }",
"public int getY() {\n return y_;\n }",
"public int getY() {\n return (int) this.center.getY();\n }",
"public int getY() {\n return this.y;\n }"
] | [
"0.8056229",
"0.80185825",
"0.80178726",
"0.7923404",
"0.7905833",
"0.7857787",
"0.7841382",
"0.7818493",
"0.77975947",
"0.7795626",
"0.77571076",
"0.7741205",
"0.77316403",
"0.7718371",
"0.7710892",
"0.770845",
"0.7707489",
"0.7691192",
"0.76806164",
"0.76806164",
"0.7670386",
"0.7670068",
"0.7666433",
"0.76596767",
"0.7654295",
"0.76533186",
"0.76499224",
"0.76435345",
"0.7643395",
"0.7643395",
"0.7643395",
"0.7637517",
"0.7637517",
"0.7637517",
"0.7634662",
"0.7634662",
"0.7629314",
"0.7629314",
"0.7629314",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.7628973",
"0.76272106",
"0.7625322",
"0.76252",
"0.76252",
"0.76252",
"0.76252",
"0.76252",
"0.76252",
"0.76250184",
"0.7621777",
"0.7616943",
"0.7616773",
"0.7616773",
"0.7616773",
"0.7616773",
"0.7616773",
"0.7616773",
"0.7616773",
"0.7616773",
"0.7616773",
"0.7616773",
"0.7616773",
"0.7615286",
"0.76113254",
"0.76109946",
"0.760424",
"0.760424",
"0.7599931",
"0.7598079",
"0.75938606",
"0.7577121",
"0.7577121",
"0.7569206",
"0.7569206",
"0.7569206",
"0.7569206",
"0.7569206",
"0.75625765",
"0.75572914",
"0.75572914",
"0.7554042",
"0.7554042",
"0.7554042",
"0.7554042",
"0.7554042",
"0.75435317",
"0.7541156"
] | 0.0 | -1 |
Returns the list of weapons in the players inventory | public ArrayList<Pair<Byte, Short>> getWeapons() {
return weapons;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<CardWeapon> getWeapons() {\n return weapons;\n }",
"public Vector<EntityWeapon> getWeaponList();",
"public List<IWeapon> getWeaponsInventory(){\n return weaponsInventory;\n }",
"public Weapon[] getWeapons(){\n\t\tSystem.out.println(\"Creating Weapons...\");\n\t\tfor(int i=0; i<boardWeapons.length; i++){\n\t\t\tSystem.out.println(boardWeapons[i].getName());\n\t\t}\n\t\treturn boardWeapons;\n\t}",
"public ArrayList<Weapon> getWeapons() {\n return weapons;\n }",
"public List<Integer> getPurchasedWeapons() {\r\n\t\treturn collectionManager.getPurchasedWeapons();\r\n\t}",
"public ArrayList<WeaponClient> getWeapons() {\n return weapons;\n }",
"public int getWeapons() {\n return weapons;\n }",
"public ArrayList<Weapon> getWeaponList() {\n return new ArrayList<>(weaponList);\n }",
"public ArrayList<Gun> getGuns() {\n\t\tArrayList<Gun> guns = new ArrayList<Gun>(); \n\t\tfor (Item item : inventory) {\n\t\t\tif (item.asGun() != null) {\n\t\t\t\t guns.add(item.asGun());\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\treturn guns;\n\t }",
"java.util.List<com.message.EquipmentProto.PlayerEquipmentMsg> \n getListPlayerEquipmentsList();",
"List<InventoryItem> getInventory();",
"public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }",
"private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/candlestick3.png\"), new Coordinate(2,3), \"Candlestick\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/knife1.png\"), new Coordinate(12,3), \"Knife\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/leadpipe1.png\"), new Coordinate(20,3), \"LeadPipe\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/rope1.png\"), new Coordinate(20,10), \"Rope\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/spanner1.png\"), new Coordinate(20,16), \"Wrench\"));\r\n\t\treturn weaps;\r\n\t}",
"public List<Equipment> getEquipments() {\n return equipments;\n }",
"Collection<Item> getInventory();",
"@Override\n\tpublic List<Equipment> getAllEquipmet() {\n\t\treturn dao.getAllEquipmet();\n\t}",
"public Set<Material> getAllowedWeapons()\r\n\t{\treturn Collections.unmodifiableSet(this.allowedWeapons);\t}",
"public WeaponDetails[] getWeaponsOnSquare() {\n return this.weaponsOnSquare;\n }",
"public Item[] getInventoryItems(){\n\t\treturn inventoryItems;\n\t}",
"public ArrayList<Item> getItemList(){\n\t\treturn inventoryList;\n\t}",
"public abstract List<String> getInventory();",
"public ArrayList<Item> getList() {\r\n\t\treturn inventory;\r\n\t}",
"public String printPlayerEquipment() {\r\n\t\t\treturn this.getPlayer().presentEquippedItems();\r\n\t\t}",
"public List<Treasure> giveInventory() {\r\n return treasures;\r\n }",
"public String printAllInventory(){\r\n\r\n String returnString = \"Items:\";\r\n for(Item item : playerItem){\r\n returnString += \" \" + item.getName(); \r\n }\r\n return returnString;\r\n }",
"public Vector<ArtilleryModifier> getWeaponModifiers(Mounted mounted) {\n Vector<ArtilleryModifier> result = weapons.get(mounted);\n if (result == null) {\n result = new Vector<ArtilleryModifier>();\n weapons.put(mounted, result);\n }\n return result;\n }",
"@Override\n\tpublic List<Equipment> getAllAviableEquipmet() {\n\t\treturn dao.getAllAviableEquipmet();\n\t}",
"public List<Inventory> getInventory();",
"public List<String> getWeaponCardList() {\n return weaponCardList;\n }",
"public List<PlayerItem> getAllPlayerItemById(Player player);",
"private HashMap<String, Weapon> readWeapons() {\n JSONObject weaponsData = getAssetJson(\"weapons.json\").getJSONObject(\"weapons\");\n HashMap<String, Weapon> weapons = new HashMap<>();\n\n for(String categoryName : weaponsData.keySet()) {\n Weapon.CATEGORY category = Weapon.CATEGORY.fromName(categoryName);\n JSONObject categoryWeaponsData = weaponsData.getJSONObject(categoryName);\n final String categoryPath = Weapon.BASE_PATH + categoryName + \"/\";\n\n for(String weaponId : categoryWeaponsData.keySet()) {\n JSONObject weaponData = categoryWeaponsData.getJSONObject(weaponId);\n\n weapons.put(\n weaponId,\n new Weapon(\n weaponId,\n weaponData.getString(NAME_KEY),\n category,\n weaponData.getInt(\"cost\"),\n resourceHandler.getImageResource(categoryPath + weaponId + \".png\")\n )\n );\n }\n }\n\n return weapons;\n }",
"public List<PlayerItem> getAll();",
"List<InventoryItem> getInventory(String username);",
"public int weaponCount(){\n\t\treturn weaponList.size();\n\t}",
"static Weapon[] getWeapons() throws FileNotFoundException{\n\t\tString[] weaponData = readFile(\"Data/Weapons.txt\");\n\t\tWeapon[] weapons = new Weapon[weaponData.length];\n\t\t\n\t\tfor (int i = 0; i < weaponData.length; i++){\n\t\t\tString[] thisWeaponData = weaponData[i].split(\"/\");\n\t\t\tweapons[i] = new Weapon(\n\t\t\t\t\tthisWeaponData[0],\n\t\t\t\t\tInteger.parseInt(thisWeaponData[1]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[2]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[3]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[4]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[5]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[6]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[7]),\n\t\t\t\t\tDouble.parseDouble(thisWeaponData[8]),\n\t\t\t\t\tDouble.parseDouble(thisWeaponData[9]),\n\t\t\t\t\tDouble.parseDouble(thisWeaponData[10]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[11]));\n\t\t}\n\t\t\n\t\treturn weapons;\n\t}",
"public String getEquippedWeaponName() {\n return \"\";\n }",
"public List<ItemStack> getItems()\n {\n return items;\n }",
"public List<CardWeapon> hasToReload() {\n List<CardWeapon> toReload = new ArrayList<>();\n for (CardWeapon cw : weapons)\n if(!cw.isLoaded())\n toReload.add(cw);\n if(toReload.isEmpty())\n return null;\n return toReload;\n }",
"List<SimpleInventory> getInventories();",
"public abstract List<String> getUserInventory();",
"public List<equipment> getAllEquipments (){\n return equiomentResprositery.findAll();\n }",
"public String getPlayerInventory() {\r\n String res = \"You have the following items in your inventory:\" + System.getProperty(\"line.separator\");\r\n for (int i = 0; i < player.getInventory().size(); i++) {\r\n res += i + \": \" + player.getInventory().get(i).toString() + System.getProperty(\"line.separator\");\r\n }\r\n return res;\r\n }",
"public Hurtbox[] getHurtboxes() {\n return this.weapon.getHurtboxes();\n }",
"Set<String> getInventory();",
"public List<ItemStack> getItems() {\n return this.items;\n }",
"@Override\n public Type getItemType() {\n return Type.WEAPON;\n }",
"public HashMap<String, List<String>> getItemMap() {\r\n\r\n\t\thelmet_abilities.add(Game_constants.INTELLIGENCE);\r\n\t\thelmet_abilities.add(Game_constants.WISDOM);\r\n\t\thelmet_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tarmor_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tshield_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tring_abilities.add(Game_constants.ARMOR_CLASS);\r\n\t\tring_abilities.add(Game_constants.STRENGTH);\r\n\t\tring_abilities.add(Game_constants.CONSTITUTION);\r\n\t\tring_abilities.add(Game_constants.WISDOM);\r\n\t\tring_abilities.add(Game_constants.CHARISMA);\r\n\r\n\t\tbelt_abilities.add(Game_constants.CONSTITUTION);\r\n\t\tbelt_abilities.add(Game_constants.STRENGTH);\r\n\r\n\t\tboots_abilities.add(Game_constants.ARMOR_CLASS);\r\n\t\tboots_abilities.add(Game_constants.DEXTERITY);\r\n\r\n\t\tweapon_abilities.add(Game_constants.ATTACK_BONUS);\r\n\t\tweapon_abilities.add(Game_constants.DAMAGE_BONUS);\r\n\r\n\t\titem_map.put(Game_constants.HELMET, helmet_abilities);\r\n\t\titem_map.put(Game_constants.ARMOR, armor_abilities);\r\n\t\titem_map.put(Game_constants.SHIELD, shield_abilities);\r\n\t\titem_map.put(Game_constants.RING, ring_abilities);\r\n\t\titem_map.put(Game_constants.BELT, belt_abilities);\r\n\t\titem_map.put(Game_constants.BOOTS, boots_abilities);\r\n\t\titem_map.put(Game_constants.WEAPON_MELEE, weapon_abilities);\r\n\t\titem_map.put(Game_constants.WEAPON_RANGE, weapon_abilities);\r\n\r\n\t\treturn item_map;\r\n\r\n\t}",
"private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }",
"public int getWeaponSlots() {\n return base.getWeaponSlots();\n }",
"public Inventory getEnchantInventory(Player p){\n Inventory inv = Bukkit.createInventory(null, 27, \"Enchant Pickaxe\");\n for(CustomEnchantment ce : enchants.keySet()){\n ItemStack item = new ItemStack(ce.getIcon());\n ItemMeta meta = item.getItemMeta();\n meta.setDisplayName(ce.getColor() + ce.getDisplayName());\n List<String> lore = new ArrayList<>();\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Current Level: \" + Changeables.CHAT_INFO + getEnchantLevel(ce, p));\n lore.add(Changeables.CHAT + \"Max Level: \" + Changeables.CHAT_INFO + ce.getMaxLevel());\n lore.add(Changeables.CHAT + \"Current Price: \" + Changeables.CHAT_INFO + ce.getPrice(getEnchantLevel(ce, p)));\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Left Click to \" + Changeables.CHAT_INFO + \" Buy 1\");\n lore.add(Changeables.CHAT + \"Right Click to \" + Changeables.CHAT_INFO + \" Buy Max\");\n meta.setLore(lore);\n item.setItemMeta(meta);\n inv.setItem(enchants.get(ce), item);\n }\n\n\n\n\n\n return inv;\n }",
"public WeaponInterface getWeaponTab() {\r\n return player.getExtension(WeaponInterface.class);\r\n }",
"public List<InventoryEntry> getInventoryEntries();",
"public List<Equipment> findAllEquipment() {\n Iterable<Equipment> itEquipment = equipmentRepository.findAll();\n List<Equipment> equipment = new ArrayList<>();\n\n itEquipment.forEach(equipment::add);\n\n return equipment;\n }",
"@Shadow public abstract Iterable<ItemStack> getArmorSlots();",
"public ArrayList<Thing> getThings()\r\n {\r\n \tArrayList<Thing> inventory = new ArrayList<Thing>();\r\n \tfor (int i=0; i<items.size(); i++)\r\n \t\tinventory.add(items.get(i));\r\n \treturn inventory;\r\n }",
"@Override\n public ItemStack[] getContents() {\n final ItemStack[] items = new ItemStack[36];\n\n items[0] = this.getSword();\n\n for(int i = 0; i < this.getAbilities().length; i++) {\n final Ability ability = this.getAbilities()[i];\n\n if (ability instanceof ItemAbility) {\n items[i+1] = new ItemStack(((ItemAbility) ability).getMaterial());\n }\n }\n\n for (int i = 0; i < items.length; i++) {\n if (items[i] == null) {\n items[i] = this.getHealthType();\n }\n }\n\n return items;\n }",
"public Weapon getWeapon(){\n return this.weaponPos;\n }",
"public String getWeapon() {\n return weapon1;\n }",
"public List<Goods> getGoodsGivenBy(Player player) {\n List<Goods> goodsList = new ArrayList<Goods>();\n for (TradeItem ti : items) {\n if (ti instanceof GoodsTradeItem && player == ti.getSource()) {\n goodsList.add(((GoodsTradeItem)ti).getGoods());\n }\n }\n return goodsList;\n }",
"public String getItemsString()\n {\n String returnString =\"\";\n if(Inventory.isEmpty()){\n returnString = \"You are not holding any items\";\n } else {\n returnString = \"Items you are holding:\";\n String temp = \"\";\n for(Items item : Inventory.values()) {\n temp += \", \" + item.getName() ; \n }\n returnString += temp.substring(1);\n }\n return returnString;\n }",
"public static int[] guthansEquipment() {\n return new int[]{\n Items.GUTHANS_HELM_4724,\n Items.GUTHANS_HELM_100_4904,\n Items.GUTHANS_HELM_75_4905,\n Items.GUTHANS_HELM_50_4906,\n Items.GUTHANS_HELM_25_4907,\n Items.GUTHANS_PLATEBODY_4728,\n Items.GUTHANS_PLATEBODY_100_4916,\n Items.GUTHANS_PLATEBODY_75_4917,\n Items.GUTHANS_PLATEBODY_50_4918,\n Items.GUTHANS_PLATEBODY_25_4919,\n Items.GUTHANS_CHAINSKIRT_4730,\n Items.GUTHANS_CHAINSKIRT_100_4922,\n Items.GUTHANS_CHAINSKIRT_75_4923,\n Items.GUTHANS_CHAINSKIRT_50_4924,\n Items.GUTHANS_CHAINSKIRT_25_4925,\n Items.GUTHANS_WARSPEAR_4726,\n Items.GUTHANS_WARSPEAR_100_4910,\n Items.GUTHANS_WARSPEAR_75_4911,\n Items.GUTHANS_WARSPEAR_50_4912,\n Items.GUTHANS_WARSPEAR_25_4913,\n Items.BERSERKER_RING_I_11773\n };\n }",
"public String getWeaponName()\r\n\t{\r\n\t\treturn this.weaponName;\r\n\t}",
"public static Data<Weapon> weaponList(){\n\t\tData<Weapon> res = new Data<Weapon>();\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée bâtarde\",Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,35,3), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hache d’armes\",Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,10,3), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new Munition(\"Bolas\",TypeDamage.C,\"_\",5,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Gourdin\",Type.CAC_1M,TypeDamage.C, TypeMaterial.WOOD,0,1.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc long composite\", new Munition(\"Flèche\",0.075),TypeDamage.P,TypeMaterial.WOOD,100,1.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc court composite\", new Munition(\"Flèche\",0.075),TypeDamage.P,TypeMaterial.WOOD,75,1), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Dague\", Type.CAC_LIGHT ,TypeDamage.P_T,TypeMaterial.STEEL,2,0.5), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new Munition(\"Fléchette\", TypeDamage.P, \"_\",0.5,0.25), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hache d’armes naine\", Type.CAC_1M ,TypeDamage.T, TypeMaterial.STEEL,15,3), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Cimeterre à deux mains\", Type.CAC_2M,TypeDamage.T, TypeMaterial.STEEL,75,4), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Gantelet\", Type.CAC_LIGHT, TypeDamage.C, TypeMaterial.STEEL,2,0.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Coutille\", Type.CAC_2M, TypeDamage.T, TypeMaterial.STEEL,8,5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Grande hache\", Type.CAC_2M,TypeDamage.T,TypeMaterial.STEEL,20,6), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Massue\",Type.CAC_2M ,TypeDamage.C, TypeMaterial.WOOD,5,4), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée à deux mains\", Type.CAC_2M, TypeDamage.T, TypeMaterial.STEEL,50,4), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hallebarde\", Type.CAC_2M ,TypeDamage.P_T, TypeMaterial.STEEL,10,6), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hachette\", Type.CAC_LIGHT ,TypeDamage.T, TypeMaterial.STEEL,6,1.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arbalète lourde\", new Munition(\"Carreau\",0.05),TypeDamage.P, TypeMaterial.STEEL,50,4), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Fléau d’armes lourd\", Type.CAC_2M,TypeDamage.C, TypeMaterial.STEEL,15,5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Masse d’armes lourde\", Type.CAC_1M,TypeDamage.C, TypeMaterial.STEEL,12,4), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Lance d’arçon\", Type.CAC_2M, TypeDamage.P, TypeMaterial.STEEL,10,5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arbalète légère\", new Munition(\"Carreau\",0.05),TypeDamage.P, TypeMaterial.STEEL,35,2), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Fléau d’armes léger\", Type.CAC_1M, TypeDamage.C, TypeMaterial.STEEL,8,2.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Marteau léger\", Type.CAC_LIGHT ,TypeDamage.C, TypeMaterial.STEEL,1,2), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Masse d’armes légère\", Type.CAC_LIGHT,TypeDamage.C, TypeMaterial.STEEL,5,2), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Pic de guerre léger\", Type.CAC_LIGHT ,TypeDamage.P, TypeMaterial.STEEL,4,1.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc long\", new Munition(\"Flèche\",0.075),TypeDamage.P, TypeMaterial.WOOD,75,1.5), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Pique\", Type.CAC_2M,TypeDamage.P, TypeMaterial.WOOD,5,4.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée longue\", Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,15,2), 7));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Morgenstern\", Type.CAC_1M, TypeDamage.C_P,TypeMaterial.STEEL,8,3), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Nunchaku\", Type.CAC_LIGHT, TypeDamage.C, TypeMaterial.WOOD,2,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Bâton\", Type.CAC_2M, TypeDamage.C, TypeMaterial.WOOD,0,2), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Rapière\", Type.CAC_1M, TypeDamage.P ,TypeMaterial.STEEL,20,1), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Sai\", Type.CAC_LIGHT, TypeDamage.C_P ,TypeMaterial.STEEL,1,0.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Matraque\", Type.CAC_LIGHT, TypeDamage.C ,TypeMaterial.WOOD,1,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Cimeterre\", Type.CAC_1M, TypeDamage.T ,TypeMaterial.STEEL,15,2), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Faux\", Type.CAC_2M, TypeDamage.C_P ,TypeMaterial.STEEL,18,5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc court\", new Munition(\"Flèche\",0.075),TypeDamage.P, TypeMaterial.WOOD,30,1), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epieu\", Type.CAC_1M, TypeDamage.P ,TypeMaterial.STEEL,1,1.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée courte\", Type.CAC_1M, TypeDamage.P ,TypeMaterial.STEEL,10,1), 5));\n\t\tres.add(new Tuple<Weapon, Integer>(new Munition(\"Shuriken\",TypeDamage.P,\"_\",1,0.25), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Serpe\", Type.CAC_LIGHT, TypeDamage.T ,TypeMaterial.STEEL,6,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Fronde\", new Munition(\"Bille\",0.25),TypeDamage.C,null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Lance\", Type.CAC_2M, TypeDamage.P, TypeMaterial.STEEL,2,3), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Trident\", Type.CAC_1M,TypeDamage.P, TypeMaterial.STEEL,15,2), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Marteau de guerre\", Type.CAC_1M,TypeDamage.C, TypeMaterial.STEEL,12,2.5), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Fouet\", Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,1,1), 1));\n\t\t//Cas des armes a choisir manuellement.\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Autre arme de corps à corps légère\", Type.CAC_LIGHT, TypeDamage.NOTHING, null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Autre arme de corps à corps à une main\", Type.CAC_1M, TypeDamage.NOTHING, null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Autre arme de corps à corps à deux mains\", Type.CAC_2M, TypeDamage.NOTHING, null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Autre arme à distance\", new Munition(\"Autre munition\",0), TypeDamage.NOTHING,null,0,0), 2));\n\t\t\n\t\treturn res;\n\t}",
"@GetMapping(\"/equipment\")\n\tpublic List<Equipment> findAll() {\n\t\treturn inventoryService.findAll();\n\t}",
"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 List<Unit> getUnitsGivenBy(Player player) {\n List<Unit> unitList = new ArrayList<Unit>();\n for (TradeItem ti : items) {\n if (ti instanceof UnitTradeItem && player == ti.getSource()) {\n unitList.add(((UnitTradeItem)ti).getUnit());\n }\n }\n return unitList;\n }",
"public List<Enemy> getEnemies();",
"public PlayerInventory getInventory ( ) {\n\t\treturn extract ( handle -> handle.getInventory ( ) );\n\t}",
"public int getEquippedWeaponDamage() {\n return 0;\n }",
"public String getMonsterDropsLoot() {\r\n String res;\r\n Random gen = new Random();\r\n if (gen.nextInt(100) > 75) {\r\n int tmp = gen.nextInt(items.size());\r\n player.addToInventory(items.get(tmp));\r\n res = \"You search the corpse and loot a \" + items.get(tmp).getName() + System.lineSeparator();\r\n } else {\r\n res = \"You find nothing of value on the corpse.\" + System.lineSeparator();\r\n }\r\n return res;\r\n }",
"public List<PlayerItem> getSpecific(int playerItemId);",
"public List<InventoryEntity> getAllInventory() {\n\t\treturn inventoryDao.getAllInventory();\n\t}",
"public void setWeapons(ArrayList<WeaponClient> weapons) {\n this.weapons = weapons;\n }",
"public List<WeaponCard> checkReload(Player player)\n {\n List<WeaponCard> reloadableWeapons = new LinkedList<>(); //This is the weaponcard list i will return\n /*\n * For each weapon i check if the player has enough ammo to reload that weapon.\n * After a player choose a weapon to reload i have to delete the ammo from the player and reiterate this method.\n */\n for (WeaponCard weaponCard: player.getWeaponCardList())\n {\n if (weaponCard.getBlueAmmoCost()<=player.getAmmoBlue() && weaponCard.getRedAmmoCost()<=player.getAmmoRed() && weaponCard.getYellowAmmoCost()<=player.getAmmoYellow() && !weaponCard.isLoaded())\n {\n reloadableWeapons.add(weaponCard);\n }\n }\n\n return reloadableWeapons;\n }",
"public List<UpgradeCard> getUpgrades(ItemStack stack){\n List<UpgradeCard> upgrades = new ArrayList<>();\n IItemHandler handler = getHandler(stack);\n for (int index = 1; index < handler.getSlots()-1; index++){\n if (handler.getStackInSlot(index).getItem() != Items.AIR){\n upgrades.add((UpgradeCard)handler.getStackInSlot(index).getItem());\n }\n }\n return upgrades;\n }",
"public void getKilledProduct() \n {\n try{\n Player.getInstance().getInventory().add(new CowMeat());\n } catch (IllegalAccessException e) {\n //Do nothing\n }\n }",
"public List<TradeItem> getItemsGivenBy(Player player) {\n List<TradeItem> goodsList = new ArrayList<TradeItem>();\n for (TradeItem ti : items) {\n if (player == ti.getSource()) goodsList.add(ti);\n }\n return goodsList;\n }",
"public String getEquippedWeapon()\n\t{\n\t\treturn strEquippedWeapon;\n\t\t\n\t}",
"ArrayList<Ability> getAbilities() throws RemoteException;",
"public List<OwnedWarp> getWarps(String player) {\n return warps.get(player);\n }",
"public void generateTutorialWeapons() {\n this.loot.add(new Weapon(\"Weathered Longsword\", \"A weathered longsword - it'll do.\", 3, 1));\n this.loot.add(new Weapon(\"Weathered Battle Axe\", \"A weathered battle axe - it'll do.\", 2, 2));\n this.loot.add(new Weapon(\"Weathered Bow\", \"A weathered bow - it'll do.\", 3, 2));\n }",
"public void selectWeaponFromInventory(int weaponIndex) {\n }",
"public static boolean determineAttackingWeapons(GameCharacter attacker, int fromX, int fromY, int targetX, int targetY, Array<Weapon> attackingWeapons) {\r\n\t\tboolean returnValue = false;\r\n\t\tInventory intentory = attacker.getInventory();\r\n\t\tInventoryItem rightEquipped = intentory.getEquipped(ItemSlot.RIGHTHAND);\r\n\t\tInventoryItem leftEquipped = intentory.getEquipped(ItemSlot.LEFTHAND);\r\n\t\tif (attackingWeapons != null) {\r\n\t\t\tattackingWeapons.clear();\r\n\t\t}\r\n\t\t\r\n\t\tif (Vector2.dst(fromX, fromY, targetX, targetY) < 2) {\r\n\t\t\treturnValue = true;\r\n\t\t\tif (rightEquipped instanceof Weapon && !((Weapon)rightEquipped).isRanged()) {\r\n\t\t\t\tif (attackingWeapons != null) {\r\n\t\t\t\t\tattackingWeapons.add((Weapon)rightEquipped);\r\n\t\t\t\t}\r\n\t\t\t\treturnValue = false;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif (leftEquipped instanceof Weapon && !((Weapon)leftEquipped).isRanged()) {\r\n\t\t\t\tif (attackingWeapons != null) {\r\n\t\t\t\t\tattackingWeapons.add((Weapon)leftEquipped);\r\n\t\t\t\t}\r\n\t\t\t\treturnValue = false;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif (!(rightEquipped instanceof Weapon) && !(leftEquipped instanceof Weapon)) {\r\n\t\t\t\treturnValue = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (rightEquipped instanceof Weapon && ((Weapon)rightEquipped).isRanged()) {\r\n\t\t\t\tif (attackingWeapons != null) {\r\n\t\t\t\t\tattackingWeapons.add((Weapon)rightEquipped);\r\n\t\t\t\t}\r\n\t\t\t\treturnValue = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (leftEquipped instanceof Weapon && ((Weapon)leftEquipped).isRanged()) {\r\n\t\t\t\tif (attackingWeapons != null) {\r\n\t\t\t\t\tattackingWeapons.add((Weapon)leftEquipped);\r\n\t\t\t\t}\r\n\t\t\t\treturnValue = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn returnValue;\t\r\n\t}",
"public Weapon getWeapon() {\n\t\treturn weapon;\n\t}",
"List<Player> getPlayers();",
"@SideOnly(Side.CLIENT)\n/* 34: */ public void getSubItems(Item itemId, CreativeTabs table, List list)\n/* 35: */ {\n/* 36:35 */ for (int i = 0; i < 13; i++)\n/* 37: */ {\n/* 38:36 */ ItemStack is = new ItemStack(itemId);\n/* 39:37 */ is.stackTagCompound = new NBTTagCompound();\n/* 40:38 */ is.stackTagCompound.setShort(\"Shield\", (short)i);\n/* 41:39 */ list.add(is);\n/* 42: */ }\n/* 43: */ }",
"public void popItems() {\n\t\t\n\t\tItemList.add(HPup);\n\t\tItemList.add(SHPup);\n\t\tItemList.add(DMGup);\n\t\tItemList.add(SDMGup);\n\t\tItemList.add(EVup);\n\t\tItemList.add(SEVup);\n\t\t\n\t\trandomDrops.add(HPup);\n\t\trandomDrops.add(SHPup);\n\t\trandomDrops.add(DMGup);\n\t\trandomDrops.add(SDMGup);\n\t\trandomDrops.add(EVup);\n\t\trandomDrops.add(SEVup);\n\t\t\n\t\tcombatDrops.add(SHPup);\n\t\tcombatDrops.add(SDMGup);\n\t\tcombatDrops.add(SEVup);\n\t}",
"public Inventory getEquipment() {\n return equipment;\n }",
"public Collection<VirtualPet> pets() {\n\t\treturn shelterPets.values();\n\t}",
"boolean sellWeaponsForUser(int uid, List<Integer> wIds);",
"public WeaponType getEquippedWeaponType() {\n return WeaponType.NULL;\n }",
"@POST(\"/MakeWeaponList\")\n\tpublic Map<Integer, Weapon> makeWeaponList(@Body int id) throws GameNotFoundException;",
"public int getEquippedWeaponWeight() {\n return 0;\n }",
"public List<PlayerInstance> getAllPlayers()\n\t{\n\t\tfinal List<PlayerInstance> players = new ArrayList<>();\n\t\tfor (Creature temp : getCharactersInside())\n\t\t{\n\t\t\tif (temp instanceof PlayerInstance)\n\t\t\t{\n\t\t\t\tplayers.add((PlayerInstance) temp);\n\t\t\t}\n\t\t}\n\t\treturn players;\n\t}",
"@Override\n\tpublic List<Player> getPlayer() {\n\t\treturn ofy().load().type(Player.class).list();\n\t}",
"public List<Item> getAllItemsAvailable();",
"private void setWeapons()\n {\n sewers.setWeapon(woodSword);\n promenade.setWeapon(woodSword);\n depths.setWeapon(rustedSword);\n forest.setWeapon(goldSword);\n bridge.setWeapon(silverSpear);\n ramparts.setWeapon(infantryBow);\n }",
"public List<Goods> listByhot() {\n\t\treturn sm.selectList(\"com.huyu.entity.Goods.listByhot\");\n\t}",
"public void setWeapons() {\n\t\tca_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew CapAmerWeapons(Battleground.captainAmerica).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\the_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew HawkeyeWeapons(Battleground.hawkeye).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tbw_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew BlackWidowWeapons(Battleground.blackWidow).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\thulk_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew HulkWeapons(Battleground.hulk).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tthor_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew ThorWeapons(Battleground.thor).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tloki_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew LokiWeapons(Battleground.loki).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t}"
] | [
"0.7383703",
"0.7334437",
"0.73196834",
"0.73028183",
"0.7288731",
"0.725551",
"0.70240325",
"0.68986124",
"0.6822582",
"0.6745469",
"0.6662299",
"0.645705",
"0.64345515",
"0.63568515",
"0.6353218",
"0.6263774",
"0.6223705",
"0.620685",
"0.61922866",
"0.61826515",
"0.613987",
"0.6139081",
"0.6138979",
"0.6129182",
"0.6123486",
"0.61195856",
"0.61146253",
"0.60854375",
"0.60771734",
"0.60684085",
"0.60681945",
"0.6053916",
"0.6048314",
"0.60380894",
"0.6031678",
"0.602907",
"0.59937894",
"0.59829503",
"0.5979975",
"0.5960266",
"0.5944743",
"0.5934731",
"0.5928659",
"0.5921358",
"0.58966994",
"0.58927137",
"0.58390784",
"0.5802622",
"0.5792868",
"0.5791357",
"0.5780081",
"0.57773703",
"0.576238",
"0.57579243",
"0.5755622",
"0.573536",
"0.5724494",
"0.57074064",
"0.56965655",
"0.5684477",
"0.5667868",
"0.5664809",
"0.56558657",
"0.56525177",
"0.5646415",
"0.56351495",
"0.5630913",
"0.56043696",
"0.5602889",
"0.5601332",
"0.56010854",
"0.5601009",
"0.55774045",
"0.5575089",
"0.55673707",
"0.55569446",
"0.55427504",
"0.5525627",
"0.5524095",
"0.5517203",
"0.55068207",
"0.5505003",
"0.5500781",
"0.549894",
"0.54983675",
"0.5493967",
"0.54869086",
"0.54864484",
"0.5485545",
"0.54804003",
"0.54797244",
"0.5464138",
"0.5456537",
"0.545192",
"0.54377866",
"0.54006165",
"0.53852",
"0.5376811",
"0.53578496",
"0.5355015"
] | 0.71034986 | 6 |
Returns the players the current weapon | public Pair<Byte,Short> getCurrentWeapon(){
return this.currentWeapon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getWeapon() {\n return weapon1;\n }",
"public Weapon getWeapon(){\n return this.weaponPos;\n }",
"public List<CardWeapon> getWeapons() {\n return weapons;\n }",
"public Vector<EntityWeapon> getWeaponList();",
"public Weapon getWeapon() {\n\t\treturn weapon;\n\t}",
"public WeaponInterface getWeaponTab() {\r\n return player.getExtension(WeaponInterface.class);\r\n }",
"public Weapon[] getWeapons(){\n\t\tSystem.out.println(\"Creating Weapons...\");\n\t\tfor(int i=0; i<boardWeapons.length; i++){\n\t\t\tSystem.out.println(boardWeapons[i].getName());\n\t\t}\n\t\treturn boardWeapons;\n\t}",
"public ArrayList<Weapon> getWeapons() {\n return weapons;\n }",
"public ArrayList<Pair<Byte, Short>> getWeapons() {\n return weapons;\n }",
"public int getWeapons() {\n return weapons;\n }",
"public ArrayList<Weapon> getWeaponList() {\n return new ArrayList<>(weaponList);\n }",
"public ArrayList<WeaponClient> getWeapons() {\n return weapons;\n }",
"public String getWeaponName()\r\n\t{\r\n\t\treturn this.weaponName;\r\n\t}",
"public List<IWeapon> getWeaponsInventory(){\n return weaponsInventory;\n }",
"public String getEquippedWeapon()\n\t{\n\t\treturn strEquippedWeapon;\n\t\t\n\t}",
"public WeaponDeck getWeaponSpawnpoint() {\n return weaponSpawnpoint;\n }",
"public String getEquippedWeaponName() {\n return \"\";\n }",
"public Weapon useWeapon() {\n\t\tWeapon weapon = weaponList.get(weaponList.size() - 1);\n\t\tif(weaponList.size() > 1){\n\t\t\tweaponList.remove(weaponList.size() - 1);\n\t\t}\n\t\telse {\n\t\t}\n\t\treturn weapon;\n\t}",
"public List<Integer> getPurchasedWeapons() {\r\n\t\treturn collectionManager.getPurchasedWeapons();\r\n\t}",
"public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }",
"public WeaponDetails[] getWeaponsOnSquare() {\n return this.weaponsOnSquare;\n }",
"@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }",
"public int weaponCount(){\n\t\treturn weaponList.size();\n\t}",
"public WeaponType getEquippedWeaponType() {\n return WeaponType.NULL;\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 Card getWeapon(String weaponName) {\n return card.getWeapon(weaponName);\n }",
"public List<String> getWeaponCardList() {\n return weaponCardList;\n }",
"@Override\n\tpublic List<Player> getPlayer() {\n\t\treturn ofy().load().type(Player.class).list();\n\t}",
"@Nullable\n public Weapon getWeaponById(String weaponId) {\n return weapons.get(weaponId);\n }",
"public int getWeapLvl() {\n\t\treturn weaponLevel;\n\t}",
"@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}",
"private Card murderWeapon(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"weapons\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the weapon you think \" + murderer.getName() + \" killed Gunther in \" + location.getName() + \". Listed Below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < WEAPON_NAMES.length; i++) {\n ui.getInfo().addText(WEAPON_NAMES[i].toString().substring(0,1) + WEAPON_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n WeaponTypes murderWeapon = null;\n String weapon;\n\n // check the input from the user whether it is a weapon, help command, notes command or the wrong input\n do {\n weapon = ui.getCmd().getCommand().toLowerCase();\n switch (weapon) {\n case \"rope\":\n murderWeapon = WeaponTypes.ROPE;\n break;\n case \"dagger\":\n murderWeapon = WeaponTypes.DAGGER;\n break;\n case \"wrench\":\n murderWeapon = WeaponTypes.WRENCH;\n break;\n case \"pistol\":\n murderWeapon = WeaponTypes.PISTOL;\n break;\n case \"candlestick\":\n murderWeapon = WeaponTypes.CANDLESTICK;\n break;\n case \"pipe\":\n murderWeapon = WeaponTypes.PIPE;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Select a weapon from the list above for the questioning!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter a weapon from the list above for the questioning!\");\n break;\n }\n } while (murderWeapon == null); // while the player input was not a weapon\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderWeapon.toString()); // return a card with the murder weapon selected by the user\n }",
"public int getEquippedWeaponWeight() {\n return 0;\n }",
"public int getWeaponSlots() {\n return base.getWeaponSlots();\n }",
"public int getWeaponRange() {\n\t\treturn Math.round(type.getWeaponRange() * type.getItemLevelMultipliers()\n\t\t\t\t[level - 1]);\n\t}",
"public Strider getPlayer() {\n return player;\n }",
"public String printPlayerEquipment() {\r\n\t\t\treturn this.getPlayer().presentEquippedItems();\r\n\t\t}",
"ItemStack get(final Player player) {\r\n\t\tthis.update(player);\r\n\r\n\t\treturn this.playerHasTool ? this.getToolWhenHas() : this.getToolWhenHasnt();\r\n\t}",
"protected ClientList getCurrentPlayers() {\r\n\t\treturn this.players;\r\n\t}",
"public Set<Material> getAllowedWeapons()\r\n\t{\treturn Collections.unmodifiableSet(this.allowedWeapons);\t}",
"public int getWeaponDamage()\n\t{\n\t\treturn weaponDamage;\n\t}",
"public int getEquippedWeaponDamage() {\n return 0;\n }",
"public LinkedList<Byte> getWeaponEntry(){\n return this.weaponEntryTracker;\n }",
"public Set<String> getPlayers()\n\t{\n\t\tSet<String> player = playerPieces.keySet();\n\t\treturn player;\n\t}",
"public Player getPlayer();",
"public Player getPlayer();",
"public Player getCurrentPlayer(){\n return this.currentPlayer;\n }",
"public String getSelectedWeaponName() {\n return \"\";\n }",
"@Override\n public Type getItemType() {\n return Type.WEAPON;\n }",
"public List<Goods> getGoodsGivenBy(Player player) {\n List<Goods> goodsList = new ArrayList<Goods>();\n for (TradeItem ti : items) {\n if (ti instanceof GoodsTradeItem && player == ti.getSource()) {\n goodsList.add(((GoodsTradeItem)ti).getGoods());\n }\n }\n return goodsList;\n }",
"public void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }",
"private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/candlestick3.png\"), new Coordinate(2,3), \"Candlestick\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/knife1.png\"), new Coordinate(12,3), \"Knife\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/leadpipe1.png\"), new Coordinate(20,3), \"LeadPipe\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/rope1.png\"), new Coordinate(20,10), \"Rope\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/spanner1.png\"), new Coordinate(20,16), \"Wrench\"));\r\n\t\treturn weaps;\r\n\t}",
"public static Weapon spawnWeapon()\r\n\t{\r\n\t\tfinal int numberOfWeapons = 5; //update as weapons are added\r\n\t\t\r\n\t\t//Create weapons in order to access attributes / randomly select a weapon\r\n\t\tSword sword = new Sword();\r\n\t\tStick stick = new Stick();\r\n\t\tBazooka bazooka = new Bazooka();\r\n\t\tAtomicBomb atomicBomb = new AtomicBomb();\r\n\t\tPotatoCannon potatoCannon = new PotatoCannon();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWeapon[] weapons = new Weapon[] {sword, stick,bazooka,atomicBomb,potatoCannon}; //store weapons in an array to randomly grab one to use in Game\r\n\t\t\r\n\t\tint randomWeapon; //weapon chosen\t\t\r\n\t\tRandom rng = new Random (); //create generator based upon current number of weapons\r\n\t\trandomWeapon = rng.nextInt(numberOfWeapons); //get a weapon object at random from array\r\n\r\n\t\treturn (weapons[randomWeapon]); //we have no need to create separate instance\r\n\t}",
"public int getWeaponDamage()\n {\n \t\treturn mystuff.getWepDmg();\n }",
"public String StrongestWeapon() {\n\t\tString weapon = \"fists\";\n\t\tfor (Item temp: rooms.player.getItems()) {\t\t\t\t// Goes through all items in bag\n\t\t\tif (temp.getID() == \"pocket knife\" && !weapon.equals(\"wrench\")){ // Has pocket knife\n\t\t\t\tweapon = \"pocket knife\";\n\t\t\t}else if (temp.getID() == \"wrench\"){\t\t\t\t// Has wrench\n\t\t\t\tweapon = \"wrench\";\n\t\t\t}else if (temp.getID() == \"sword\"){\t\t\t\t\t// Has sword\n\t\t\t\treturn \"sword\";\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\treturn weapon;\n\t}",
"public List<CardWeapon> hasToReload() {\n List<CardWeapon> toReload = new ArrayList<>();\n for (CardWeapon cw : weapons)\n if(!cw.isLoaded())\n toReload.add(cw);\n if(toReload.isEmpty())\n return null;\n return toReload;\n }",
"protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }",
"public Player getPlayer() {\r\n return world.getPlayer();\r\n }",
"public Hashtable<Integer, Player> getPlayers() {\r\n\t\treturn players;\r\n\t}",
"public Player getPlayer() {\n return (roomPlayer);\n }",
"public List<OwnedWarp> getWarps(String player) {\n return warps.get(player);\n }",
"private WeaponSelection getWeaponSelection(List<Weapon> weapons, JSONObject message) {\n\t\tJSONArray jArray = createJSONWeaponList(weapons);\n\t\tmessage.put(\"list\", jArray);\n\t\tthis.sendInstruction(message);\n\n\t\tJSONObject selected = (JSONObject) JSONValue.parse(this.getResponse());\n\n\t\treturn parseWeaponSelection(selected);\n\t}",
"private HashMap<String, Weapon> readWeapons() {\n JSONObject weaponsData = getAssetJson(\"weapons.json\").getJSONObject(\"weapons\");\n HashMap<String, Weapon> weapons = new HashMap<>();\n\n for(String categoryName : weaponsData.keySet()) {\n Weapon.CATEGORY category = Weapon.CATEGORY.fromName(categoryName);\n JSONObject categoryWeaponsData = weaponsData.getJSONObject(categoryName);\n final String categoryPath = Weapon.BASE_PATH + categoryName + \"/\";\n\n for(String weaponId : categoryWeaponsData.keySet()) {\n JSONObject weaponData = categoryWeaponsData.getJSONObject(weaponId);\n\n weapons.put(\n weaponId,\n new Weapon(\n weaponId,\n weaponData.getString(NAME_KEY),\n category,\n weaponData.getInt(\"cost\"),\n resourceHandler.getImageResource(categoryPath + weaponId + \".png\")\n )\n );\n }\n }\n\n return weapons;\n }",
"public List<PlayerItem> getSpecific(int playerItemId);",
"public Pokemon getPlayerPokemon()\r\n {\r\n return playerPokemon;\r\n }",
"public Player getPlayer() {\n return me;\n }",
"public short getSiegeWeaponDamage();",
"private static Weapon randomWeapon() {\r\n Random rand = new Random();\r\n int weaponType = rand.nextInt(7);\r\n switch (weaponType) {\r\n case 0: \r\n return new FryingPan();\r\n case 1:\r\n return new SubmachineGun();\r\n case 2:\r\n return new AssaultRifle();\r\n case 3:\r\n return new Pistol();\r\n case 4:\r\n return new Axe();\r\n case 5:\r\n return new Crowbar();\r\n default:\r\n return new Shotgun();\r\n }\r\n }",
"public static ArrayList<Player> getWinners(){return winners;}",
"public String randWeapon() {\n\n\t\t// Generates a random number.\n\t\tRandom rand = new Random();\n\n\t\t// A random number between 0 and 2 is generated, and the value at that index in\n\t\t// the Choice array is then saved to the variable compChoice\n\t\tString compChoice = weapArray[rand.nextInt(3)];\n\n\t\t// Makes the users weapon equal to whichever weapon they inputed\n\t\tswitch (compChoice) {\n\n\t\tcase \"Rock\":\n\t\t\tweapon = new Rock();\n\t\t\tbreak;\n\t\tcase \"Paper\":\n\t\t\tweapon = new Paper();\n\t\t\tbreak;\n\t\tcase \"Scissors\":\n\t\t\tweapon = new Scissors();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn compChoice;\n\t}",
"public Player getActivePlayer() {\r\n return activePlayer;\r\n }",
"@Override\n public Enemy getEnemyPlayer() {\n return batMan.getEnemyPlayer();\n }",
"public IntrinsicWeapon getIntrinsicWeapon() {\r\n\t\treturn new IntrinsicWeapon(10, \"bombard\");\r\n\t}",
"public List<Player> getPlayers() {\r\n return players;\r\n }",
"public List<Player> getPlayers() {\r\n return players;\r\n }",
"String getPlayer();",
"public ArrayList<Gun> getGuns() {\n\t\tArrayList<Gun> guns = new ArrayList<Gun>(); \n\t\tfor (Item item : inventory) {\n\t\t\tif (item.asGun() != null) {\n\t\t\t\t guns.add(item.asGun());\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\treturn guns;\n\t }",
"public List<PlayerItem> getAllPlayerItemById(Player player);",
"public void equipSelectedWeapon() {\n }",
"public Player getPlayer() {\n return humanPlayer;\n }",
"public BulletPool getBulletPool()\n\t{\n\t\treturn bulletPool.getBulletPool(weapon);\n\t}",
"public Player getActivePlayer() {\n return activePlayer;\n }",
"@Override\n public List<Player> getPlayers() {\n return players;\n }",
"public WeaponType getSelectedWeaponType() {\n return WeaponType.NULL;\n }",
"public Weapon buildWeapon() {\n\t\tRandom rand = new Random();\n\t\tint chance = rand.nextInt(rangeMax - rangeMin) + rangeMin;\n\t\tfor (Weapon weapon: weapons) {\n\t\t\tif (weapon.isInSpawnRange(chance)) {\n\t\t\t\treturn weapon.clone();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n public Player getHumanPlayer() {\n return batMan.getHumanPlayer();\n }",
"public boolean hasWeapon() { \n\t\tif (weaponHeld == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public Player getPlayer()\r\n {\r\n return player;\r\n }",
"public Player getPlayer() {\r\n return player;\r\n }",
"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}",
"public Player[] getPlayers() {\n return this.players;\n }",
"public Player[] getPlayers() {\n return this.players;\n }",
"public Player getPlayer1(){\n return jugador1;\n }",
"public Player[] getPlayers() {\r\n return players;\r\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"Player getCurrentPlayer();"
] | [
"0.7264906",
"0.7192496",
"0.7186042",
"0.71088386",
"0.7056424",
"0.6995492",
"0.69537044",
"0.69418675",
"0.6901539",
"0.6808184",
"0.67971355",
"0.67832875",
"0.6781226",
"0.672919",
"0.6695176",
"0.6661268",
"0.6660214",
"0.65884274",
"0.65364283",
"0.6527571",
"0.6511832",
"0.64914",
"0.6424849",
"0.6396835",
"0.63611764",
"0.6324174",
"0.62936115",
"0.62899184",
"0.6284664",
"0.62727916",
"0.6229988",
"0.6221976",
"0.6204205",
"0.62015295",
"0.6141373",
"0.61378825",
"0.6072288",
"0.6067083",
"0.60606843",
"0.60606617",
"0.6051847",
"0.60457265",
"0.6004695",
"0.5990941",
"0.5970951",
"0.5970951",
"0.5969579",
"0.59599805",
"0.59529126",
"0.59467375",
"0.59194326",
"0.5908273",
"0.5904994",
"0.5879239",
"0.5878551",
"0.5868709",
"0.58617234",
"0.5855475",
"0.58551335",
"0.58480686",
"0.58477896",
"0.5845913",
"0.58425033",
"0.5838923",
"0.5831917",
"0.5830197",
"0.58244395",
"0.58202565",
"0.5817387",
"0.58114785",
"0.58098257",
"0.5804795",
"0.58030707",
"0.57940716",
"0.57940716",
"0.5793134",
"0.57826394",
"0.57781994",
"0.57779497",
"0.5777874",
"0.5763591",
"0.5761834",
"0.5759754",
"0.5759096",
"0.57590795",
"0.57574683",
"0.5754665",
"0.5751467",
"0.5747509",
"0.57455975",
"0.57395595",
"0.57395595",
"0.57392555",
"0.5736994",
"0.5734439",
"0.5734439",
"0.5734439",
"0.5734439",
"0.5734439",
"0.5732655"
] | 0.69242394 | 8 |
Sets the players current weapon | public void setCurrentWeapon(Pair<Byte,Short> weapon){
currentWeapon = weapon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setWeapon(int weapon)\n\t{\n\t\tthis.weapon = weapon;\n\t}",
"public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}",
"private void setWeapons()\n {\n sewers.setWeapon(woodSword);\n promenade.setWeapon(woodSword);\n depths.setWeapon(rustedSword);\n forest.setWeapon(goldSword);\n bridge.setWeapon(silverSpear);\n ramparts.setWeapon(infantryBow);\n }",
"@Override\n public void equip(@NotNull IWeapon weapon) {\n weapon.equipToMage(this);\n }",
"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 }",
"public void setWeaponDamage (int weaponDamage)\r\n\t{\r\n\t\tthis.weaponDamage = weaponDamage;\r\n\t}",
"public void selectWeapon( final int weaponIndex ) throws RemoteException {\r\n if ( weaponIndex < weapons.length ) {\r\n playerState.weaponIndex = weaponIndex;\r\n playerState.weapon = weapons[ playerState.weaponIndex ];\r\n }\r\n }",
"public void switchWeapon() {\n\t\tif (type == 0) {\n\t\t\ttype = 1;\n\t\t\tthis.setImage(getFilename(type, held));\n\t\t\tsetFocus();\n\t\t} else {\n\t\t\ttype = 0;\n\t\t\tthis.setImage(getFilename(type, held));\n\t\t\tsetFocus();\n\t\t} // end else\n\t}",
"public void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }",
"public void changeWeapon(String weaponName)\r\n\t{\r\n\t\tm_weapon.changeAttack(weaponName);\r\n\t}",
"public void changeWeapon(Graphics graphics) {\r\n\t\tlevelManager.changeWeapon(graphics);\r\n\t}",
"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 void equipSelectedWeapon() {\n }",
"public void updateWeapon(int currentWeaponId) {\r\n\t\tcollectionManager.updateWeapon(currentWeaponId);\r\n\t}",
"public void giveWeapon(Weapon weapon) throws RuntimeException {\n if (weaponList.size() > 2)\n throw new RuntimeException(\"This player can't receive any more weapons\");\n weaponList.add(weapon);\n }",
"private Card murderWeapon(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"weapons\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the weapon you think \" + murderer.getName() + \" killed Gunther in \" + location.getName() + \". Listed Below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < WEAPON_NAMES.length; i++) {\n ui.getInfo().addText(WEAPON_NAMES[i].toString().substring(0,1) + WEAPON_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n WeaponTypes murderWeapon = null;\n String weapon;\n\n // check the input from the user whether it is a weapon, help command, notes command or the wrong input\n do {\n weapon = ui.getCmd().getCommand().toLowerCase();\n switch (weapon) {\n case \"rope\":\n murderWeapon = WeaponTypes.ROPE;\n break;\n case \"dagger\":\n murderWeapon = WeaponTypes.DAGGER;\n break;\n case \"wrench\":\n murderWeapon = WeaponTypes.WRENCH;\n break;\n case \"pistol\":\n murderWeapon = WeaponTypes.PISTOL;\n break;\n case \"candlestick\":\n murderWeapon = WeaponTypes.CANDLESTICK;\n break;\n case \"pipe\":\n murderWeapon = WeaponTypes.PIPE;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Select a weapon from the list above for the questioning!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter a weapon from the list above for the questioning!\");\n break;\n }\n } while (murderWeapon == null); // while the player input was not a weapon\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderWeapon.toString()); // return a card with the murder weapon selected by the user\n }",
"public Weapon (Player player) {\n\t\tthis.player = player;\n\t}",
"public Weapon getWeapon(){\n return this.weaponPos;\n }",
"public void setWeaponSlots(int weaponSlots) {\n base.setWeaponSlots(weaponSlots);\n }",
"public void useWeapon(Character victim) {\n Weapons weapons = this.getInventory().getFirstWeapon();\n if (weapons == null)\n this.hit(victim);\n else {\n int vStrength = victim.getStrength();\n int mStrength = this.getStrength() * Hero.HERO_BONUS_OVER_ALL_CHARS + weapons.getDamage();\n if (vStrength >= mStrength) return;\n int strDif = mStrength - vStrength;\n int vLife = victim.getLife();\n vLife -= strDif;\n victim.setLife(vLife);\n this.getInventory().removeItems(weapons);\n }\n }",
"public String getWeapon() {\n return weapon1;\n }",
"public void setSiegeWeaponDamage(short siegeWeaponDamage);",
"public Weapon getWeapon() {\n\t\treturn weapon;\n\t}",
"public void setKeyFireWeapon(KeyCode fire) {\n this.fireWeapon = fire;\n }",
"public void selectWeaponFromInventory(int weaponIndex) {\n }",
"public void equipWeaponToCharacter (IPlayerCharacter character) {\n if (lenInventory > 1){\n character.equip(this.weaponsInventory.get(this.pointInventory));\n }\n }",
"public void toSelectingWeapon() {\n }",
"public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }",
"public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }",
"public void updateActiveWeapon() {\n activeWeaponText.setText(\"Weapon: \" + game.getPlayerComponent().getActiveWeapon().getWeaponType().getName());\n }",
"public void setWeapons(ArrayList<WeaponClient> weapons) {\n this.weapons = weapons;\n }",
"public void addWeapon(Weapon x){\n\t\tplayerWeapon=new Weapon(x);\n\t\tHealth+=x.gethealthStat();\n\t\tAttackForce+=x.getafStat();\n\t\tDefense+=x.getdefenseStat();\n\t}",
"public void setWeapons() {\n\t\tca_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew CapAmerWeapons(Battleground.captainAmerica).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\the_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew HawkeyeWeapons(Battleground.hawkeye).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tbw_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew BlackWidowWeapons(Battleground.blackWidow).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\thulk_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew HulkWeapons(Battleground.hulk).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tthor_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew ThorWeapons(Battleground.thor).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tloki_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew LokiWeapons(Battleground.loki).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t}",
"public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }",
"@Override\n public void useWeapon(ResponseInput responseMessage)\n {\n basicMode(((ResponseRocketLauncher) responseMessage).getTargetPlayerBasicMode(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringPlayerToMove(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringTargetToMove(), ((ResponseRocketLauncher) responseMessage).isWithFragWarhead() ) ;\n }",
"public void pickUpWeapon(CardWeapon weapon, CardWeapon weaponToWaste, List<CardPower> powerUp) throws InsufficientAmmoException, NoCardWeaponSpaceException {\n List <Color> tmp = new ArrayList<>(weapon.getPrice());\n List <CardPower> tmpPU = new ArrayList<>();\n if(this.weapons.size()== 3)\n if(weaponToWaste==null)\n throw new NoCardWeaponSpaceException();\n if(tmp.size() > 1)\n {\n tmp = tmp.subList(1, tmp.size());\n pay(tmp, powerUp);\n }\n if (weapons.size() == 3){\n this.position.getWeapons().add(weaponToWaste);\n this.weapons.remove(weaponToWaste);\n }\n this.weapons.add(weapon);\n weapon.setShooter(this);\n this.position.getWeapons().remove(weapon);\n if(game != null)\n game.notifyGrabWeapon(this,weapon, weaponToWaste);\n\n }",
"public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }",
"public final void receiveAttack(Weapon weapon) {\n this.availableLifePower = damageStrategy.processAttack(this, weapon);\n }",
"public void addWeapon(Weapon weapon) {\n setAttack(getAttack() + weapon.getDamage());\n setWeaponSlots(getWeaponSlots() - 1);\n }",
"public void attack(ItemWeapon w, Monster target) {\n\t\ttarget.takeDamage(w.getDamage()+level*20);\n\t}",
"private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }",
"public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}",
"public Weapon()\n {\n name = \"None\";\n speed = 2;\n damage = 1;\n range = 1;\n }",
"public static void giveStuff(GamePlayer player) {\r\n\t\tItemStack sword = new ItemStack(Material.WOOD_SWORD);\r\n\t\tItemStack bow = new ItemStack(Material.BOW);\r\n\t\tItemStack arrow = new ItemStack(Material.ARROW);\r\n\t\tItemStack compass = new ItemStack(Material.COMPASS);\r\n\t\tItemMeta compassMeta = sword.getItemMeta();\r\n\t\tItemMeta swordMeta = sword.getItemMeta();\r\n\t\tItemMeta bowMeta = sword.getItemMeta();\r\n\t\t\r\n\t\tplayer.getPlayer().getInventory().clear();\r\n\t\tswordMeta.spigot().setUnbreakable(true);\r\n\t\tsword.setItemMeta(swordMeta);\r\n\t\tsword.setAmount(1);\r\n\t\t\r\n\t\tbowMeta.spigot().setUnbreakable(true);\r\n\t\tbowMeta.setDisplayName(\"§aSniper§r §7(One Shot Kill)\");\r\n\t\tbow.setItemMeta(bowMeta);\r\n\t\tbow.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 10);\r\n\t\tbow.setAmount(1);\r\n\t\t\r\n\t\tarrow.setAmount(1);\r\n\t\t\r\n\t\tcompassMeta.setDisplayName(\"§aTarget Tracker\");\r\n\t\tcompass.setItemMeta(compassMeta);\r\n\t\tcompass.setAmount(1);\r\n\t\t\r\n player.getPlayer().getInventory().addItem(sword);\r\n player.getPlayer().getInventory().addItem(bow);\r\n player.getPlayer().getInventory().addItem(arrow);\r\n player.getPlayer().getInventory().addItem(compass);\r\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 static void showCombatInterface(Player player, int weapon) {\n\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\tfor (int i = 0; i < unarmedItemNames.length; i++) {\n\t\t\tif (itemName.toLowerCase().equals(unarmedItemNames[i])) {\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5855); // punch, kick, block\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 5857);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tCombatInterface.updateClickedCombatStyle(player);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tboolean doNotChange = false;\n\t\tif ((GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705);\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"whip\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"abyssal tentacle\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 12290); // flick, lash, deflect\n\t\t\tplayer.getPA().sendFrame246(12291, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 12293);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"chinchompa\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 27500); // first param\n\t\t\tplayer.getPA().sendFrame126(itemName, 27503); // first param + 2\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"dagger\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"bow\") || itemName.toLowerCase().contains(\"ballista\") || itemName.toLowerCase().contains(\"cannon\") || itemName.toLowerCase().contains(\"javelin\") || itemName.toLowerCase().contains(\"throwing\") || itemName.toLowerCase().contains(\"dragon thrownaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1764); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(1765, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1767);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (!itemName.toLowerCase().contains(\"saradomin sword\") && !itemName.toLowerCase().contains(\"blessed sword\") && !itemName.toLowerCase().contains(\"2h\") && (\n\t\t\t\titemName.toLowerCase().contains(\"rapier\") || itemName.toLowerCase().contains(\"sword\") && !itemName.toLowerCase().contains(\"godsword\") && !itemName.toLowerCase()\n\t\t\t\t .contains(\n\t\t\t\t\t\t \"longsword\"))\n\t\t\t\t|| itemName.toLowerCase().contains(\"toktz-xil-ek\") || itemName.toLowerCase().contains(\"toktz-xil-ak\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t} else if (itemName.toLowerCase().contains(\"staff\") || itemName.toLowerCase().contains(\"wand\") || itemName.toLowerCase().contains(\"staff of light\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"trident\") || itemName.toLowerCase().contains(\"thammaron's sceptre\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 328); // bash, pound, focus.\n\t\t\tplayer.getPA().sendFrame246(329, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 331);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"dart\") || itemName.toLowerCase().contains(\"knife\") || itemName.toLowerCase().contains(\"blowpipe\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"toktz-xil-ul\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4446); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(4447, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4449);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (itemName.toLowerCase().contains(\"pickaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5570); // spike, impale, smash, block\n\t\t\tplayer.getPA().sendFrame246(5571, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 5573);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"axe\") || itemName.toLowerCase().contains(\"hatchet\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1698); // chop, hack, smash, block\n\t\t\tplayer.getPA().sendFrame246(1699, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1701);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"claws\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 7762);\n\t\t\tplayer.getPA().sendFrame246(7763, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 7765);\n\t\t} else if (itemName.toLowerCase().contains(\"halberd\") || itemName.toLowerCase().contains(\"scythe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 8460); // jab, swipe, fend\n\t\t\tplayer.getPA().sendFrame246(8461, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 8463);\n\t\t\treAdjustCombatStyle(player, \"ACCURATE\", ServerConstants.AGGRESSIVE);\n\t\t} else if (itemName.toLowerCase().contains(\"spear\") || itemName.toLowerCase().contains(\"hasta\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4679); // lunge, swipe, pound, block\n\t\t\tplayer.getPA().sendFrame246(4680, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4682);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE ACCURATE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"mace\") || itemName.toLowerCase().contains(\"barrelchest\") || itemName.toLowerCase().contains(\"flail\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"cane\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 3796);\n\t\t\tplayer.getPA().sendFrame246(3797, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 3799);\n\t\t} else if (itemName.toLowerCase().contains(\"maul\") || itemName.toLowerCase().contains(\"hammer\") || itemName.toLowerCase().contains(\"tzhaar-ket-om\")\n\t\t || itemName.toLowerCase().contains(\"dinh's\") || itemName.contains(\"spade\") || itemName.contains(\"club\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"godsword\") || itemName.toLowerCase().contains(\"2h\") || itemName.toLowerCase().contains(\"saradomin sword\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"sara's blessed sword\")\n\t\t\t\t|| (GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705); // Godsword.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2423); // chop, slash, lunge, block\n\t\t\tplayer.getPA().sendFrame246(2424, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2426);\n\t\t}\n\t\tswitch (weapon) {\n\t\t\tcase 20779:\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tdoNotChange = true;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Whip is the only main weapon where the aggressive option is controlled, so make it easier by if i use whip and switch to another weapon, it puts the other weapon\n\t\t//on aggressive instead of longrange/lunge.\n\t\tif (player.wasWearingAggressiveSharedXpWeapon && !doNotChange) {\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t}\n\t\tplayer.wasWearingAggressiveSharedXpWeapon = false;\n\t\tCombatInterface.updateClickedCombatStyle(player);\n\t}",
"public Weapon(Player player)\n\t{\n\t\tthis.bullets=new ArrayList<Bullet>();\n\t\tthis.player=player;\n\t\tpause = cooldown;\n\t}",
"@Override\n public void setEquippedItem(IEquipableItem item) {}",
"public void setDamage(int damage) {\n\t\tWeapon.itemDamage = damage;\n\t}",
"public void fire(Vector2 dir, Vector2 weaponPos, Boolean multiplayer) {\n\t\t\n\t}",
"public void addWeapon(Pair<Byte,Short> weapon){\n //Total number of weapons player can carry is 5 (inc. default weapon)\n //If player has <3 weapons, simply add weapon.\n //Otherwise, first remove oldest weapon in inventory then add at that\n //position.\n //oldest weapon tracked by linked list of weapon entries.\n if(this.weapons.size() < 3) {\n this.weapons.add(weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n }else{\n //Checks for duplicates, if duplicate weapons\n //found, new weapons ammo is just added to the current\n //weapon already in inventory\n for(Pair<Byte,Short> w : this.weapons){\n if(Objects.equals(w.getKey(), weapon.getKey())){\n if(weaponEntryTracker.size() == 1){\n weaponEntryTracker = new LinkedList<>();\n }\n else{\n for(int tracker : weaponEntryTracker){\n if(tracker == this.weapons.indexOf(w)){\n weaponEntryTracker.remove((Integer) tracker);\n }\n }\n }\n Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));\n if(this.currentWeapon == w){\n this.setCurrentWeapon(newWeapon);\n }\n this.weapons.set(this.weapons.indexOf(w),newWeapon);\n weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));\n return;\n }\n }\n //check for any no weapon entries - indicates\n //player dropped weapon.\n for(Pair<Byte,Short> w : this.weapons){\n if(w.getKey() == NO_WEAPON_ID){\n this.weapons.set(this.weapons.indexOf(w),weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n return;\n }\n }\n //If no null entries are found, remove oldest weapon\n int oldestWeapon = this.weaponEntryTracker.poll();\n byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();\n this.weapons.set(oldestWeapon, weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n if(oldestWeaponKey == currentWeapon.getKey()){\n setCurrentWeapon(weapon);\n }\n\n }\n }",
"public Weapon useWeapon() {\n\t\tWeapon weapon = weaponList.get(weaponList.size() - 1);\n\t\tif(weaponList.size() > 1){\n\t\t\tweaponList.remove(weaponList.size() - 1);\n\t\t}\n\t\telse {\n\t\t}\n\t\treturn weapon;\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 static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }",
"public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}",
"public Pair<Byte,Short> getCurrentWeapon(){\n return this.currentWeapon;\n }",
"public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}",
"@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}",
"public void addSpawnpointWeapon(Weapon w) {\n this.weaponSpawnpoint.addWeapon(w);\n }",
"protected void addAllowedWeapon(Material weapon) {\r\n\t\tthis.allowedWeapons.add(weapon);\r\n\t}",
"public void setToPlayer(Player player)\n \t{\n \t\t// Define the inventory\n \t\tPlayerInventory inventory = player.getInventory();\n \n \t\t// Clear it all first\n \t\tinventory.clear();\n \t\tinventory.setHelmet(new ItemStack(Material.AIR));\n \t\tinventory.setChestplate(new ItemStack(Material.AIR));\n \t\tinventory.setLeggings(new ItemStack(Material.AIR));\n \t\tinventory.setBoots(new ItemStack(Material.AIR));\n \n \t\t// Set the armor contents\n \t\tif(this.helmet != null) inventory.setHelmet(this.helmet.toItemStack());\n \t\tif(this.chestplate != null) inventory.setChestplate(this.chestplate.toItemStack());\n \t\tif(this.leggings != null) inventory.setLeggings(this.leggings.toItemStack());\n \t\tif(this.boots != null) inventory.setBoots(this.boots.toItemStack());\n \n \t\t// Set items\n \t\tfor(int i = 0; i < 35; i++)\n \t\t{\n\t\t\tinventory.setItem(i, this.items[i].toItemStack());\n \t\t}\n \n \t\t// Delete\n \t\tDemigodsData.jOhm.delete(PlayerCharacterInventory.class, id);\n \t}",
"public final void setFuelUpgrade(int fuelUp){fuelUpgrade = fuelUp;}",
"public PickupWeaponBase(Vec2 position, WeaponBase weaponBarrel) {\n super(position, Vec2.ZERO, new Sprite(\"items/weaponBody\"));\n setSize(new Vec2(0.7, 0.7));\n setRenderLayer(RenderLayer.RenderLayerName.HIGH_BLOCKS);\n\n this.cli = weaponBarrel;\n\n collider = new CircleCollider(this, 30);\n collider.setTag(\"Item\");\n collider.addInteractionLayer(\"Walk\");\n\n }",
"public Weapon ()\r\n\t{\r\n\t\t//no default values for Weapon attributes are set here as the specific weapon type unspecified at super level\r\n\t}",
"public String getWeaponName()\r\n\t{\r\n\t\treturn this.weaponName;\r\n\t}",
"public void setAmmo(final boolean x) {\n int ammodif = 0;\n switch (Engine.currentWeapon) {\n\n case 2:\n ammodif = maxshotgunAmmo - shotgunAmmo;\n if (x) {\n if (ammodif < 10) {\n shotgunAmmo += ammodif;\n } else {\n shotgunAmmo += 10;\n }\n } else {\n shotgunAmmo--;\n if (shotgunAmmo == 0) {\n shotgunAmmo = 0;\n }\n\n }\n\n break;\n case 3:\n ammodif = maxrifleAmmo - rifleAmmo;\n if (x) {\n if (ammodif < 20) {\n rifleAmmo += ammodif;\n } else {\n rifleAmmo += 20;\n }\n } else {\n rifleAmmo--;\n if (rifleAmmo == 0) {\n rifleAmmo = 0;\n }\n }\n\n break;\n case 4:\n ammodif = maxgranadelauncherAmmo - granadeLauncherAmmo;\n if (x) {\n if (ammodif < 10) {\n granadeLauncherAmmo += ammodif;\n } else {\n granadeLauncherAmmo += 10;\n }\n } else {\n granadeLauncherAmmo--;\n if (granadeLauncherAmmo == 0) {\n granadeLauncherAmmo = 0;\n }\n }\n\n break;\n }\n }",
"public void shoot() {\n\t\tgetWeapon().triggerMain();\n\t\tsetShooting(true);\n\t}",
"public void setWeaponCardsAndPieces() {\n List<WeaponCard> weaponCards = new ArrayList<>(); // empty list for the new weapon cards\n List<WeaponPiece> weaponPieces = new ArrayList<>(); // empty list for the new weapon pieces\n\n Data data = new Data(\"data.json\"); // read data from data.json\n JSONObject weaponData = (JSONObject) data.getJsonData().get(\"Weapons\"); // get the weapon data from the data\n for (int i = 0; i < 6; i++) { // for loop 0 to 5\n String weaponName = String.valueOf(weaponData.get(String.valueOf(i))); // get the weapon name\n //Make and add weaponCard and WeaponPiece to their specified lists.\n weaponCards.add(new WeaponCard(weaponName));\n weaponPieces.add(new WeaponPiece(weaponName));\n }\n //Assign the lists into their class variables\n this.weaponCards = weaponCards;\n this.weaponPieces = weaponPieces;\n }",
"public void changeGuns(int mode, EntityManager manager) {\r\n manager.setAmmoType(mode);\r\n firingMode = mode;\r\n shotTimeout = 0;\r\n this.setTexture(textureList.get(mode));\r\n switch (mode) {\r\n case 0:\r\n shotInterval = 300;\r\n break;\r\n case 1:\r\n shotInterval = 600;\r\n break;\r\n case 2:\r\n shotInterval = 10000;\r\n break;\r\n case 3:\r\n shotInterval = 3000;\r\n break;\r\n case 4:\r\n shotInterval = 300;\r\n break;\r\n case 5:\r\n shotInterval = 1500;\r\n break;\r\n }\r\n }",
"public Weapon(String name, int weaponDamage) \n\t{\n\t\tsuper(name);\n\t\tif(weaponDamage > 0) \n\t\t{\n\t\t\tthis.weaponDamage = weaponDamage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tthis.weaponDamage = 1;\n\t\t}\n\t}",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"@Override\n public Type getItemType() {\n return Type.WEAPON;\n }",
"public ShotgunWeapon() {\n description = \" Weapon: Shotgun has\";\n }",
"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 void add(Weapon weapon) {\n\t\tweaponList.add(weapon);\n\t}",
"public void equip(Hero h) {\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.getName().equals(this.getName())) {\n\t\t\t\tw.setEquipped(true);\n\t\t\t\tw.statsIncrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t} else {\n\t\t\t\tw.unequip(h);\n\t\t\t}\n\t\t}\n\t}",
"void setCurrentHP(final int newHP);",
"public String getEquippedWeapon()\n\t{\n\t\treturn strEquippedWeapon;\n\t\t\n\t}",
"public static void giveKIT(Player p) {\r\n\t\tp.getInventory().clear();\r\n\t\tfor (String kitget : kit.keySet()) {\r\n\t\t\tString[] kitdojogador = kit.get(kitget).split(\":\");\r\n\t\t\tString kit1 = kitdojogador[0];\r\n\t\t\tString kit2 = kitdojogador[1];\r\n\t\t\tif (kit1.equalsIgnoreCase(\"PvP\") || kit2.equalsIgnoreCase(\"PvP\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.WOOD_SWORD));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Archer\") || kit2.equalsIgnoreCase(\"Minerador\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.BOW));\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.ARROW, 10));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Barbarian\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.WOOD_SWORD));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Beastmaster\")) {\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.BONE, 3));\r\n\t\t\t\tp.getInventory().addItem(new ItemStack(Material.MONSTER_EGG, 3, EntityType.WOLF.getTypeId()));\r\n\t\t\t}\r\n\t\t\tif (kit1.equalsIgnoreCase(\"Grandpa\")) {\r\n\t\t\t\tItemStack g = new ItemStack(Material.STICK);\r\n\t\t\t\tItemMeta gm =g.getItemMeta();\r\n\t\t\t\tgm.addEnchant(Enchantment.KNOCKBACK, 2, true);\r\n\t\t\t\tg.setItemMeta(gm);\r\n\t\t\t\tp.getInventory().addItem(g);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }",
"public Weapon() {\n this(Weapon.defaultName, 0, new Level(0), 0, 0);\n }",
"private Weapon() {\n\t\t\tname = \"\";\n\t\t\tdamage = 0;\n\t\t\tcrippleDamage = 0;\n\t\t\tflavors = new HashMap<>();\n\t\t}",
"public void attack(Player player) {\n this.damage = 18 - player.getfPoint(); // the higher the Fighter skill,\n // the lower the damage. change the math.\n int newHealth = player.getShip().getHealth() - damage;\n player.getShip().setHealth(newHealth);\n }",
"public void changeActiveMonster(){\n //todo\n }",
"public void add(Weapon weapon){\n\t\tsetCount(getCount() + weapon.getCount());\n\t\tweapon.expire();\n\t}",
"public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }",
"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 public void applyItem() {\n Player player;\n if (Battle.getRunningBattle().getTurn() % 2 == 1)\n player = Battle.getRunningBattle().getPlayer2();\n else\n player = Battle.getRunningBattle().getPlayer1();\n\n if (player.getInGameCards().size() == 0)\n return;\n Random random = new Random();\n int randomIndex = random.nextInt(player.getInGameCards().size());\n while (!(getPlayer().getInGameCards().get(randomIndex) instanceof Warrior)) {\n randomIndex = random.nextInt(getPlayer().getInGameCards().size());\n }\n\n Buff buff = new PoisonBuff(1, true);\n buff.setWarrior((Warrior) player.getInGameCards().get(randomIndex));\n Battle.getRunningBattle().getPassiveBuffs().add(buff);\n }",
"public Characters() {\n setWeapon(weapon);\n }",
"@POST(\"/UpdateWeapon\")\n\tWeapon updateWeapon(@Body Weapon weapon,@Body int id) throws GameNotFoundException;",
"public void setCurHealth(int modifier) {\n\t\tcurHealth = curHealth + modifier;\n\t}",
"protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty)\n {\n super.setEquipmentBasedOnDifficulty(difficulty);\n switch (getProfession() % 3) {\n case 0:\n this.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(ItemManager.BOKOSTICK));\n this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(-0.5D);\n break;\n case 1:\n this.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(ItemManager.MACHETE));\n this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(-1.5D);\n this.setItemStackToSlot(EntityEquipmentSlot.OFFHAND, new ItemStack(Items.SHIELD));\n this.getEntityAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(2.0D);\n break;\n case 2:\n this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(0.5D);\n }\n }",
"public static void updateEquipment(Player player) {\n\t\tCombat.updatePlayerStance(player);\n\t}",
"public void add(Weapon weapon) {\n\t\tif (weaponList.size() < 2) {\n\t\t\tweaponList.add(weapon);\n\t\t}\n\t}",
"public void usePotion() {\n Potion potion = this.getInventory().getFirstPotion();\n if (potion != null){\n this.setLife(this.getLife() + potion.getGainLife());\n this.getInventory().removeItems(potion);\n }\n }",
"public String getEquippedWeaponName() {\n return \"\";\n }",
"public void shoot() {\n _shooterMotor1.set(_targetRPM);\n }",
"public void addWeapon(CardWeapon cw)\n {\n this.weapons.add(cw);\n }",
"public IntrinsicWeapon getIntrinsicWeapon() {\r\n\t\treturn new IntrinsicWeapon(10, \"bombard\");\r\n\t}",
"public void setPower(JsonObject instanceInfo) {\n itemPower = instanceInfo.getAsJsonObject(\"instance\").getAsJsonObject(\"data\").getAsJsonObject(\"primaryStat\").getAsJsonPrimitive(\"value\").toString();\n }"
] | [
"0.788474",
"0.7398572",
"0.7216115",
"0.6995609",
"0.69676083",
"0.6890988",
"0.68407184",
"0.6785024",
"0.67615086",
"0.67583436",
"0.6745955",
"0.66746354",
"0.65761876",
"0.6535986",
"0.6511023",
"0.64366776",
"0.6421407",
"0.64186573",
"0.640123",
"0.639851",
"0.6395537",
"0.6352001",
"0.6328685",
"0.6311137",
"0.630617",
"0.63058716",
"0.62656075",
"0.6256581",
"0.6227107",
"0.6212934",
"0.6205768",
"0.6194048",
"0.61361533",
"0.6133817",
"0.611849",
"0.6116042",
"0.6100571",
"0.6098556",
"0.6064897",
"0.6063283",
"0.60583556",
"0.6003217",
"0.59970254",
"0.596894",
"0.59636545",
"0.5958443",
"0.595555",
"0.595079",
"0.5929",
"0.5911766",
"0.58988804",
"0.5898848",
"0.58988124",
"0.5888027",
"0.58663046",
"0.58629435",
"0.58464074",
"0.584048",
"0.58254355",
"0.5811409",
"0.58042884",
"0.57962507",
"0.57807493",
"0.57630384",
"0.5761213",
"0.5758786",
"0.57546425",
"0.57521075",
"0.57417345",
"0.57385385",
"0.5735315",
"0.57250243",
"0.5715667",
"0.5711429",
"0.57021093",
"0.5696597",
"0.56853205",
"0.56824636",
"0.5679621",
"0.5655509",
"0.5630856",
"0.5625641",
"0.56249285",
"0.5614538",
"0.56058985",
"0.560341",
"0.55940425",
"0.55939823",
"0.5593399",
"0.5588027",
"0.5577262",
"0.55600846",
"0.555361",
"0.55490524",
"0.554443",
"0.55400854",
"0.5535687",
"0.5535518",
"0.5535218",
"0.5531327"
] | 0.80616504 | 0 |
Returns the list of bullets fired by the player | public ArrayList<Bullet> getBulletsFired(){
return this.bulletsFired;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<AProjectile> getBullets() {\n return bullets;\n }",
"public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }",
"public ArrayList<Bullet> getNewBullets()\r\n\t{\r\n\t\tArrayList<Bullet> fire = new ArrayList<Bullet>();\r\n\t\tfor (Bullet bullet : bullets)\r\n\t\t{\r\n\t\t\tif (bullet instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\tfire.add(new AvatarBullet((AvatarBullet) bullet));\r\n\t\t\t}\r\n\t\t\telse if (bullet instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tfire.add(new EnemyBullet((EnemyBullet) bullet));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fire;\r\n\t}",
"protected ArrayList<Bullet> getBullets()\r\n\t{\r\n\t\treturn bullets;\r\n\t}",
"public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}",
"public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }",
"public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }",
"public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }",
"public List<Projectile> getFiredProjectiles()\n {\n return new ArrayList<Projectile>(firedArrows);\n }",
"public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }",
"void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}",
"public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }",
"public Bullet[] getBullets()\n\t{\n\t\treturn Arrays.copyOf(bullets.toArray(), bullets.size(), Bullet[].class);\n\t\t//return (Bullet[])bullets.toArray();\n\t}",
"private void multiBulletFire() {\n\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 20, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) - 10, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 50, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t}",
"public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}",
"public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }",
"private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }",
"public void enemyShoot()\r\n\t{\r\n\t\tfor (Enemy enemies : enemy)\r\n\t\t{\r\n\t\t\tif (enemies.getHasFired())\r\n\t\t\t{\r\n\t\t\t\tBullet enemyPew = enemies.shoot();\r\n\t\t\t\tif (enemyPew != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.add(enemyPew);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }",
"private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}",
"public Bullet getHitBullet() {\n\t\treturn hitBullet;\n\t}",
"public Bullet getBullet() {\n\t\treturn bullet;\n\t}",
"public void setBulletsFired(ArrayList<Bullet> bullets) {\n if(!bulletsFired.isEmpty()) {\n //System.out.println(bullets.get(0).getxPos() != bulletsFired.get(0).getxPos());\n this.bulletsFired = bullets;\n }\n }",
"public Bullet getBullet() {\r\n\t\treturn this.bullet;\r\n\t}",
"public Image getBulletImg(){ \n return SpriteSheet.playerProjectileSprites[this.frameNumber]; \n }",
"@Override\n public Bullet getBullet() {\n return new EnemyGunBullet1();\n }",
"private void quickFireBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Pink\"));\n\t}",
"public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }",
"public List<BossBullet> getBossBullets() {\n\t\treturn bossBullet;\n\t}",
"@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }",
"public M_Bullet shoot() {\n Point leftCorner = this.getLocation();\n // get the center of the character\n int x = leftCorner.x;\n int y = leftCorner.y;\n Point dim = this.getDimensions();\n int h = dim.y;\n int w = dim.x;\n h = h / 2;\n w = w / 2;\n Point center = new Point(x + w, y + h);\n // get the velocity for the bullet\n Point vel = new Point(this.getDirection() * 3, 0);\n // set the enemy's shot cooldown to its shot interval.\n setShotCooldown(getShotInterval());\n // return the new bullet\n return new M_Bullet(center, this.getStrength(), vel, true);\n }",
"public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }",
"public Image getBulletsImage() {\n return bulletsImage;\n }",
"void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}",
"public boolean IsBullet()\r\n {\r\n return this.isBullet;\r\n }",
"public void shoot(int bulletLeft) {\n float xValue = canon.getX();\n float yValue = canon.getY();\n bullets.get(bulletLeft).setVisibility(View.VISIBLE);\n shootingMotion(bullets.get(bulletLeft), xValue, yValue);\n\n }",
"public abstract ArrayList<GameObject> fight();",
"public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }",
"public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}",
"public void fire() {\n\n\t\t// A player cannot continually fire, there is a delay between each bullet.\n\t\tif (isAbleToFire) {\n\n\t\t\taudio.playMusic(\"Audio/Fire.wav\");\n\n\t\t\tif (multiBulletIsActive) {\n\n\t\t\t\tmultiBulletFire();\n\n\t\t\t} else if (speedBulletIsActive) {\n\n\t\t\t\tspeedBulletFire();\n\n\t\t\t} else if (quickFireBulletIsActive) {\n\n\t\t\t\tquickFireBulletFire();\n\n\t\t\t} else {\n\n\t\t\t\t// Single fire.\n\t\t\t\t// Adjust bullet position to be fired from the center of the player.\n\t\t\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition,\n\t\t\t\t\t\tbulletWidth, bulletHeight, \"Red\"));\n\t\t\t}\n\n\t\t\t// Stop the player from being able to fire for 'ticksBetweemFire' amount.\n\t\t\tticksToNextFire = currentTickCount + ticksBetweenFire;\n\t\t}\n\t}",
"public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }",
"@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}",
"public Vector<EntityWeapon> getWeaponList();",
"@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}",
"public ImageIcon getBullet() {\n\t\treturn imgBullet;\n\t}",
"List<Player> getPlayers();",
"List<Player> listPlayers();",
"public void fireBullet(int direction , int posX, int posY ){\n if ( clockBullet.getElapsedTime().asMilliseconds() > 100 ){\n int lowestbulletNo = 10;\n for( int i = 9; i > 0; i-- ){\n if ( bulletSpace.get(i).isEnabled() == false){\n lowestbulletNo = i;//find the first bullet in the gun barrol\n }\n }\n\n if ( lowestbulletNo < 10 ){\n bulletSpace.get(lowestbulletNo).setDirection(direction);\n bulletSpace.get(lowestbulletNo).setDistance(0);\n bulletSpace.get(lowestbulletNo).setPosX(posX - map.getX()) ;\n bulletSpace.get(lowestbulletNo).setPosY(posY - map.getY()) ;\n bulletSpace.get(lowestbulletNo).enabled(true);\n bulletSpace.get(lowestbulletNo).setRotation(direction+1);\n }\n }\n clockBullet.restart();\n }",
"public void avatarShoot()\r\n\t{\r\n\t\tBullet avatarPew = avatar.shoot();\r\n\t\tif (avatarPew!= null)\r\n\t\t{\r\n\t\t\tbullets.add(avatarPew);\r\n\t\t}\r\n\t}",
"@Override\r\n public int fire() {\r\n if (this.getBulletsCount() == 0) {\r\n return 0;\r\n }\r\n this.setBulletsCount(this.getBulletsCount() - 10);\r\n return 10;\r\n }",
"public void fire() {\n \tAlienMissile.Slope slps[] = {AlienMissile.Slope.ShallowLeft, \n AlienMissile.Slope.Down,\n AlienMissile.Slope.ShallowRight};\n for (AlienMissile.Slope i : slps) {\n AlienMissile m = new AlienMissile(this, i);\n m.setBounce(true, health/5);\n list.add(m);\n }\n }",
"private void clearBullet()\n {\n if(playerBullets.size() > 0)\n {\n for(int i = 0; i < playerBullets.size(); ++i)\n {\n int x = playerBullets.get(i).getRectangle().centerX(), y = playerBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n playerBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n if(enemyBullets.size() > 0)\n {\n for(int i = 0; i < enemyBullets.size(); ++i)\n {\n int x = enemyBullets.get(i).getRectangle().centerX(), y = enemyBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n enemyBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n }",
"private void speedBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Yellow\"));\n\n\t\tfor (int i = 0; i < bulletArrayList.size(); i++) {\n\t\t\tbulletArrayList.get(i).setSpeed(5);\n\t\t}\n\t}",
"@Override\n public void update(GameContainer gc, StateBasedGame stateBasedGame, int delta) throws SlickException {\n timeSinceStart += delta;\n rtimeSinceStart += delta;\n Input input = gc.getInput();\n int mouseX = input.getMouseX();\n int mouseY = input.getMouseY();\n\n\n basicbulletSheet.rotate(90f);\n basicbulletSheet.setCenterOfRotation(16, 16);\n\n // Move this bullet\n for (int i = 0; i < bulletList.size(); i++) {\n bullet = bulletList.get(i);\n bullet.move();\n }\n\n //Add this tower to the this towerList\n if (Tower.isBasicPlaced()) {\n basicTowers.add(new BasicTower());\n System.out.println(basicTowers);\n Tower.setBasicPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isBomberPlaced()) {\n bomberTowers.add(new BomberTower());\n System.out.println(bomberTowers);\n Tower.setBomberPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isSniperPlaced()) {\n sniperTowers.add(new SniperTower());\n System.out.println(sniperTowers);\n Tower.setSniperPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isQuickPlaced()) {\n quickTowers.add(new QuickTower());\n System.out.println(quickTowers);\n Tower.setQuickPlaced(false);\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BasicTower basicTower1 : basicTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > basicTower1.rcoolDown + basicTower1.rlastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n basicTower1.basicClicked.setRotation((float) getTargetAngle(basicTower1.towerX,\n basicTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n basicTower1.basicClicked.setCenterOfRotation(32, 32);\n basicTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > basicTower1.coolDown + basicTower1.lastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n addNewBullet2(basicTower1.towerX, basicTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n basicTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BomberTower bomberTower1 : bomberTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > bomberTower1.rcoolDown + bomberTower1.rlastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n bomberTower1.bomberClicked.setRotation((float) getTargetAngle(bomberTower1.bombertowerX,\n bomberTower1.bombertowerY, enemy.getStartPosX(), enemy.getStartPosY()));\n bomberTower1.bomberClicked.setCenterOfRotation(32, 32);\n bomberTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > bomberTower1.coolDown + bomberTower1.lastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n addNewBullet2(bomberTower1.bombertowerX, bomberTower1.bombertowerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n bomberTower1.lastShot = timeSinceStart;\n }\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (SniperTower sniperTower1 : sniperTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > sniperTower1.rcoolDown + sniperTower1.rlastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n sniperTower1.sniperClicked.setRotation((float) getTargetAngle(sniperTower1.towerX,\n sniperTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n sniperTower1.sniperClicked.setCenterOfRotation(32, 32);\n sniperTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n if (timeSinceStart > sniperTower1.coolDown + sniperTower1.lastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n addNewBullet2(sniperTower1.towerX, sniperTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 50);\n sniperTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (QuickTower quickTower1 : quickTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > quickTower1.rcoolDown + quickTower1.rlastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n quickTower1.quickClicked.setRotation((float) getTargetAngle(quickTower1.towerX,\n quickTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n quickTower1.quickClicked.setCenterOfRotation(32, 32);\n quickTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n\n if (timeSinceStart > quickTower1.coolDown + quickTower1.lastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n radiusVisited = true;\n addNewBullet2(quickTower1.towerX, quickTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 5);\n quickTower1.lastShot = timeSinceStart;\n }\n }\n\n }\n }\n\n //A spawn is in progress\n if (spawninProgress) {\n timePassedEnemy += delta;\n if (timePassedEnemy > 800) {\n enemies.add(new Enemy());\n enemySpawns++;\n timePassedEnemy = 0;\n }\n }\n //When enough enemies has spawned, stop the spawninProgress\n if (enemySpawns == enemyCounter) {\n spawninProgress = false;\n //hasbeenDead = false;\n enemySpawns = 0;\n enemyCounter++;\n }\n\n //When no more enemies on maps\n if (enemies.size() == 0) {\n waveinProgress = false;\n startWaveCount = 0;\n }\n\n //Start a new level when there's no more enemies on the map\n if (loadMap.MAP[mouseY / w][mouseX / w] == 16) {\n if (input.isMousePressed(0) && startWaveCount == 0 && !waveinProgress) {\n startWaveCount++;\n if (startWaveCount == 1 && enemies.size() == 0 && !waveinProgress) {\n waveinProgress = true;\n gc.resume();\n spawninProgress = true;\n currentLevel++;\n }\n }\n }\n\n //For each new level, increase the HP of each enemy\n if (currentLevel < currentLevel + 1 && !waveinProgress) {\n for (Enemy enemyHP : enemies) {\n if (enemyHP.getStartPosX() <= 0 && enemyHP.getHP() < enemyHP.startHP + currentLevel) {\n enemyHP.setHP(enemyHP.getHP() + currentLevel);\n }\n }\n }\n\n\n //For each enemies, if enemies has finished their way, decrease player HP\n //and set them inactive\n for (Enemy enemyList : enemies) {\n if (enemyList.counter >= enemyList.path.getLength() - 1) {\n player.decreaseLife();\n bulletCount = 0;\n enemyList.isActive = false;\n }\n\n //If enemies' hp is zero, set them inactive and remove from the list\n if (enemyList.getHP() <= 0) {\n enemyList.isActive = false;\n bulletCount = 0;\n player.addCredits(20);\n }\n enemyList.update(gc, stateBasedGame, delta);\n }\n for (int i = 0; i < enemies.size(); i++) {\n if (!enemies.get(i).isActive) {\n enemies.remove(enemies.get(i));\n }\n }\n\n //For all objects, update\n for (GameObject obj : objects)\n try {\n obj.update(gc, stateBasedGame, delta);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //Go to Menu\n if (gc.getInput().isKeyPressed(Input.KEY_ESCAPE)) {\n gc.getInput().clearKeyPressedRecord();\n stateBasedGame.enterState(2);\n }\n\n\n }",
"@Override\n\tpublic void onCreateBulletEvent() {\n\t\tcreateBullet();\n\t}",
"@Override\n public List<Bullet> tick(List<Creep> creeps, boolean levelInProgress) {\n timeToNextShot--;\n List<Bullet> fired = null;\n if(imageRotates || timeToNextShot <= 0) {\n // The creeps are sorted by the default creep comparator in Clock, so that they don't\n // have to be resorted for any tower left on the default (which is often most of them)\n if(!creepComparator.getClass().equals(DEFAULT_CREEP_COMPARATOR.getClass())) {\n // Make a copy so it can be sorted\n creeps = new ArrayList<Creep>(creeps);\n Collections.sort(creeps, creepComparator);\n }\n // If the image rotates, this needs to be done to find out the direction to rotate to\n fired = fireBullets(creeps);\n }\n if (timeToNextShot <= 0 && fired != null && fired.size() > 0) {\n timeToNextShot = fireRate;\n // Use bulletsToAdd as some towers launch bullets between ticks\n bulletsToAdd.addAll(fired);\n }\n List<Bullet> bulletsToReturn = bulletsToAdd;\n bulletsToAdd = new ArrayList<Bullet>();\n return bulletsToReturn;\n }",
"public List<Colour> getPlayerList();",
"public Object[] getList() {\n\t\treturn new Object[]{pitch, duration, velocity};\n\t}",
"public Map<Pair<ID, ID>, List<Image>> getBulletImages() {\n return bulletImages;\n }",
"@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }",
"java.util.List<com.message.EquipmentProto.PlayerEquipmentMsg> \n getListPlayerEquipmentsList();",
"public List<Sprite> getEnnemies() {\r\n return ennemies.stream()\r\n .filter(c -> !SpriteStatusEnum.DEAD.equals(c.getStatus()))\r\n .collect(Collectors.toList());\r\n }",
"public BuffList buffs();",
"public List<Troop> getSpells()\n\t{\n\t\treturn spells;\n\t}",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tshootBullet(arg0);\r\n\t\t\t}",
"@ZenCodeType.Method\n @ZenCodeType.Getter(\"drops\")\n public static List<ItemStack> getDrops(ItemFishedEvent internal) {\n \n return internal.getDrops();\n }",
"@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}",
"public List<CardWeapon> getWeapons() {\n return weapons;\n }",
"public List<Enemy> getEnemies();",
"@Override\n\tpublic List<Player> getPlayer() {\n\t\treturn ofy().load().type(Player.class).list();\n\t}",
"private void ShootListener() {\n shoot.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (presenter.canShoot()) {\n shoot(presenter.getBullet());\n presenter.checkLastBullet();\n }\n\n }\n });\n }",
"@Override\n public Bullet getBullet(Ship theShip) {\n Point speed = new Point(6, 0);\n Point location = theShip.getLocationPoint();\n Bullet b = new Bullet(location, speed, strength, new AngledMotion(), theShip, getImage());\n b.setHeading(theShip.getHeading());\n return b;\n }",
"public Integer getBulletintype() {\n return bulletintype;\n }",
"public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}",
"void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }",
"public void mousePressed(MouseEvent e){\n\t\tint mx = (int) (e.getX() + camera.getX());\n\t\tint my = (int) (e.getY() + camera.getY());\n\t\n\t\tfor(int i=0; i < handler.object.size(); i++)\n\t\t{\n\t\t\tGameObject tempObject = handler.object.get(i);\n\t\t\tif(tempObject.getId() == ID.Player && game.ammo > 0)\n\t\t\t{\n\t\t\t\thandler.addObject(new Bullet(tempObject.getX()+16, tempObject.getY()+16, ID.Bullet, handler, mx, my, ss));\n\t\t\t\tgame.ammo--;\n\t\t\t}\n\t\t}\n\t}",
"public void detectCollisionPerBullet() {\n//\t\tfor (Bullet bullet : bulletList) {\n\t\tfor (int i=0; i<bulletList.size(); i++) {\n\t\t\tBullet bullet = bulletList.get(i);\n\t\t\tif (bullet != null && !bullet.isDead()) {\n\t\t\t\tdetectCollision(bullet);\n\t\t\t}\n\t\t}\n\t}",
"private void update() {\n\t\t// checks to see if the w key is down\n\t\tif (wKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() - 8));\n\t\t}\n\t\t// checks to see if the a key is down\n\t\tif (aKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() - 8));\n\t\t}\n\t\t// checks to see if the s key is down\n\t\tif (sKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() + 8));\n\t\t}\n\t\t// checks to see if the d key is down\n\t\tif (dKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() + 8));\n\t\t}\n\t\t\n\t\t// checks to make sure the player is within the bounds\n\t\tcheckBounds();\n\t\t\n\t\t// checks to see if the left mouse button is clicked\n\t\tif (mouseDown) {\n\t\t\t// if doubleshot is activated\n\t\t\tif (doubleShot && bulletDelta > doubleShotShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the first bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\t// adds the second bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tlastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET2_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET2_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble doubleshotXChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble doubleshotYChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble doubleshotMagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\tdoubleshotXChange = xChange / doubleshotMagnitude * 20;\n\t\t\t\tdoubleshotYChange = yChange / doubleshotMagnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) doubleshotXChange);\n\t\t\t\tlastBullet.setYChange((int) doubleshotYChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a bullet is shot and the time since the last bullet is at least shootingSpeed\n\t\t\telse if (bulletShot && bulletDelta > bulletShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a laser is shot\n\t\t\telse if (laserShot) {\n\t\t\t\tif (Delta.getTime() % 6 == 0) {\n\t\t\t\t\t// plays the laser shooting sound\n\t\t\t\t\tsound.get(\"laserEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// adds the laser\n\t\t\t\tbullet.add(new Bullet(this, \"laser\", 0, 0, 20));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the laser\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getHeight() + BULLET_Y_OFFSET);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Checks to see if the time since the last enemy is greater than the enemy interval\n\t\tif (!bossSpawned && enemyDelta > generateEnemyInterval()) {\n\t\t\tdouble enemyGenerate = randomGenerator.nextDouble();\n\t\t\tif (enemyGenerate >= 0.3 || Delta.getDelta(\"beginning\") <= 10000)\n\t\t\t\tenemy.add(new Enemy(this, \"green_box\", 0, 0, 300, Delta.getDelta(\"beginning\"), 300));\n\t\t\telse if (enemyGenerate < 0.3)\n\t\t\t\tenemy.add(new Enemy(this, \"red_box\", 0, 0, 400, Delta.getDelta(\"beginning\"), 400));\n\t\t\tEnemy lastEnemy = enemy.get(enemy.size() - 1);\n\t\t\t\n\t\t\tlastEnemy.setX(lastEnemy.generateEnemyX());\n\t\t\tlastEnemy.setY(-lastEnemy.getSprite().getHeight());\n\t\t\tDelta.setLastEnemy(Delta.getTime());\n\t\t}\n\t\t\n\t\tif (bossExplosionNum == 0) {\n\t\t\t// Checks to see if enemy bullets should be generated\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tif (enemy.get(i).getName().equals(\"red_box\") && enemy.get(i).getTimeSinceLastBullet() >= 700) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"enemy_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (enemy.get(i).getName().equals(\"boss\") && enemy.get(i).getTimeSinceLastBullet() >= 1000) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\tdouble xChange = player.getX() - lastEnemyBullet.getX();\n\t\t\t\t\tdouble yChange = player.getY() - lastEnemyBullet.getY();\n\t\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() - 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() - 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() + 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() + 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// spawns the boss if 60 seconds has passed\n\t\tif (Delta.getDelta(\"beginning\") >= 60000 && !bossSpawned) {\n\t\t\tbossSpawned = true;\n\t\t\tenemy.add(new Enemy(this, \"boss\", 0, 0, 10000, Delta.getDelta(\"beginning\"), 500));\n\t\t\t\n\t\t\tEnemy boss = enemy.get(enemy.size() - 1);\n\t\t\tboss.setX(displayWidth / 2 - boss.getSprite().getWidth() / 2);\n\t\t\tboss.setY(-boss.getSprite().getHeight());\n\t\t}\n\t\t\n\t\t// checks for collisions\n\t\tif (bossExplosionNum == 0) {\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tEntity entity1 = enemy.get(i);\n\t\t\t\t\n\t\t\t\t// if a bullet collides with an enemy\n\t\t\t\tfor (int j = 0; j < bullet.size(); j++) {\n\t\t\t\t\tEntity entity2 = bullet.get(j);\n\t\t\t\t\t\n\t\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tEntity entity2 = player;\n\t\t\t\t\n\t\t\t\t// if the player collides with an enemy\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tEntity entity1 = player;\n\t\t\t// if an enemy bullet collides with the player\n\t\t\tfor (int i = 0; i < enemy_bullet.size(); i++) {\n\t\t\t\tEntity entity2 = enemy_bullet.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if a powerup collides with the player\n\t\t\tfor (int i = 0; i < powerup.size(); i++) {\n\t\t\t\tEntity entity2 = powerup.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if the player has defeated the boss\n\t\tif (gameWon && bossSpawned) {\n\t\t\t// draw Congratulations\n\t\t\tString congrats = \"Congratulations! You were able to vanquish\";\n\t\t\tString congrats2 = \"all of your evil thoughts and achieve nirvana!\";\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats) / 2, displayHeight / 2\n\t\t\t\t\t- congratsFont.getHeight(congrats) / 2 - 50, congrats);\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats2) / 2, displayHeight\n\t\t\t\t\t/ 2 - congratsFont.getHeight(congrats2) / 2 - 15, congrats2);\n\t\t\t\n\t\t\t// draw the score\n\t\t\tscoreFont.drawString(displayWidth / 2 - scoreFont.getWidth(\"Score: \" + totalCash) / 2, displayHeight\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Game Over!\")\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Score: \" + totalCash)\n\t\t\t\t\t/ 2 + 10 - 50, \"Score: \" + totalCash);\n\t\t}\n\t}",
"public List<Player> getPlayerList(){\n return this.players;\n }",
"public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }",
"public SpellList spells();",
"public List<Entity> getPassengers() {\n/* 667 */ return Lists.newArrayList(Lists.transform((getHandle()).passengers, new Function<Entity, Entity>()\n/* */ {\n/* */ public Entity apply(Entity input) {\n/* 670 */ return input.getBukkitEntity();\n/* */ }\n/* */ }));\n/* */ }",
"public abstract ArrayList<DamageEffect> getDamageEffects();",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprivate void drawListEntity(ArrayList list) {\n\t\tArrayList listRemove = new ArrayList();\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tEntity ent = (Entity) list.get(i);\n\t\t\t\n\t\t\tdrawEntity(ent);\n\t\t\t\n\t\t\t// if the entity is still in the screen, update its position\n\t\t\tif (ent.continueDrawing()) {\n\t\t\t\tif (ent instanceof Bullet) {\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"enemy_bullet\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 8);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"laser\")) {\n\t\t\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"boss_bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Enemy) {\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"green_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 5);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"red_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 3);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"boss\") && bossExplosionNum == 0) {\n\t\t\t\t\t\tif (ent.getX() <= 0)\n\t\t\t\t\t\t\tbossMovement = 3;\n\t\t\t\t\t\tif (ent.getX() >= displayWidth - ((Enemy) ent).getSprite().getWidth())\n\t\t\t\t\t\t\tbossMovement = -3;\n\t\t\t\t\t\tif (ent.getY() <= 30)\n\t\t\t\t\t\t\tent.setY(ent.getY() + 1);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tent.setX(ent.getX() + bossMovement);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Explosion) {\n\t\t\t\t\tif (((Explosion) ent).getName().equals(\"player_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX());\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY());\n\t\t\t\t\t} else if (((Explosion) ent).getName().equals(\"enemy_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX() - 5);\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY() - 5);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Powerup) {\n\t\t\t\t\tent.setY(ent.getY() + 4);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// else if the entity is outside of the screen, remove it\n\t\t\telse {\n\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\n\t\t\t\t// handles the boss explosions\n\t\t\t\thandleBossExplosions(list, listRemove, i);\n\t\t\t}\n\t\t\t\n\t\t\t// if the player is dead, notify the player of death\n\t\t\tif (stopDrawingPlayer || gameWon) {\n\t\t\t\tnotifyGameOver();\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < listRemove.size(); i++) {\n\t\t\tlist.remove(listRemove.get(i));\n\t\t}\n\t\tlistRemove.clear();\n\t}",
"public List<Player> getPlayerList()\n\t{\n\t\treturn playerList;\n\t}",
"public AvoidBullets(AIPlayer player) {\r\n\t\tsuper(player);\r\n\t}",
"@Override\n public List<Player> getPlayers() {\n return players;\n }",
"java.util.List<com.rpg.framework.database.Protocol.Monster> \n getMonstersList();",
"java.util.List<com.rpg.framework.database.Protocol.Monster> \n getMonstersList();",
"public void onBulletHit(BulletHitEvent event) {\n RobotReference hitRobot;\n hitRobot = robots.get(event.getName());\n\n if (hitRobot.isTeammate()) {\n setTurnRight(90);\n setAhead(400);\n setChargerTarget();\n }\n }",
"public void shoot()\n {\n\n if(reload<=0)//if the tower has reloaded\n {\n int randomizer=Greenfoot.getRandomNumber(20)-10; \n MinigunBullet bullet = new MinigunBullet(this.getRotation()+randomizer, damage,this);\n getWorld().addObject(bullet, getX(), getY());\n bullet.move(30);\n reload=3;\n }\n else//reload\n {\n reload--;\n }\n\n }",
"public static List<Player> getTrackablePlayers() {\n\t\tPlayer[] players = Bukkit.getOnlinePlayers();\n\t\tList<Player> players1 = new ArrayList<Player>();\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tif (!players[i].hasMetadata(\"invisible\")) {\n\t\t\t\tplayers1.add(players[i]);\n\t\t\t}\n\n\t\t}\n\t\treturn players1;\n\t}",
"public ArrayList<Gun> getGuns() {\n\t\tArrayList<Gun> guns = new ArrayList<Gun>(); \n\t\tfor (Item item : inventory) {\n\t\t\tif (item.asGun() != null) {\n\t\t\t\t guns.add(item.asGun());\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\treturn guns;\n\t }",
"void fire() {\r\n // firing a shot takes energy\r\n if (!expendEnergy(BULLET_ENERGY))\r\n return;\r\n\r\n //create a bullet object so it doesn't hit the ship that's firing it\r\n double xV = getXVel() + BULLET_SPEED * (Math.cos(orientation));\r\n double yV = getYVel() + BULLET_SPEED * (Math.sin(orientation));\r\n\r\n // create the actual bullet\r\n new Bullet(\r\n getGame(),\r\n (getXPos() + ((getSize()/2 + 2) * (Math.cos(orientation))) + xV),\r\n (getYPos() + ((getSize()/2 + 2) * (Math.sin(orientation))) + yV),\r\n xV,\r\n yV);\r\n }",
"public ArrayList<Weapon> getWeapons() {\n return weapons;\n }",
"public ArrayList<Player> getPlayerList() {\n ArrayList<Player> ret = new ArrayList<>();\n ret.addAll(playerList);\n return ret;\n }",
"public List<Player> getDisplayList(){\n\t\tList<Player> dis = new ArrayList<>(1);\n\t\tif(!playersFinished.isEmpty()){\n\t\t\tdis.add(playersFinished.get(tempNumber -1));//last to finish\n\t\t}\n\t\treturn dis;\n\t}",
"public List<Gun> getGunsUsedInShooting(Shooting shooting) throws SQLException {\n List<Gun> gunsFromShooting = new ArrayList<Gun>();\n String selectGuns =\n \"SELECT * FROM Guns WHERE ShootingId=?\";\n Connection connection = null;\n PreparedStatement selectStmt = null;\n ResultSet results = null;\n try {\n connection = connectionManager.getConnection();\n selectStmt = connection.prepareStatement(selectGuns);\n selectStmt.setInt(1, shooting.getShootingId());\n results = selectStmt.executeQuery();\n\n while (results.next()) {\n int gunId = results.getInt(\"GunId\");\n Boolean gunStolen = results.getBoolean(\"GunStolen\");\n String gunType = results.getString(\"GunType\");\n int shootingId = results.getInt(\"ShootingId\");\n int gunNumber = results.getInt(\"GunNumber\");\n\n Gun gun = new Gun(gunId, gunStolen, gunType,\n new ShootingDao().getShootingFromShootingId(shootingId), gunNumber);\n\n gunsFromShooting.add(gun);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n throw e;\n } finally {\n if (connection != null) {\n connection.close();\n }\n if (selectStmt != null) {\n selectStmt.close();\n }\n if (results != null) {\n results.close();\n }\n }\n return gunsFromShooting;\n }",
"public List<Player> getAttackedPlayers() {\r\n\t\tArrayList<Player> output = new ArrayList<Player>();\r\n\t\tfor(Player p : getOtherPlayers()) {\r\n\t\t\tif(!(p.deck.hand.contains(new Moat()) \r\n\t\t\t\t\t|| p.deck.duration.contains(new Lighthouse()) \r\n\t\t\t\t\t|| p.deck.duration.contains(new Champion()) \r\n\t\t\t\t\t|| p.getPlayerNum() == getWhoseTurn())) {\r\n\t\t\t\toutput.add(p);\r\n\t\t\t}\r\n\t\t\tArrayList<Card> reactions = new ArrayList<Card>();\r\n\t\t\tfor(Card c : p.deck.hand) {\r\n\t\t\t\tif(c.isReaction()) reactions.add(c);\r\n\t\t\t}\r\n\t\t\tfor(Card c : reactions) {\r\n\t\t\t\tc.reactAttack();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t}",
"@NotNull\n public ArrayList method_740() {\n ArrayList var1 = new ArrayList();\n Iterator var2 = this.c.world.playerEntities.iterator();\n\n while(var2.hasNext()) {\n EntityPlayer var3 = (EntityPlayer)var2.next();\n if (var3 != null && Intrinsics.areEqual((Object)var3, (Object)this.c.player) ^ true && !FriendManager.Companion.isFriend(var3)) {\n var1.add(var3);\n }\n }\n\n return var1;\n }"
] | [
"0.7503106",
"0.69647115",
"0.68986726",
"0.68692166",
"0.6623103",
"0.6561516",
"0.6539329",
"0.6537995",
"0.6455395",
"0.63713306",
"0.6340942",
"0.6333236",
"0.6267861",
"0.6259567",
"0.6258408",
"0.6137854",
"0.6120344",
"0.6103753",
"0.6098526",
"0.60929537",
"0.60669535",
"0.6053344",
"0.6044278",
"0.60190547",
"0.59950864",
"0.5987193",
"0.59450847",
"0.5942908",
"0.5922327",
"0.59214634",
"0.5900226",
"0.58788455",
"0.58584535",
"0.5838176",
"0.58235896",
"0.5819593",
"0.581907",
"0.5785122",
"0.5777384",
"0.57728934",
"0.57115626",
"0.57071674",
"0.5706128",
"0.57058954",
"0.56622463",
"0.5656088",
"0.5621314",
"0.5612725",
"0.5611722",
"0.5600431",
"0.5587482",
"0.55869377",
"0.5578886",
"0.5575144",
"0.55723554",
"0.5571503",
"0.55461156",
"0.5536205",
"0.5535893",
"0.5532298",
"0.5523974",
"0.5522121",
"0.55194604",
"0.55167437",
"0.5509087",
"0.5508493",
"0.55045277",
"0.5499802",
"0.54935676",
"0.54809594",
"0.5467612",
"0.54598194",
"0.54222655",
"0.5421396",
"0.5417141",
"0.5413857",
"0.5413167",
"0.54064816",
"0.54020816",
"0.5375902",
"0.5373188",
"0.53622425",
"0.5348151",
"0.534483",
"0.5322467",
"0.5322108",
"0.53198534",
"0.5311832",
"0.5311436",
"0.5304403",
"0.5302572",
"0.529679",
"0.52910286",
"0.5288231",
"0.52839047",
"0.52814204",
"0.5278278",
"0.52732646",
"0.52620536",
"0.52617526"
] | 0.7662464 | 0 |
Shoots a bullet. Adds a new bullet to the arraylist of bullets that the player has fired in game. Sets coordinates based on players current position and the damage based on the players currently selected weapon. | public void shootBullet( ){
bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));
byte weaponFired = currentWeapon.getKey();
switch (weaponFired){
case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);
bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);
audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());
audioHandler.playSoundEffect(audioHandler.pistolSound);
break;
case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);
bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);
audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());
audioHandler.playSoundEffect(audioHandler.machineGunSound);
break;
case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);
bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);
audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());
audioHandler.playSoundEffect(audioHandler.shotgunSound);
break;
case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);
bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);
audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());
audioHandler.playSoundEffect(audioHandler.machineGunSound);
break;
case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);
bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);
audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());
audioHandler.playSoundEffect(audioHandler.machineGunSound);
break;
case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);
bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);
System.out.println("Bullet sound " + audioHandler.getSoundEffectVolume());
audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());
audioHandler.playSoundEffect(audioHandler.pistolSound);
break;
default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);
bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }",
"private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}",
"public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }",
"public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }",
"public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}",
"void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}",
"public M_Bullet shoot() {\n Point leftCorner = this.getLocation();\n // get the center of the character\n int x = leftCorner.x;\n int y = leftCorner.y;\n Point dim = this.getDimensions();\n int h = dim.y;\n int w = dim.x;\n h = h / 2;\n w = w / 2;\n Point center = new Point(x + w, y + h);\n // get the velocity for the bullet\n Point vel = new Point(this.getDirection() * 3, 0);\n // set the enemy's shot cooldown to its shot interval.\n setShotCooldown(getShotInterval());\n // return the new bullet\n return new M_Bullet(center, this.getStrength(), vel, true);\n }",
"public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}",
"public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }",
"public void avatarShoot()\r\n\t{\r\n\t\tBullet avatarPew = avatar.shoot();\r\n\t\tif (avatarPew!= null)\r\n\t\t{\r\n\t\t\tbullets.add(avatarPew);\r\n\t\t}\r\n\t}",
"public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }",
"public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }",
"public void shoot(int bulletLeft) {\n float xValue = canon.getX();\n float yValue = canon.getY();\n bullets.get(bulletLeft).setVisibility(View.VISIBLE);\n shootingMotion(bullets.get(bulletLeft), xValue, yValue);\n\n }",
"void fire() {\r\n // firing a shot takes energy\r\n if (!expendEnergy(BULLET_ENERGY))\r\n return;\r\n\r\n //create a bullet object so it doesn't hit the ship that's firing it\r\n double xV = getXVel() + BULLET_SPEED * (Math.cos(orientation));\r\n double yV = getYVel() + BULLET_SPEED * (Math.sin(orientation));\r\n\r\n // create the actual bullet\r\n new Bullet(\r\n getGame(),\r\n (getXPos() + ((getSize()/2 + 2) * (Math.cos(orientation))) + xV),\r\n (getYPos() + ((getSize()/2 + 2) * (Math.sin(orientation))) + yV),\r\n xV,\r\n yV);\r\n }",
"public void shoot(GraphicsContext graphicsContext) {\n TankBullet bullet = new TankBullet(new FixedCoordinates(getCoordinates().getX() + 17, getCoordinates().getY() + 100), gameEnded, graphicsContext);\n bullet.draw(graphicsContext);\n CoordinatesCache.getInstance().getEnemyBullets().add(bullet);\n }",
"public void enemyShoot()\r\n\t{\r\n\t\tfor (Enemy enemies : enemy)\r\n\t\t{\r\n\t\t\tif (enemies.getHasFired())\r\n\t\t\t{\r\n\t\t\t\tBullet enemyPew = enemies.shoot();\r\n\t\t\t\tif (enemyPew != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.add(enemyPew);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }",
"public void shoot(float direction) {\n\t\tif(pause != 0) return;\n\t\tbullets.add(new Bullet(player.getPosition(),direction));\n\t\tpause = cooldown;\n\t}",
"private void multiBulletFire() {\n\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 20, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) - 10, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 50, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t}",
"private void quickFireBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Pink\"));\n\t}",
"public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }",
"public void shoot() {\n\t\tgetWeapon().triggerMain();\n\t\tsetShooting(true);\n\t}",
"public void shoot()\n {\n\n if(reload<=0)//if the tower has reloaded\n {\n int randomizer=Greenfoot.getRandomNumber(20)-10; \n MinigunBullet bullet = new MinigunBullet(this.getRotation()+randomizer, damage,this);\n getWorld().addObject(bullet, getX(), getY());\n bullet.move(30);\n reload=3;\n }\n else//reload\n {\n reload--;\n }\n\n }",
"public void shoot(Point p, Graphics g, Player player){\r\n if(p.getX() > getXCoord()-20){ //not sure if -20 needed (it is to make cetner by the shoulder of arm)\r\n setFacing(1);\r\n } else{\r\n setFacing(0);\r\n }\r\n this.setAttackSpeedTimer(this.getAttackSpeedTimer() + 1);\r\n if(this.getAttackSpeedTimer() == this.getAttackSpeed()){\r\n\t\t Bullet bullet = new Bullet(this.getXCoord(), \r\n\t\t\t\t\t this.getYCoord(), this.getFacing(), g, findAngle(p), player);\r\n\t\t\t\t\t bullet.setAttack(50);\r\n\t\t bullet.setMouseY(this.getMouseY());\r\n\t\t bullet.setMouseX(this.getMouseX());\r\n\t\t bullet.setMouseAngle(this.getMouseAngle());\r\n\t \t bullet.setPlayerDirection(this.getPlayerDirection());\r\n\t\t this.addProjectile(bullet);\r\n\t\t this.setAttackSpeedTimer(0);\r\n\t\t //System.out.println(findAngle(p)*180/Math.PI);\r\n\t\t this.playSound();\r\n }\r\n }",
"public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }",
"public void fireBullet(int direction , int posX, int posY ){\n if ( clockBullet.getElapsedTime().asMilliseconds() > 100 ){\n int lowestbulletNo = 10;\n for( int i = 9; i > 0; i-- ){\n if ( bulletSpace.get(i).isEnabled() == false){\n lowestbulletNo = i;//find the first bullet in the gun barrol\n }\n }\n\n if ( lowestbulletNo < 10 ){\n bulletSpace.get(lowestbulletNo).setDirection(direction);\n bulletSpace.get(lowestbulletNo).setDistance(0);\n bulletSpace.get(lowestbulletNo).setPosX(posX - map.getX()) ;\n bulletSpace.get(lowestbulletNo).setPosY(posY - map.getY()) ;\n bulletSpace.get(lowestbulletNo).enabled(true);\n bulletSpace.get(lowestbulletNo).setRotation(direction+1);\n }\n }\n clockBullet.restart();\n }",
"public void fire() {\n\n\t\t// A player cannot continually fire, there is a delay between each bullet.\n\t\tif (isAbleToFire) {\n\n\t\t\taudio.playMusic(\"Audio/Fire.wav\");\n\n\t\t\tif (multiBulletIsActive) {\n\n\t\t\t\tmultiBulletFire();\n\n\t\t\t} else if (speedBulletIsActive) {\n\n\t\t\t\tspeedBulletFire();\n\n\t\t\t} else if (quickFireBulletIsActive) {\n\n\t\t\t\tquickFireBulletFire();\n\n\t\t\t} else {\n\n\t\t\t\t// Single fire.\n\t\t\t\t// Adjust bullet position to be fired from the center of the player.\n\t\t\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition,\n\t\t\t\t\t\tbulletWidth, bulletHeight, \"Red\"));\n\t\t\t}\n\n\t\t\t// Stop the player from being able to fire for 'ticksBetweemFire' amount.\n\t\t\tticksToNextFire = currentTickCount + ticksBetweenFire;\n\t\t}\n\t}",
"private void speedBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Yellow\"));\n\n\t\tfor (int i = 0; i < bulletArrayList.size(); i++) {\n\t\t\tbulletArrayList.get(i).setSpeed(5);\n\t\t}\n\t}",
"public void shoot(Projectile p){\r\n\t\tp.facing = facing;\r\n\t\tp.x = x+(width/2)-(p.width/2);\r\n\t\tp.y = y+(height/2)-(p.height/2);\r\n\t\tp.fired = true;\r\n\t\tinAttackCooldown = true;\r\n\t}",
"@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }",
"public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }",
"public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }",
"@Override\n\tpublic Bullet shoot(int hx, int hy) {\n\t\treturn null;\n\t}",
"private void update() {\n\t\t// checks to see if the w key is down\n\t\tif (wKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() - 8));\n\t\t}\n\t\t// checks to see if the a key is down\n\t\tif (aKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() - 8));\n\t\t}\n\t\t// checks to see if the s key is down\n\t\tif (sKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() + 8));\n\t\t}\n\t\t// checks to see if the d key is down\n\t\tif (dKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() + 8));\n\t\t}\n\t\t\n\t\t// checks to make sure the player is within the bounds\n\t\tcheckBounds();\n\t\t\n\t\t// checks to see if the left mouse button is clicked\n\t\tif (mouseDown) {\n\t\t\t// if doubleshot is activated\n\t\t\tif (doubleShot && bulletDelta > doubleShotShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the first bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\t// adds the second bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tlastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET2_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET2_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble doubleshotXChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble doubleshotYChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble doubleshotMagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\tdoubleshotXChange = xChange / doubleshotMagnitude * 20;\n\t\t\t\tdoubleshotYChange = yChange / doubleshotMagnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) doubleshotXChange);\n\t\t\t\tlastBullet.setYChange((int) doubleshotYChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a bullet is shot and the time since the last bullet is at least shootingSpeed\n\t\t\telse if (bulletShot && bulletDelta > bulletShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a laser is shot\n\t\t\telse if (laserShot) {\n\t\t\t\tif (Delta.getTime() % 6 == 0) {\n\t\t\t\t\t// plays the laser shooting sound\n\t\t\t\t\tsound.get(\"laserEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// adds the laser\n\t\t\t\tbullet.add(new Bullet(this, \"laser\", 0, 0, 20));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the laser\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getHeight() + BULLET_Y_OFFSET);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Checks to see if the time since the last enemy is greater than the enemy interval\n\t\tif (!bossSpawned && enemyDelta > generateEnemyInterval()) {\n\t\t\tdouble enemyGenerate = randomGenerator.nextDouble();\n\t\t\tif (enemyGenerate >= 0.3 || Delta.getDelta(\"beginning\") <= 10000)\n\t\t\t\tenemy.add(new Enemy(this, \"green_box\", 0, 0, 300, Delta.getDelta(\"beginning\"), 300));\n\t\t\telse if (enemyGenerate < 0.3)\n\t\t\t\tenemy.add(new Enemy(this, \"red_box\", 0, 0, 400, Delta.getDelta(\"beginning\"), 400));\n\t\t\tEnemy lastEnemy = enemy.get(enemy.size() - 1);\n\t\t\t\n\t\t\tlastEnemy.setX(lastEnemy.generateEnemyX());\n\t\t\tlastEnemy.setY(-lastEnemy.getSprite().getHeight());\n\t\t\tDelta.setLastEnemy(Delta.getTime());\n\t\t}\n\t\t\n\t\tif (bossExplosionNum == 0) {\n\t\t\t// Checks to see if enemy bullets should be generated\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tif (enemy.get(i).getName().equals(\"red_box\") && enemy.get(i).getTimeSinceLastBullet() >= 700) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"enemy_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (enemy.get(i).getName().equals(\"boss\") && enemy.get(i).getTimeSinceLastBullet() >= 1000) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\tdouble xChange = player.getX() - lastEnemyBullet.getX();\n\t\t\t\t\tdouble yChange = player.getY() - lastEnemyBullet.getY();\n\t\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() - 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() - 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() + 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() + 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// spawns the boss if 60 seconds has passed\n\t\tif (Delta.getDelta(\"beginning\") >= 60000 && !bossSpawned) {\n\t\t\tbossSpawned = true;\n\t\t\tenemy.add(new Enemy(this, \"boss\", 0, 0, 10000, Delta.getDelta(\"beginning\"), 500));\n\t\t\t\n\t\t\tEnemy boss = enemy.get(enemy.size() - 1);\n\t\t\tboss.setX(displayWidth / 2 - boss.getSprite().getWidth() / 2);\n\t\t\tboss.setY(-boss.getSprite().getHeight());\n\t\t}\n\t\t\n\t\t// checks for collisions\n\t\tif (bossExplosionNum == 0) {\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tEntity entity1 = enemy.get(i);\n\t\t\t\t\n\t\t\t\t// if a bullet collides with an enemy\n\t\t\t\tfor (int j = 0; j < bullet.size(); j++) {\n\t\t\t\t\tEntity entity2 = bullet.get(j);\n\t\t\t\t\t\n\t\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tEntity entity2 = player;\n\t\t\t\t\n\t\t\t\t// if the player collides with an enemy\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tEntity entity1 = player;\n\t\t\t// if an enemy bullet collides with the player\n\t\t\tfor (int i = 0; i < enemy_bullet.size(); i++) {\n\t\t\t\tEntity entity2 = enemy_bullet.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if a powerup collides with the player\n\t\t\tfor (int i = 0; i < powerup.size(); i++) {\n\t\t\t\tEntity entity2 = powerup.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if the player has defeated the boss\n\t\tif (gameWon && bossSpawned) {\n\t\t\t// draw Congratulations\n\t\t\tString congrats = \"Congratulations! You were able to vanquish\";\n\t\t\tString congrats2 = \"all of your evil thoughts and achieve nirvana!\";\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats) / 2, displayHeight / 2\n\t\t\t\t\t- congratsFont.getHeight(congrats) / 2 - 50, congrats);\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats2) / 2, displayHeight\n\t\t\t\t\t/ 2 - congratsFont.getHeight(congrats2) / 2 - 15, congrats2);\n\t\t\t\n\t\t\t// draw the score\n\t\t\tscoreFont.drawString(displayWidth / 2 - scoreFont.getWidth(\"Score: \" + totalCash) / 2, displayHeight\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Game Over!\")\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Score: \" + totalCash)\n\t\t\t\t\t/ 2 + 10 - 50, \"Score: \" + totalCash);\n\t\t}\n\t}",
"public void fireShot() {\n\t\tVector3 position = player.getPositionVector();\n\t\tVector3 rotation = player.getRotationVector();\n\t\tVector3 scale = player.getScaleVector();\n\t\tAsteroidsLaser laser = new AsteroidsLaser(GameObject.ROOT, this, rotation.z);\n\t\tlaser.translate(position);\n\t\tlaserShots.add(laser);\n\t}",
"private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }",
"public void setBulletsFired(ArrayList<Bullet> bullets) {\n if(!bulletsFired.isEmpty()) {\n //System.out.println(bullets.get(0).getxPos() != bulletsFired.get(0).getxPos());\n this.bulletsFired = bullets;\n }\n }",
"private void shoot(GObject bottom, GObject bottomLeft, GObject topRight, GObject bottomRight, GObject topLeft) {\r\n\t\t//if(bullet == null && bottom != null && bottomLeft == null && topRight == null && bottomRight == null && topLeft == null) {\r\n\t\t\t{bullet = new GRect(BULLET_WIDTH, BULLET_HEIGHT);\r\n\t\t\tbullet.setFilled(true);\r\n\t\t\tbullet.setColor(Color.green);\r\n\t\t\tif(facingEast == true) {\r\n\t\t\t\tbulletVelocity = BULLET_SPEED;\r\n\t\t\t\tadd(bullet, player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() * 3/5.0);\r\n\t\t\t} else {\r\n\t\t\t\tbulletVelocity = -BULLET_SPEED;\r\n\t\t\t\tadd(bullet, player.getX() - BULLET_WIDTH, player.getY() + player.getHeight() * 3/5.0);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void shoot(double x, double y) {\n if (magazineCounter > 0 && !reloading) {\n magazineCounter--;\n new WeaponProjectile(new Point2D(x, y), mouseLocation(), projectileSpeed, testing);\n }\n }",
"public void placeAlienBullet() {\r\n\t\tif (alien != null) {\r\n\t\t\t// If the alien is large fires a bullet in a random direction\r\n\t\t\tif (alien.getSize() == 1 && ship != null) {\r\n\r\n\t\t\t\t// Create the alien bullet\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\r\n\t\t\t\t// give the alien bullet a random direction and the bullet speed velocity,\r\n\t\t\t\t// then add as participant\r\n\t\t\t\tdouble r = (2 * Math.PI) * RANDOM.nextDouble();\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, r);\r\n\t\t\t\taddParticipant(ab);\r\n\r\n\t\t\t\t// Sets the alien bullet to expire when it reaches the bullet duration time\r\n\t\t\t\t// limit\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\r\n\t\t\t// If the alien is small fires a bullet aimed directly at the ship\r\n\t\t\tif (alien.getSize() == 0 && ship != null) {\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\t\t\t\tab.setSpeed(BULLET_SPEED);\r\n\r\n\t\t\t\t// Aims the alien bullet directly at the ship\r\n\t\t\t\tdouble A = ship.getY() - alien.getY();\r\n\t\t\t\tdouble B = ship.getX() - alien.getX();\r\n\t\t\t\tdouble angle = Math.atan2(A, B);\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, angle);\r\n\r\n\t\t\t\t// Add the alien bullet as a participant and then set it to expire when it\r\n\t\t\t\t// reaches the bullet duration time limit\r\n\t\t\t\taddParticipant(ab);\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public static void addBullet(float x, float y, float xspeed, float yspeed) {\r\n \tFloat[] t = new Float[4];\r\n \tt[0] = x;\r\n \tt[1] = y;\r\n \tt[2] = xspeed;\r\n \tt[3] = yspeed;\r\n \tbulletsToAdd.add(t);\r\n }",
"void shoot();",
"@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}",
"public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}",
"public void fire() {\n \tAlienMissile.Slope slps[] = {AlienMissile.Slope.ShallowLeft, \n AlienMissile.Slope.Down,\n AlienMissile.Slope.ShallowRight};\n for (AlienMissile.Slope i : slps) {\n AlienMissile m = new AlienMissile(this, i);\n m.setBounce(true, health/5);\n list.add(m);\n }\n }",
"public void onBulletHit(BulletHitEvent event) {\n RobotReference hitRobot;\n hitRobot = robots.get(event.getName());\n\n if (hitRobot.isTeammate()) {\n setTurnRight(90);\n setAhead(400);\n setChargerTarget();\n }\n }",
"public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }",
"private void fire(GameEngine gameEngine) {\n Bullet bullet1 = gameEngine.getBulletEnemy();\n if (bullet1 == null) {\n return;\n }\n bullet1.init(this, positionX + imageWidth/2, positionY, 0);\n gameEngine.addGameObject(bullet1);\n gameEngine.playSound(1);\n }",
"@Override\n\t\t\tpublic void shoot() {\n\t\t\t}",
"private void shoot() {\n\t\tif (playerList.size() > 0) {\n\t\t\tif (!someoneLose) {\n\t\t\t\tPlayer target = null;\n\t\t\t\tint remainingShips = SHIP_COUNT + 1;\n\t\t\t\tfor (Player player : playerList) {\n\t\t\t\t\tif (player.getRemainingShips() < remainingShips) {\n\t\t\t\t\t\ttarget = player;\n\t\t\t\t\t\tremainingShips = player.getRemainingShips();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSector targetSector = target.findFreeSector();\n\t\t\t\tlastTarget = targetSector.getMiddle();\n\t\t\t\tShootingThread st = new ShootingThread(chordImpl, targetSector.getMiddle());\n\t\t\t\tst.start();\n\t\t\t}\n\t\t}\n\t}",
"public boolean shoot(float startX, float startY, float touchX, float touchY, int screenX, int screenY) {\n if(!isActive){\n x = (startX+((screenX/5)/2));\n y = (startY+((screenX/10)/2));\n\n LEFT = false;\n BOTTOM = false;\n\n targetX = touchX;\n targetY = touchY;\n\n slopeX = (x/targetX);\n slopeY = (y/targetY);\n\n\n if(targetX < (screenX/2)) {\n LEFT = true;\n }\n\n if(targetY < (screenY/2)) {\n BOTTOM = true;\n }\n\n slope = slopeY/slopeX;\n\n isActive = true;\n return false;\n }\n\n //Bullet is already Active\n return false;\n }",
"private void ShootListener() {\n shoot.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (presenter.canShoot()) {\n shoot(presenter.getBullet());\n presenter.checkLastBullet();\n }\n\n }\n });\n }",
"public void setBullet(Bullet bullet) {\r\n\t\tthis.bullet = bullet;\r\n\t}",
"Bullet(int posX,int posY,int velX,int velY,int classOfObejct,int attack){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.classOfObejct = classOfObejct;\n this.attack = attack;\n\n }",
"@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tshootBullet(arg0);\r\n\t\t\t}",
"@Override\n\tpublic void shoot() {\n\t\tthis.fired = true;\n\t\tghost.shot=true;\n\t}",
"protected void handleFiring(double dt)\r\n\t{\r\n\t\t//Fire if the mouse button is pressed.\r\n\t\tif (input.getMouseButton(InputHandler.FIRE) && charge <= 0 && energy >= energyUse)\r\n\t\t{\r\n\t\t\tEntityBullet bullet = (EntityBullet)c.createEntity(w, EI.EntityBullet);\r\n\t\t\tdouble xDir = Math.cos(horizontalDir)*Math.cos(verticalDir),\r\n\t\t\t\t\tyDir = Math.sin(horizontalDir)*Math.cos(verticalDir), zDir = Math.sin(verticalDir);\r\n\t\t\t\r\n\t\t\tdouble xDisp = shotX*Math.cos(verticalDir) - shotZ*Math.sin(verticalDir);\r\n\t\t\tdouble zDisp = shotX*Math.sin(verticalDir) + shotZ*Math.cos(verticalDir);\r\n\t\t\t\r\n\t\t\tdouble yDisp = xDisp*Math.sin(horizontalDir) - shotY*Math.cos(horizontalDir);\r\n\t\t\txDisp = xDisp*Math.cos(horizontalDir) + shotY*Math.sin(horizontalDir);\r\n\t\t\t\r\n\t\t\t//t is to prevent bullets from spawning through walls.\r\n\t\t\t\r\n\t\t\tdouble t = w.getCollision().getBulletCollision(x, y, z, xDisp, yDisp, zDisp);\r\n\t\t\t\r\n\t\t\tif (t == 1)\r\n\t\t\t{\r\n\t\t\t\t//Create the bullet\r\n\t\t\t\tenergy -= energyUse;\r\n\t\t\t\tbullet.setPosition(x+xDisp, y+yDisp, z+zDisp);\r\n\t\t\t\tint vel = 60;\r\n\t\t\t\t\r\n\t\t\t\tbullet.setVelocity(vel*xDir, vel*yDir, vel*zDir);\r\n\t\t\t\tbullet.setDamage(1, 1);//damage, knockback\r\n\t\t\t\tbullet.setColor(0, 1, 0);\r\n\t\t\t\t\r\n\t\t\t\tbullet.setOwner(player);\r\n\t\t\t\t\r\n\t\t\t\tw.create(bullet);\r\n\t\t\t\t\r\n\t\t\t\tcharge = shotDelay;\r\n\t\t\t\t\r\n\t\t\t\t//Laser gun sound\r\n\t\t\t\tc.getSoundHandler().playSound(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Weapon recharging\r\n\t\tcharge -= dt;\r\n\t}",
"private void shoot() {\n }",
"private void shoot() {\n }",
"private void placeBullet(double x, double y) {\r\n\t\tb = new Bullet(x, y);\r\n\t\taddParticipant(b);\r\n\t\tb.setVelocity(BULLET_SPEED, ship.getRotation());\r\n\t\tnew ParticipantCountdownTimer(b, \"expire\", BULLET_DURATION);\r\n\t}",
"private void moveBullet() {\r\n\t\tif(bullet != null) {\r\n\t\t\tbullet.move(bulletVelocity, 0);\r\n\t\t}\r\n\t}",
"public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Paramos tudo o que estamos fazendo.\n\t\tstop();\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\n\t\t// Giramos a arma na direção do disparo\n\t\tdouble turnGunAmt = Utils.normalRelativeAngleDegrees(e.getBearing() + getHeading() - getGunHeading());\n\t\tturnGunRight(turnGunAmt);\n\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\t\tback(400); // Recuamos\n\t}",
"public void shoot(){\r\n\t\tif(numberOfArrows>0){\r\n\t\t\tnumberOfArrows--;\r\n\t\t\tPosition positionWumpus = b.getWumpus().getPosition();\r\n\t\t\tif (position.checkShoot(positionWumpus))\r\n\t\t\t\tb.getWumpus().kill();\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"There are no more arrows.\");\r\n\t}",
"private void tankWillShoot(Graphics2D g2d, GameState state) {\n if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() > 0 && state.getGunType() % 2 == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfCannonBullet(tankObject.getNumOfCannonBullet() - 1);\n if (tankObject.getCannonLevel() == 1) {\n state.getMissiles().add(new Missile(state, 15));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (tankObject.getCannonLevel() == 2) {\n state.getMissiles().add(new Missile(state, 30));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n } else if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() == 0 && state.getGunType() % 2 == 1) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n state.setMouseClicked(false);\n }\n for (Missile missile : state.getMissiles()) {\n missile.paint(g2d, state);\n }\n if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() > 0 && state.getGunType() % 2 == 0) {\n if (numOfRenderBullet1 == 0 && tankObject.getMachineGunLevel() == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 20));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet2 == 0 && tankObject.getMachineGunLevel() == 2) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 30));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet1 <= 7) {\n numOfRenderBullet1++;\n }\n if (numOfRenderBullet1 == 7) {\n numOfRenderBullet1 = 0;\n }\n if (numOfRenderBullet2 <= 3) {\n numOfRenderBullet2++;\n }\n if (numOfRenderBullet2 == 3) {\n numOfRenderBullet2 = 0;\n }\n }\n else if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() == 0 && state.getGunType() % 2 == 0) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n }\n for (Bullet bullet : state.getBullets()) {\n bullet.paint(g2d, state);\n }\n }",
"public void shoot(Graphics g) {\r\n\t\tlevelManager.shoot(g);\r\n\t}",
"void doGun() {\r\n\t\tlong time = getTime()\r\n\t\t\t\t+ (int) Math\r\n\t\t\t\t\t\t.round((getRange(getX(), getY(), target.x, target.y) / (20 - (3 * firePower))));\r\n\t\tPoint2D.Double p = target.guessPosition(time);\r\n\r\n\t\t// offsets the gun by the angle to the next shot based on linear\r\n\t\t// targeting provided by the enemy class\r\n\t\tdouble gunOffset = getGunHeadingRadians()\r\n\t\t\t\t- (Math.PI / 2 - Math.atan2(p.y - getY(), p.x - getX()));\r\n\t\tsetTurnGunLeftRadians(normaliseBearing(gunOffset));\r\n\t}",
"void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }",
"public boolean shoot() {\n if (!isReloading && System.currentTimeMillis() - previousShotTime > shootInterval * 1000 && ammoRemaining > 0) {\n\n previousShotTime = System.currentTimeMillis();\n\n ammoRemaining--;\n audioPlayer.setSpatial(holder);\n audioPlayer.playOnce();\n // score -= 50;\n Vec2 angle = Vec2\n .Vector2FromAngleInDegrees(transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread));\n\n Vec2 spawnPosition = transform.getWorldPosition();\n\n Projectile p = new Projectile(spawnPosition,\n Vec2\n .Vector2FromAngleInDegrees(\n transform.getGlobalRotation().getAngleInDegrees() - 90 + (Math.random() * spread * 2 - spread)),\n new Sprite(projectilePath));\n p.setSpeed(speed);\n p.setSource(holder);\n p.getCollider().addInteractionLayer(\"Block\");\n p.getCollider().addInteractionLayer(\"Hittable\");\n p.getCollider().addInteractionLayer(\"Walk\");\n p.setOnCollisionListener(other -> {\n if (other.getGameObject() instanceof Player && other.getGameObject() != holder) {\n Player player = (Player) other.getGameObject();\n player.hit(alteredDmg);\n if (GameEngine.DEBUG) {\n System.out.println(\"Bullet Hit \" + other.getName());\n }\n p.destroy();\n\n// player.destroy();\n } else if (other.getGameObject() instanceof Enemy) {\n Enemy e = ((Enemy) other.getGameObject());\n e.hit(alteredDmg);\n if (!e.isAlive()) { // CHeck if enemy survived\n ((Player) p.getSource()).killedEnemy();\n }\n p.destroy();\n } else if (other.getTag() == \"Block\") {\n p.destroy();\n }\n\n });\n return true;\n } else if(ammoRemaining <= 0){\n reloadWeapon();\n return false;\n }else\n return false;\n }",
"public void update(float delta) {\n rangeTimer++;//update bullet distance\n //delete bullet if hit collison or met ranged\n if (rangeTimer == RANGE) {\n bullet.setShoot(false);\n rangeTimer = 0;\n } else {\n //update bullet timings\n bullet.updateTimer(delta);\n //make bullet go to p x y - follows player to increase difficulty\n if (this.bullet.x < playerX + 1.5) {\n this.bullet.x += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.x >playerX + 1.5) {\n this.bullet.x -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y < playerY + 0.5) {\n this.bullet.y += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y > playerY + 1.5) {\n this.bullet.y -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n }\n }",
"private void clearBullet()\n {\n if(playerBullets.size() > 0)\n {\n for(int i = 0; i < playerBullets.size(); ++i)\n {\n int x = playerBullets.get(i).getRectangle().centerX(), y = playerBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n playerBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n if(enemyBullets.size() > 0)\n {\n for(int i = 0; i < enemyBullets.size(); ++i)\n {\n int x = enemyBullets.get(i).getRectangle().centerX(), y = enemyBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n enemyBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n }",
"public Bullet(int bulletsDamage, @NotNull String bulletsType, Coordinate centerPointCoordinate, double angle, TankTroubleMap tankTroubleMap, boolean isUserTank, int tankIndex) {\n this.isUserTank = isUserTank;\n this.tankIndex = tankIndex;\n this.centerPointCoordinate = centerPointCoordinate;\n updateArrayListCoordinates();\n bulletsBlasted = false;\n damage = bulletsDamage;\n this.tankTroubleMap = tankTroubleMap;\n if (bulletsType.equals(\"NORMAL\")) {\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/normal.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (bulletsType.equals(\"LASER\")) { // ba else nazadam yevakht khastim emtiazi ezafe konim ye golule\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/laser.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.angle = angle;\n\n fireTime = LocalDateTime.now();\n Thread thread = new Thread(() -> {\n try {\n Thread.sleep(4000);\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n\n }",
"public void gotHit(Bullet bullet) {\n\t\tif (bullet.getOwner() != this) {\n\t\t\tDefaultModeScoring.addHitScore(bullet.getOwner());\n\t\t\tAudioManager.startAudio(bullet.getSoundName());\n\t\t\tif (!isDead())\n\t\t\t\tAudioManager.startAudio(getSoundName());\n\t\t\tsetHp(getHp() - bullet.getDamage());\n\t\t\tif (bullet.getSpeed().x() > 0)\n\t\t\t\tgetPush().setX(getPush().x() + bullet.getPush());\n\t\t\telse\n\t\t\t\tgetPush().setX(getPush().x() - bullet.getPush());\n\t\t\tif (getHp() <= 0 && !isDead())\n\t\t\t\tdie();\n\t\t}\n\t}",
"private void shoot(int x, int y, int choice) {\n\t\tif (heroi.getDardos() > 0) {\n\t\t\t//left\n\t\t\tif (x == 1) {\n\t\t\t\tint i = 1;\n\t\t\t\twhile ((heroi.getX_coord()-i) > 0 && (labirinto.getLab()[heroi.getX_coord()-i][heroi.getY_coord()] != 'X')) {\n\t\t\t\t\tfor (int j = 0; j < dragoes.length; j++) {\n\t\t\t\t\t\tif (dragoes[j].getX_coord() == (heroi.getX_coord()-i))\n\t\t\t\t\t\t\tif (dragoes[j].getY_coord() == (heroi.getY_coord())) {\n\t\t\t\t\t\t\t\tif (dragoes[j].isAlive()) {\n\t\t\t\t\t\t\t\t\tdragoes[j].setAlive(false);\n\t\t\t\t\t\t\t\t\tlabirinto.setLabCell(dragoes[j].getX_coord(), dragoes[j].getY_coord(), ' ');\n\t\t\t\t\t\t\t\t\tif (inter == 0)\t\n\t\t\t\t\t\t\t\t\t\tconsole_interface.dragonKilled();\n\t\t\t\t\t\t\t\t\telse if (inter == 3) \n\t\t\t\t\t\t\t\t\t\tMazeDisplay.messageDragonKilled();\n\t\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}\n\t\t\t\t\t}\n\t\t\t\t\t//-----------------------------------------------------------------\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tif (inter == 0)\n\t\t\t\t\tconsole_interface.shotLeft();\n\t\t\t\telse if (inter == 3) {} //shooting function\n\t\t\t\telse {}\n\t\t\t}\n\n\t\t\t//right\n\t\t\telse if (x == -1) {\n\t\t\t\tint i = 1;\n\t\t\t\twhile ((heroi.getX_coord()+i) < labirinto.getSize() && (labirinto.getLab()[heroi.getX_coord()+i][heroi.getY_coord()] != 'X')) {\n\t\t\t\t\tfor (int j = 0; j < dragoes.length; j++) {\n\t\t\t\t\t\tif (dragoes[j].getX_coord() == (heroi.getX_coord()+i))\n\t\t\t\t\t\t\tif (dragoes[j].getY_coord() == (heroi.getY_coord())) {\n\t\t\t\t\t\t\t\tif (dragoes[j].isAlive()) {\n\t\t\t\t\t\t\t\t\tdragoes[j].setAlive(false);\n\t\t\t\t\t\t\t\t\tlabirinto.setLabCell(dragoes[j].getX_coord(), dragoes[j].getY_coord(), ' ');\n\t\t\t\t\t\t\t\t\tif (inter == 0) \n\t\t\t\t\t\t\t\t\t\tconsole_interface.dragonKilled();\n\t\t\t\t\t\t\t\t\telse if (inter == 3) \n\t\t\t\t\t\t\t\t\t\tMazeDisplay.messageDragonKilled();\n\t\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}\n\t\t\t\t\t}\n\t\t\t\t\t//-----------------------------------------------------------------\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tif (inter == 0)\n\t\t\t\t\tconsole_interface.shotRight();\n\t\t\t\telse if (inter == 3) {} //shooting function\n\t\t\t\telse {}\n\t\t\t}\n\n\t\t\t//up\n\t\t\telse if (y == 1) {\n\t\t\t\tint i = 1;\n\t\t\t\twhile ((heroi.getY_coord()-i) > 0 && (labirinto.getLab()[heroi.getX_coord()][heroi.getY_coord()-i] != 'X')) {\n\t\t\t\t\tfor (int j = 0; j < dragoes.length; j++) {\n\t\t\t\t\t\tif (dragoes[j].getY_coord() == (heroi.getY_coord()-i))\n\t\t\t\t\t\t\tif (dragoes[j].getX_coord() == (heroi.getX_coord())) {\n\t\t\t\t\t\t\t\tif (dragoes[j].isAlive()) {\n\t\t\t\t\t\t\t\t\tdragoes[j].setAlive(false);\n\t\t\t\t\t\t\t\t\tlabirinto.setLabCell(dragoes[j].getX_coord(), dragoes[j].getY_coord(), ' ');\n\t\t\t\t\t\t\t\t\tif (inter == 0) console_interface.dragonKilled();\n\t\t\t\t\t\t\t\t\telse if (inter == 3) MazeDisplay.messageDragonKilled();\n\t\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}\n\t\t\t\t\t}\n\t\t\t\t\t//-----------------------------------------------------------------\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tif (inter == 0)\n\t\t\t\t\tconsole_interface.shotUp();\n\t\t\t\telse if (inter == 3) {} //shooting function\n\t\t\t\telse {}\n\t\t\t}\n\n\t\t\t//down\n\t\t\telse { \n\t\t\t\tint i = 1;\n\t\t\t\twhile ((i+heroi.getY_coord()) < labirinto.getSize() && (labirinto.getLab()[heroi.getX_coord()][heroi.getY_coord()+i] != 'X')) {\n\t\t\t\t\tfor (int j = 0; j < dragoes.length; j++) {\n\t\t\t\t\t\tif (dragoes[j].getY_coord() == (heroi.getY_coord()+i))\n\t\t\t\t\t\t\tif (dragoes[j].getX_coord() == (heroi.getX_coord())) {\n\t\t\t\t\t\t\t\tif (dragoes[j].isAlive()) {\n\t\t\t\t\t\t\t\t\tdragoes[j].setAlive(false);\n\t\t\t\t\t\t\t\t\tlabirinto.setLabCell(dragoes[j].getX_coord(), dragoes[j].getY_coord(), ' ');\n\t\t\t\t\t\t\t\t\tif (inter == 0) console_interface.dragonKilled();\n\t\t\t\t\t\t\t\t\telse if (inter == 3) MazeDisplay.messageDragonKilled();\n\t\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}\n\t\t\t\t\t}\n\t\t\t\t\t//-----------------------------------------------------------------\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tif (inter == 0) \n\t\t\t\t\tconsole_interface.shotDown();\n\t\t\t\telse if (inter == 3) {} //shooting function\n\t\t\t\telse {}\n\t\t\t}\n\t\t\theroi.dec_dardos();\n\t\t}\n\t\telse\n\t\t\tif (inter == 0)\n\t\t\t\tconsole_interface.no_darts();\n\t\t\telse if (inter == 3) MazeDisplay.noDarts();\n\t\t\telse {}\n\n\t\tdisplayDragoes();\n\t\tchange_hero_pos();\n\t}",
"private void bulletCollisionWithObject() {\r\n\t\tif(bullet != null) {\r\n\t\t\tGObject collider = getElementAt(bullet.getX() -1 , bullet.getY() + 1);\r\n\t\t\tif (dragon1 != null && collider == dragon1) {\r\n\t\t\t\thit(dragon1);\r\n\t\t\t}\r\n\t\t\tif(dragon2 != null && collider == dragon2) {\r\n\t\t\t\thit(dragon2);\r\n\t\t\t}\r\n\t\t\tif(mehran != null && collider == mehran && bullet.getY() > mehran.getY() + mehran.getHeight() / 2.0) {\r\n\t\t\t\thit(mehran);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Bullet(float x, float y, int bitmapId, float xDest, float yDest, boolean shootsEnemies)\n {\n super(x, y, bitmapId);\n this.xDest = xDest;\n this.yDest = yDest;\n this.shootsEnemies = shootsEnemies;\n\n this.setAngle(calcAngle(x, y, xDest, yDest));\n }",
"public void damage(Bullet bullet)\n {\n\n\thp -= bullet.getDamage();\n\tcheckHP();\n }",
"public List<AProjectile> getBullets() {\n return bullets;\n }",
"private void enemiesWillShoot(Graphics2D g2d, GameState state) {\n if (numOfRenderShoot == 75) {\n numOfRenderShoot = 0;\n for (int i = 0; i < state.getEnemyTanks().size(); i++) {\n if (state.getEnemyTanks().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTanks().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTanks().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTanks().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyMissiles().add(new EnemyMissile(this, state, 10\n , state.getEnemyTanks().get(i)));\n state.getEnemyMissiles().get(state.getEnemyMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyCars().size(); i++) {\n if (state.getEnemyCars().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyCars().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyCars().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyCars().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyBullets().add(new EnemyBullet(this, state, 20\n , state.getEnemyCars().get(i)));\n state.getEnemyBullets().get(state.getEnemyBullets().size() - 1).bulletDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyWallTurrets().size(); i++) {\n if (state.getEnemyWallTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyWallTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyWallTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyWallTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyWallTurretMissiles().add(new EnemyWallTurretMissile(this, state, 15\n , state.getEnemyWallTurrets().get(i)));\n state.getEnemyWallTurretMissiles().get(state.getEnemyWallTurretMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n\n for (int i = 0; i < state.getEnemyTurrets().size(); i++) {\n if (state.getEnemyTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyHomingMissiles().add(new EnemyHomingMissile(this, state, 15\n , state.getEnemyTurrets().get(i)));\n state.getEnemyHomingMissiles().get(state.getEnemyHomingMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n }\n for (EnemyMissile enemyMissile : state.getEnemyMissiles()) {\n enemyMissile.paint(g2d, state);\n }\n for (EnemyBullet enemyBullet : state.getEnemyBullets()) {\n enemyBullet.paint(g2d, state);\n }\n for (EnemyWallTurretMissile enemyWallTurretMissile : state.getEnemyWallTurretMissiles()) {\n enemyWallTurretMissile.paint(g2d, state);\n }\n for (EnemyHomingMissile enemyHomingMissile : state.getEnemyHomingMissiles()) {\n enemyHomingMissile.paint(g2d, state);\n }\n }",
"private void shootMove() {\n for (int i = 0; i < fires.size(); i++) {\n //子弹往上移动\n fires.get(i).move();\n //注意这里remove需要放在下面\n if (fires.get(i).y < -1000) {\n fires.remove(fires.get(i));\n }\n }\n\n }",
"private void shootingMotion(final View v, final float x, final float y) {\n setBulletLocation(v, x, y);\n ObjectAnimator animation = ObjectAnimator.ofFloat(v, \"translationY\", -300f);\n animation.setDuration(2000);\n animation.start();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n checkOnHit(v);\n }\n }, 1300);\n }",
"public static void shoot(double speed)\n\t{\n\t\trunIntake(0, 0, true, speed, speed, false);\n\t}",
"@Override\n public void update(GameContainer gc, StateBasedGame stateBasedGame, int delta) throws SlickException {\n timeSinceStart += delta;\n rtimeSinceStart += delta;\n Input input = gc.getInput();\n int mouseX = input.getMouseX();\n int mouseY = input.getMouseY();\n\n\n basicbulletSheet.rotate(90f);\n basicbulletSheet.setCenterOfRotation(16, 16);\n\n // Move this bullet\n for (int i = 0; i < bulletList.size(); i++) {\n bullet = bulletList.get(i);\n bullet.move();\n }\n\n //Add this tower to the this towerList\n if (Tower.isBasicPlaced()) {\n basicTowers.add(new BasicTower());\n System.out.println(basicTowers);\n Tower.setBasicPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isBomberPlaced()) {\n bomberTowers.add(new BomberTower());\n System.out.println(bomberTowers);\n Tower.setBomberPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isSniperPlaced()) {\n sniperTowers.add(new SniperTower());\n System.out.println(sniperTowers);\n Tower.setSniperPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isQuickPlaced()) {\n quickTowers.add(new QuickTower());\n System.out.println(quickTowers);\n Tower.setQuickPlaced(false);\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BasicTower basicTower1 : basicTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > basicTower1.rcoolDown + basicTower1.rlastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n basicTower1.basicClicked.setRotation((float) getTargetAngle(basicTower1.towerX,\n basicTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n basicTower1.basicClicked.setCenterOfRotation(32, 32);\n basicTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > basicTower1.coolDown + basicTower1.lastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n addNewBullet2(basicTower1.towerX, basicTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n basicTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BomberTower bomberTower1 : bomberTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > bomberTower1.rcoolDown + bomberTower1.rlastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n bomberTower1.bomberClicked.setRotation((float) getTargetAngle(bomberTower1.bombertowerX,\n bomberTower1.bombertowerY, enemy.getStartPosX(), enemy.getStartPosY()));\n bomberTower1.bomberClicked.setCenterOfRotation(32, 32);\n bomberTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > bomberTower1.coolDown + bomberTower1.lastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n addNewBullet2(bomberTower1.bombertowerX, bomberTower1.bombertowerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n bomberTower1.lastShot = timeSinceStart;\n }\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (SniperTower sniperTower1 : sniperTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > sniperTower1.rcoolDown + sniperTower1.rlastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n sniperTower1.sniperClicked.setRotation((float) getTargetAngle(sniperTower1.towerX,\n sniperTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n sniperTower1.sniperClicked.setCenterOfRotation(32, 32);\n sniperTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n if (timeSinceStart > sniperTower1.coolDown + sniperTower1.lastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n addNewBullet2(sniperTower1.towerX, sniperTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 50);\n sniperTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (QuickTower quickTower1 : quickTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > quickTower1.rcoolDown + quickTower1.rlastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n quickTower1.quickClicked.setRotation((float) getTargetAngle(quickTower1.towerX,\n quickTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n quickTower1.quickClicked.setCenterOfRotation(32, 32);\n quickTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n\n if (timeSinceStart > quickTower1.coolDown + quickTower1.lastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n radiusVisited = true;\n addNewBullet2(quickTower1.towerX, quickTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 5);\n quickTower1.lastShot = timeSinceStart;\n }\n }\n\n }\n }\n\n //A spawn is in progress\n if (spawninProgress) {\n timePassedEnemy += delta;\n if (timePassedEnemy > 800) {\n enemies.add(new Enemy());\n enemySpawns++;\n timePassedEnemy = 0;\n }\n }\n //When enough enemies has spawned, stop the spawninProgress\n if (enemySpawns == enemyCounter) {\n spawninProgress = false;\n //hasbeenDead = false;\n enemySpawns = 0;\n enemyCounter++;\n }\n\n //When no more enemies on maps\n if (enemies.size() == 0) {\n waveinProgress = false;\n startWaveCount = 0;\n }\n\n //Start a new level when there's no more enemies on the map\n if (loadMap.MAP[mouseY / w][mouseX / w] == 16) {\n if (input.isMousePressed(0) && startWaveCount == 0 && !waveinProgress) {\n startWaveCount++;\n if (startWaveCount == 1 && enemies.size() == 0 && !waveinProgress) {\n waveinProgress = true;\n gc.resume();\n spawninProgress = true;\n currentLevel++;\n }\n }\n }\n\n //For each new level, increase the HP of each enemy\n if (currentLevel < currentLevel + 1 && !waveinProgress) {\n for (Enemy enemyHP : enemies) {\n if (enemyHP.getStartPosX() <= 0 && enemyHP.getHP() < enemyHP.startHP + currentLevel) {\n enemyHP.setHP(enemyHP.getHP() + currentLevel);\n }\n }\n }\n\n\n //For each enemies, if enemies has finished their way, decrease player HP\n //and set them inactive\n for (Enemy enemyList : enemies) {\n if (enemyList.counter >= enemyList.path.getLength() - 1) {\n player.decreaseLife();\n bulletCount = 0;\n enemyList.isActive = false;\n }\n\n //If enemies' hp is zero, set them inactive and remove from the list\n if (enemyList.getHP() <= 0) {\n enemyList.isActive = false;\n bulletCount = 0;\n player.addCredits(20);\n }\n enemyList.update(gc, stateBasedGame, delta);\n }\n for (int i = 0; i < enemies.size(); i++) {\n if (!enemies.get(i).isActive) {\n enemies.remove(enemies.get(i));\n }\n }\n\n //For all objects, update\n for (GameObject obj : objects)\n try {\n obj.update(gc, stateBasedGame, delta);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //Go to Menu\n if (gc.getInput().isKeyPressed(Input.KEY_ESCAPE)) {\n gc.getInput().clearKeyPressedRecord();\n stateBasedGame.enterState(2);\n }\n\n\n }",
"public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}",
"public ArrayList<Bullet> getNewBullets()\r\n\t{\r\n\t\tArrayList<Bullet> fire = new ArrayList<Bullet>();\r\n\t\tfor (Bullet bullet : bullets)\r\n\t\t{\r\n\t\t\tif (bullet instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\tfire.add(new AvatarBullet((AvatarBullet) bullet));\r\n\t\t\t}\r\n\t\t\telse if (bullet instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tfire.add(new EnemyBullet((EnemyBullet) bullet));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fire;\r\n\t}",
"public void shoot() {\n _shooterMotor1.set(_targetRPM);\n }",
"private void killBullet() {\r\n this.dead = true;\r\n }",
"@Override\n public Bullet getBullet() {\n return new EnemyGunBullet1();\n }",
"public void isShooting(GameContainer gc) throws LineUnavailableException{\r\n\t\tif(gc.getInput().isKeyPressed(Input.KEY_SPACE) || gc.getInput().isKeyPressed(Input.KEY_UP)){\r\n\t\t\tif(!this.bullet.isMoved()){\r\n\t\t\t\tthis.playSound();\r\n\t\t\t\tanimation = this.shooting;\r\n\t\t\t\tthis.bullet.position.x = super.getShape().getCenterX();\r\n\t\t\t\tthis.bullet.position.y = super.getShape().getCenterY();\r\n\t\t\t\tthis.getBullet().setMoved(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.getBullet().isMoved()){\r\n\t\t\tthis.bullet.move();\r\n\t\t}\r\n\t}",
"public void hitEvent(Collidable beingHit, Fire bullet) {\r\n int index = this.enemies.indexOf((Enemy) beingHit);\r\n this.removeEnemy((Enemy) beingHit);\r\n this.startLocations.remove(index);\r\n }",
"private void shoot(float angle) {\n\t\tfloat arc = FIRING_ARC;\n\t\tif (weapon instanceof BanditTripleShot)\n\t\t\tarc *= 2;\n\t\t\t\n\t\tif (angle < FIRING_ARC && angle > - FIRING_ARC) {\n\t\t\t//System.out.println(\"BANDIT: shooting\");\n\t\t\tweapon.shoot();\n\t\t}\n\t}",
"public void shootGun() {\n\t\tammo--;\n\t}",
"public void manualShoot(double speed) {\n shooter1.set(speed);\n }",
"@Override\n\tpublic WeaponSelection shoot(List<Weapon> loaded) {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"shoot\");\n\t\treturn getWeaponSelection(loaded, message);\n\t}",
"public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }",
"public void addBullet(Bullet bullet) {\n\t\tif(bulletList.size() < GameParameters.getInstance().maxBulletAllowed) {\n//\t\t\tsynchronized (bulletList) {\n\t\t\t\tbulletList.add(bullet);\n//\t\t\t}\n\t\t}\n\n\t\t// Log.e(null, \"size of bulletList: \" + bulletList.size());\n\t}",
"public void tryToFire() {\n\t\tif (System.currentTimeMillis() - lastFire < firingInterval) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// if we waited long enough, create the shot entity, and record the time.\n\t\tlastFire = System.currentTimeMillis();\n\t\tShotEntity shot = new ShotEntity(this,\"shot.gif\",ship.getX()+10,ship.getY()-30, 1);\n\t\tentities.add(shot);\n\t}",
"public void shootIntoCargoShip(){\n shoot.set(SHIP_SHOOT);\n }",
"public EnemyGunBullet1() {\n super(DAMAGE, SPEED);\n setEnemyBullet(true);\n setShootSound(\"enemyShot.wav\");\n try {\n image = ImageIO.read(new File(\"res/images/tanks/bullets/enemyBullet1.png\"));\n }\n catch (IOException e) { }\n }",
"public void setBulletintype(Integer bulletintype) {\n this.bulletintype = bulletintype;\n }"
] | [
"0.87389165",
"0.8098181",
"0.7947561",
"0.79287493",
"0.78681195",
"0.75584286",
"0.75192106",
"0.7500536",
"0.7468025",
"0.74177754",
"0.7370644",
"0.7283561",
"0.72748095",
"0.7233559",
"0.71109265",
"0.71045965",
"0.70600533",
"0.70493686",
"0.69732124",
"0.69471556",
"0.69423145",
"0.6850263",
"0.68417317",
"0.6836364",
"0.68047243",
"0.6792362",
"0.67366713",
"0.6704241",
"0.6654484",
"0.665093",
"0.66097194",
"0.65943396",
"0.65643865",
"0.6553",
"0.65253556",
"0.6518584",
"0.6500323",
"0.64746064",
"0.6451199",
"0.64204746",
"0.6412221",
"0.6403166",
"0.6402279",
"0.6398844",
"0.63937443",
"0.63908046",
"0.6379172",
"0.6353888",
"0.63453627",
"0.6337646",
"0.6333154",
"0.6302393",
"0.62828505",
"0.6277774",
"0.62738025",
"0.62432355",
"0.61963445",
"0.61791945",
"0.61726636",
"0.61726636",
"0.6152759",
"0.6131047",
"0.61236095",
"0.6107529",
"0.6106318",
"0.61010414",
"0.60867846",
"0.6080959",
"0.60783446",
"0.60745734",
"0.605785",
"0.6051019",
"0.604308",
"0.60362226",
"0.6035327",
"0.6026179",
"0.6002319",
"0.599833",
"0.5976294",
"0.59673196",
"0.59483916",
"0.5935563",
"0.5920606",
"0.59057325",
"0.58966035",
"0.5885367",
"0.5867493",
"0.5862281",
"0.58346874",
"0.58342916",
"0.582268",
"0.5818147",
"0.5817099",
"0.5807622",
"0.58026314",
"0.57847595",
"0.57543415",
"0.57524085",
"0.56700474",
"0.5644067"
] | 0.8292506 | 1 |
Returns whether the player is alive | public boolean isAlive(){
if(this.hp <= 0){
return false;
}
else{
return true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}",
"public boolean isAlive(){\r\n if (currHP > 0){\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean alive() {\r\n\t\treturn myHP > 0;\r\n\t}",
"public boolean isAlive() {\r\n\t\treturn hp > 0;\r\n\t}",
"public boolean isAlive() {\n return health > 0;\n }",
"public boolean isAlive(){\n \t\treturn alive;\n \t}",
"public boolean isAlive()\n\t{\n\t\treturn alive;\n\t}",
"public boolean isAlive()\n\t{\n\t\treturn alive;\n\t}",
"public boolean isAlive() { return alive; }",
"public boolean isAlive()\n {\n return alive;\n }",
"public boolean isAlive() {\r\n\t\treturn alive;\r\n\t}",
"public boolean isAlive() {\r\n\t\treturn life > 0;\r\n\t}",
"public boolean isAlive(){\n \treturn alive;\r\n }",
"boolean isAlive() { return alive; }",
"public boolean isAlive() {\n\t\treturn aliveStatus;\n\t}",
"@Override\n public boolean isAlive() {\n return health > 0f;\n }",
"public boolean isAlive() {\n return alive;\n }",
"public boolean isAlive() {\n return alive;\n }",
"public boolean isAlive() {\n return this.getHealthPower().hasSomeHealth();\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 isAlive() {\n\t\treturn alive;\n\t}",
"public boolean isAlive() {\n\t\treturn alive;\n\t}",
"public boolean isAlive() {\n\t\treturn alive;\n\t}",
"protected boolean isAlive()\n {\n return alive;\n }",
"protected boolean isAlive()\n {\n return alive;\n }",
"public final boolean isAlive() {\n return alive;\n }",
"public boolean isAlive() {\r\n return (lives() > 0);\r\n }",
"boolean playerExists() {\n return this.game.h != null;\n }",
"public boolean isAlive(){\n\t\treturn isAlive;\n\t}",
"public boolean isAlive(){\n\t\treturn lifeForce > 0;\n\t}",
"boolean GameOver() {\n\t\treturn player.isDead();\n\t}",
"public boolean isAlive() {\n\t\treturn isAlive;\n\t}",
"boolean getAlive();",
"public boolean isAlive() {\n\t\treturn this.alive;\n\t}",
"public boolean isAlive();",
"boolean isAlive();",
"boolean isAlive();",
"public boolean getAlive() {\n return alive_;\n }",
"public boolean isPlayer() {\n return player != null;\n }",
"boolean getIsAlive();",
"public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }",
"public void checkHealth()\n {\n if(player.getHealth() <= 0)\n {\n System.out.println(\"\\n\" + \"You are dead :(\" + \"\\n\");\n alive = false;\n }\n }",
"public boolean avengersAlive() {\n\t\tif (avengersHp <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isAlive(Entity entity ) {\r\n\t\tboolean charIsAlive = false; \t\r\n\t\twhile (entity.getHealth()>0) {\r\n\t\t\t\tif(entity.getHealth() >0) {\r\n\t\t\t\t\tcharIsAlive = true; \r\n\t\t\t\t\t} \r\n\t\t\t}\r\n\t\treturn charIsAlive; \r\n\t}",
"public boolean getIsAlive() {\n return isAlive;\n }",
"@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}",
"protected boolean getIsAlive() {\n\t\treturn isAlive;\n\t}",
"public boolean isOnline()\n\t{\n\t\treturn PlayerManager.getPlayer(name)!=null;\n\t}",
"public final boolean isAlive() { return true; }",
"public boolean isHasPlayer() {\n\t\treturn HasPlayer;\n\t}",
"public boolean isAlive() {\n return this.isAlive;\n }",
"public boolean avatarAlive()\n\t{\n\t\treturn (avatar.getHitPoints() > 0);\n\t}",
"public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }",
"public boolean getAlive() {\n return instance.getAlive();\n }",
"public boolean checkPet() {\r\n return this.player.pet.getIsAlive();\r\n }",
"public boolean isAlive() {\n\t\treturn state;\n\t}",
"boolean isAlive(Unit unit);",
"public boolean isAlive() {\n synchronized (this) {\n return mIsAlive;\n }\n }",
"public boolean live(String nom){\n\treturn players.get(nom);\n }",
"public boolean isPlayerDefeated() {\n if (player.getHealth() <= 0) {\n return true;\n }\n return false;\n }",
"private boolean playerDetection() {\n\t\tAxisAlignedBB axisalignedbb = new AxisAlignedBB(posX, posY, posZ, posX + 1, posY + 1, posZ + 1).grow(DETECTION_RANGE);\n\t\tList<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);\n\n\t\treturn !list.isEmpty();\n\t}",
"public boolean isCurrentPlayer() {\n return playerStatus.isActive;\n }",
"private boolean isAlive()\n {\n if (null != t && t.isAlive())\n {\n return true;\n }\n return false;\n }",
"@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }",
"public boolean isHasPlayers() {\n\t\treturn HasPlayers;\n\t}",
"public boolean isOnline() {\n \t\treturn (type == PLAYER_ONLINE);\n \t}",
"public boolean isKingAlive() {\n\t\tfinal List<Piece> pieces =\tnew ArrayList<Piece>(positionToPieceMap.values());\n \tfor (Piece piece : pieces) {\n \t\tif (piece instanceof King && piece.getOwner() == getCurrentPlayer()) {\n \t\t\treturn true;\n \t\t}\n\t\t}\n \treturn false;\n\t}",
"public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }",
"public boolean hasPlayerInfo()\n {\n return this.getPlayerInfo() != null;\n }",
"public boolean activeFor(String player);",
"public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }",
"public boolean isOnline ( ) {\n\t\treturn getBukkitPlayerOptional ( ).isPresent ( );\n\t}",
"public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}",
"@Override\n\tpublic boolean playerWon() {\n\t\treturn lastPlayerWin;\n\t}",
"Boolean isPlaying() {\n return execute(\"player.playing\");\n }",
"public boolean isDead() {\r\n\t\treturn !isAlive();\r\n\t}",
"public boolean isDead() {\n\t\treturn (currentHP<=0);\n\t}",
"public boolean isAvailable(Player player) {\n return playerList.contains(player);\n }",
"public boolean lokiAlive() {\n\t\tif (lokiHp <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}",
"boolean stillAlive();",
"public boolean isLoaded(P player){\n return playerMap.containsKey(player);\n }",
"public boolean playerExists(String username) {\n return getPlayer(username) != null;\n }",
"public static boolean characterDeathCheck(){\n if (MainCharacter.hpNow <= 0){\n return true;\n }\n return false;\n }",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"boolean isGameSpedUp();",
"private boolean playerAlive(int curPlayerRow, int curPlayerCol){\n return (gameBoard[curPlayerRow][curPlayerCol].isAlive());\n }",
"public boolean hasOnlinePlayers() {\n for (Player p : players) {\n if (p.isOnline())\n return true;\n }\n return false;\n }",
"@Override\n public final boolean isAlive() {\n return safetyHelper.isAlive();\n }",
"public boolean isGameRunning()\n\t{\n\t\treturn zegar.isRunning() || wToku;\n\t}",
"public boolean isDead() {\n\t\tif (_currentHealth <= 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }",
"@Override\n public boolean isDead() {\n return (this.getLife() <= 0);\n }",
"public boolean isSetPlayer() {\n return this.player != null;\n }",
"public boolean existsPlayer(String username) {\r\n return ctrlDomain.existsPlayer(username);\r\n }",
"public boolean isAlive () {\n return (daemon != null) && daemon.isAlive();\n }",
"public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}",
"public abstract boolean isPlayer();",
"private boolean isAlive(){\n boolean alive = true;\n for(int i = 0; i < COLS; i++){\n if(grid[ROWS - 1][i].num != 0) {\n alive = false;\n }\n }\n return alive;\n }",
"public boolean isDead() {\r\n\t\treturn this.lives == 0;\r\n\t}"
] | [
"0.83900934",
"0.79833716",
"0.797492",
"0.7942476",
"0.79322314",
"0.7660454",
"0.76170504",
"0.76170504",
"0.7569009",
"0.7555264",
"0.75543976",
"0.7552341",
"0.7548542",
"0.75320584",
"0.753164",
"0.75310117",
"0.7525018",
"0.7525018",
"0.7523748",
"0.7517384",
"0.75140244",
"0.75140244",
"0.75140244",
"0.74783",
"0.74783",
"0.7467207",
"0.74587977",
"0.7286723",
"0.7256879",
"0.725519",
"0.7240415",
"0.7229747",
"0.7216051",
"0.7199721",
"0.7197779",
"0.71834916",
"0.71834916",
"0.7129039",
"0.71084046",
"0.70773786",
"0.70325786",
"0.7025624",
"0.7021758",
"0.7015663",
"0.6998216",
"0.69483495",
"0.69404286",
"0.69273174",
"0.6900556",
"0.6895561",
"0.68931186",
"0.68841237",
"0.6877004",
"0.6851126",
"0.68343776",
"0.6820045",
"0.6809049",
"0.67950976",
"0.6782961",
"0.6781783",
"0.6766601",
"0.67384654",
"0.6715134",
"0.6712727",
"0.67045164",
"0.66935986",
"0.66718274",
"0.6662879",
"0.6648932",
"0.66257274",
"0.6619704",
"0.6600451",
"0.656931",
"0.65550697",
"0.6539444",
"0.6528866",
"0.6521465",
"0.6521122",
"0.65183616",
"0.65087026",
"0.6508212",
"0.64996517",
"0.648421",
"0.6467347",
"0.6454674",
"0.6451391",
"0.644813",
"0.6437318",
"0.6416202",
"0.6413205",
"0.64083207",
"0.6403606",
"0.6399008",
"0.63982344",
"0.6395219",
"0.6395163",
"0.6392806",
"0.6392395",
"0.6385311",
"0.6376699"
] | 0.78898036 | 5 |
Returns the score the of the player | public int getScore(){ return this.score; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int getPlayerScore()\r\n\t{\r\n\t\treturn playerScore;\r\n\t}",
"public int getPlayerScore();",
"public int getPlayerScore(){\n\t\treturn playerScore;\n\t}",
"public int getScore(){\n\t\treturn playerScore;\n\t}",
"@Override\n public int getScore(String username) throws RemoteException {\n Player p = getPlayer(username);\n return p != null ? p.getScore() : -1;\n }",
"public int getScore() {\n return getStat(score);\n }",
"public int getPlayerScore(){\n return this.playerScore;\n }",
"public static int getScore()\n {\n return score;\n }",
"public static int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}",
"public static int getScore()\n\t{\n\t\treturn score;\n\t}",
"public ScoreValues getScore(int player) {\n switch (player) {\n case PLAYER_A:\n return scoreA;\n case PLAYER_B:\n return scoreB;\n }\n return -1;\n }",
"private Score getScore(Player player) {\n Game game = Dogfight.instance.getGame(player);\n\n if (game != null) {\n Team team = game.getPlayerRegistry().getTeam(player);\n\n if (team != null) {\n return game.getScoreRegistry().getScore(team);\n }\n }\n\n return null; //No game found\n }",
"public int getPlayerScore(int index) {\n\t\treturn allplayers.get(index).getScore();\n\t}",
"public int score() {\n return score;\n }",
"Float getScore();",
"@Override\n\tpublic int getPlayerOneScore() {\n\t\treturn super.getPlayerOneScore();\n\t}",
"public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}",
"public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}",
"float getScore();",
"float getScore();",
"public static int getScore(){\n return score;\n }",
"public int getScore() {\n\t\treturn (score);\n\t}",
"public int getScore() {\r\n return score;\r\n }",
"public int getScore() {\r\n return score;\r\n }",
"public int getScore() {\r\n return score;\r\n }",
"public int getScore() {\n return score;\n }",
"public int getScore() {\n return score;\n }",
"public int getScore() {\n return score;\n }",
"public java.lang.Integer getScore () {\r\n\t\treturn score;\r\n\t}",
"int getScore();",
"public int getScore() {\n return this.score;\n }",
"@Override\n\tprotected int calculateScore() {\n\t\treturn Math.abs(playerScore[0] - playerScore[1]);\n\t}",
"public int getScore()\n\t{\n\t\treturn this.score;\n\t}",
"public final int getScore() {\n\t\treturn score;\n\t}",
"public int getScore() {\r\n \treturn score;\r\n }",
"public int getScore(){\r\n\t\treturn score;\r\n\t}",
"public int getScore(){\r\n\t\treturn score;\r\n\t}",
"public int getScore() {\n return currentScore;\n }",
"public int getScore(){\n\t\treturn this.score;\n\t}",
"public int getScore(){\n\t\treturn this.score;\n\t}",
"public int getScore(String playerName) {\n\t\treturn this.getMancala(playerName).getStones() + this.getStonesInPits(playerName);\n\t}",
"public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}",
"public int getScore() {\r\n\t\treturn score;\r\n\t}",
"public int getScore() {\r\n\t\treturn score;\r\n\t}",
"public int getScore(){\n\t\treturn score;\n\t}",
"public int getScore(){\n\t\treturn score;\n\t}",
"public int getScore()\n {\n return score;\n }",
"public int getScore()\n {\n return currentScore;\n }",
"public int getScore ()\r\n {\r\n\treturn score;\r\n }",
"public Integer getScore() {\r\n return score;\r\n }",
"public Integer getScore() {\n return score;\n }",
"long getScore();",
"long getScore();",
"long getScore();",
"long getScore();",
"public int getScore() {\n\t\treturn score;\n\t}",
"public int getScore() {\n\t\treturn score;\n\t}",
"public int getScore() {\n\t\treturn score;\n\t}",
"public int getScore() {\n\t\treturn score;\n\t}",
"public int getScore() {\n\t\treturn score;\n\t}",
"public int getScore() {\n\t\treturn score;\n\t}",
"public long getScore() {\n return score_;\n }",
"public long getScore() {\n return score_;\n }",
"public int score(){\r\n\t\t//to be implemented: should return game score \r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tscore= frames.get(i).score();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn score + bonusGame;\r\n\t}",
"public int getScore() {\n\t\treturn this.score;\n\t}",
"public float getScore() {\n return score;\n }",
"public long getScore() {\n return score_;\n }",
"public long getScore() {\n return score_;\n }",
"public double getScore() {\r\n return score;\r\n }",
"public Integer getGameScore() {\n return gameScore;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getScore();",
"int getScoreValue();",
"public int getOpponentScore(){\n return this.oppoScore;\n }",
"public double getScore() {\n\t\t\treturn this.score;\n\t\t}",
"public float getScore() {\r\n\t\treturn score;\r\n\t}",
"int getScore() {\n return score;\n }",
"public float getScore() {\n\t\treturn score;\n\t}",
"public int getScore()\n\t{\n\t\tif (containsAce() && score < 11)\n\t\t\treturn score + 10;\n\t\t\t\n\t\treturn score;\n\t}",
"public int getScore() {\n\t\treturn this.ScoreValue;\n\t}",
"public int getScore() { return score; }",
"public int getScore () {\n return mScore;\n }",
"public int getScore()\n {\n // put your code here\n return score;\n }",
"public int getScore() {\r\n\t\treturn deck.getScore() + extraVictory;\r\n\t}",
"public int score() {\n return hand.handVal(0);\n }",
"public double getScore() {\r\n return mScore;\r\n }",
"public int getCurrentScore() {\n return currentScore;\n }",
"public int getScore() {return score;}",
"public Double getScore() {\n return this.score;\n }",
"public Double getScore() {\n return this.score;\n }",
"@Override\n public int getScore() {\n return totalScore;\n }",
"@Override\n public int getScore() {\n return score;\n }",
"public int getTotalScore() {\r\n return totalScore;\r\n }",
"int score(Player player)\n\t{\n\t\treturn IntStream.range(0, state.size())\n\t\t\t.map(i -> state.get(i) == player.getId() ? (int) Math.pow(2, i) : 0)\n\t\t\t.reduce(0, (a, b) -> a + b);\n\t}",
"public Score getScore() {\n\t\treturn score;\n\t}",
"public String getScore() {\n String scoreMessage;\n if (noWinner() && !(isDeuce())) {\n scoreMessage = (isTie()) ? gameTie() : currentScore();\n }else if (isDeuce()){\n scoreMessage = \"Deuce\";\n }else {\n scoreMessage = advanceGame();\n }\n return scoreMessage;\n }",
"public int returnPoints()\n {\n return score ;\n }",
"@Override\r\n\tpublic double getScore() {\n\t\treturn score;\r\n\t}",
"public Float getScore() {\n return score;\n }",
"public int getTotalScore(){\r\n return totalScore;\r\n }",
"@Override\r\n\tpublic double getScore() \r\n\t{\r\n\t\treturn this._totalScore;\r\n\t}",
"public Long getScore() {\n return score;\n }"
] | [
"0.86622626",
"0.8512299",
"0.851152",
"0.8505501",
"0.79400545",
"0.7858375",
"0.7816581",
"0.77734965",
"0.773027",
"0.77111894",
"0.7655125",
"0.7570255",
"0.7561302",
"0.7553569",
"0.7536138",
"0.7532888",
"0.75245965",
"0.75245965",
"0.7513824",
"0.7513824",
"0.75010073",
"0.7496445",
"0.7482005",
"0.7482005",
"0.7482005",
"0.74674976",
"0.74674976",
"0.7458153",
"0.7449303",
"0.7431779",
"0.742728",
"0.74236745",
"0.74202126",
"0.7416659",
"0.74120855",
"0.74116457",
"0.74116457",
"0.740111",
"0.7399007",
"0.7399007",
"0.73940843",
"0.73935837",
"0.7380968",
"0.7380968",
"0.7378966",
"0.7378966",
"0.7374277",
"0.73734444",
"0.7350993",
"0.7324847",
"0.7324173",
"0.7323687",
"0.7323687",
"0.7323687",
"0.7323687",
"0.7322662",
"0.7322662",
"0.7322662",
"0.7322662",
"0.7322662",
"0.7322662",
"0.73145354",
"0.73145354",
"0.7304503",
"0.72941554",
"0.72844356",
"0.727527",
"0.727527",
"0.7273819",
"0.72731405",
"0.7260769",
"0.726055",
"0.72475255",
"0.724278",
"0.7241784",
"0.7227763",
"0.7218954",
"0.72184193",
"0.7214375",
"0.7212934",
"0.7201069",
"0.719912",
"0.71931684",
"0.71737427",
"0.7168141",
"0.7154808",
"0.71539533",
"0.71403867",
"0.71403867",
"0.7139182",
"0.71376485",
"0.71374804",
"0.7126048",
"0.7123051",
"0.7106322",
"0.7105403",
"0.7094158",
"0.7085362",
"0.70667046",
"0.70561904",
"0.7052742"
] | 0.0 | -1 |
Sets the score of the player | public void setScore(int score) { this.score = score; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}",
"public void setScore(){\n\t\t//get player's score and change it to the string\n\t\tthis.scoreLabel.setSize(scoreLabel.getPreferredSize().width, \n\t\t\t\tscoreLabel.getPreferredSize().height);\n\t\tthis.scoreLabel.setText(String.valueOf(this.player.getScore()));\n\t}",
"public void setScore(int score) {\r\n this.score = score;\r\n }",
"public void setScore(int score) {\r\n this.score = score;\r\n }",
"public void setScore(int score)\n {\n this.score = score;\n }",
"public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}",
"public void setScore(int score) {\n this.score = score;\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}",
"public void setNewScore(String player, int score) {\n\t\t\n\t}",
"public void setScore(int score){\n\t\tthis.score = score;\n\t}",
"public void setScore(int score) {this.score = score;}",
"public void setScore(String score) {\n this.score = score;\n setChanged();\n notifyObservers();\n }",
"void setScore(long score);",
"public void setScore(int score)\n\t{\n\t\tthis.score=score;\n\t}",
"void setScoreValue(int scoreValue);",
"public synchronized void setScore(Integer score) {\n this.score += score;\n }",
"public void setScore(Integer score) {\r\n this.score = score;\r\n }",
"public void setScore(double score) {\r\n this.score = score;\r\n }",
"public void setScore(Integer score) {\n this.score = score;\n }",
"public void setScore(int paScore) {\n this.score = paScore;\n }",
"public void setScore(java.lang.Integer value);",
"public void setScore (java.lang.Integer score) {\r\n\t\tthis.score = score;\r\n\t}",
"public void setScore(float score) {\n this.score = score;\n }",
"public void setScore(int score) {\n\t\tthis.score = score;\n\t}",
"public void setScore(int score) {\r\n\t\tif(score >=0) {\r\n\t\t\tthis.score = score;\r\n\t\t}\r\n\t\t\r\n\t}",
"public void setScore(Float score) {\n this.score = score;\n }",
"void setScore(int score) {\n lblScore.setText(String.valueOf(score));\n }",
"public void setScore(float value) {\n this.score = value;\n }",
"private void setScore(String score) {\r\n this.score = score;\r\n }",
"public void setObjectiveScore(String name, Player player, int value) {\n scoreboard.getObjective(name).getScore(player.getName()).setScore(value);\n }",
"@Override\n public void setScore(int score) throws IllegalStateException {\n objective.checkValid();\n this.score = score;\n objective.getScoreboard()\n .broadcast(new ScoreboardScoreMessage(entry, objective.getName(), score));\n }",
"protected void setOnePlayerHumanScore(int score){\n this.humanWinsCPU_TextField.setText(Integer.toString(score));\n }",
"public void updateScore(int score){ bot.updateScore(score); }",
"public void setScore(Score score) {\n scoreProperty.set(score.packed());\n }",
"public void setScore (int newScore)\n {\n this.score = newScore;\n }",
"public void setScore(Double score) {\n this.score = score;\n }",
"public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}",
"private void setPlayerScore(Player player, int newScore) {\n\t\tplayer.score = Math.max(newScore, 0);\n\t\tfor (ScoreMarker scoreMarker : playerScoreMarkers) {\n\t\t\tif (scoreMarker.getOwner() == player) {\n\t\t\t\tscoreMarker.value = String.valueOf(player.score);\n\t\t\t}\n\t\t}\n\t}",
"public Scores(String player, int score) {\r\n this.player = player;\r\n this.score = score;\r\n }",
"void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }",
"public void setScore(Short score) {\n this.score = score;\n }",
"public void setScore (java.lang.Float score) {\n\t\tthis.score = score;\n\t}",
"public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}",
"public PlayerScore (String name, int score)\n {\n playerName = name;\n playerScore = score;\n }",
"public void setScore(String score) {\n\t\tthis.score = score;\n\t}",
"public void setCurrentScore(int currentScore) {\n this.currentScore = currentScore;\n }",
"public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}",
"public Scores(int score) {\r\n this.score = score;\r\n }",
"public final void setScore(java.lang.Double score)\r\n\t{\r\n\t\tsetScore(getContext(), score);\r\n\t}",
"public void changeScore(String score) {\n typeScore(score);\n saveChanges();\n }",
"public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }",
"public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}",
"public int getScore(){\n\t\treturn playerScore;\n\t}",
"public static void incrementScore() {\n\t\tscore++;\n\t}",
"public static void setScoreBoard(Player p) {\n\t\n}",
"@Override\n\tpublic void setPlayerOneScore(int playerOneScore) {\n\t\tsuper.setPlayerOneScore(playerOneScore);\n\t}",
"private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}",
"@Test\n public void testSetScore() {\n System.out.println(\"setScore\");\n int score = 5;\n Player instance = new Player(PlayerColor.WHITE, \"\");\n instance.setScore(score);\n\n assertEquals(score, instance.getScore());\n }",
"public void setScore(int s) {\n if (s > getHighScore()) {\n setHighScore(s);\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy/MM/dd HH:mm:ss\");\n LocalDateTime now = LocalDateTime.now();\n String timeNow = dtf.format(now);\n setHighScoreTime(timeNow);\n }\n setStat(s, score);\n }",
"public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }",
"public void setGameScore(Integer gameScore) {\n this.gameScore = gameScore;\n }",
"@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }",
"@Override\n public void passScore(int score) {\n this.score = score;\n scoreFragment.setData(score);\n }",
"public boolean setScoreTeamOne(int score)\r\n\t{\r\n\t\tif (!editableMatch)\r\n\t\t\treturn false;\r\n\t\tscore1 = score;\r\n\t\treturn true;\r\n\t}",
"public int getPlayerScore(){\n\t\treturn playerScore;\n\t}",
"public void displayForPlayerA(int score) {\n scoreViewPlayerA.setText(String.valueOf(score));\n }",
"public void setScore(java.lang.String value) {\n\t\tsetValue(org.jooq.examples.cubrid.demodb.tables.Record.RECORD.SCORE, value);\n\t}",
"public Builder setScore(long value) {\n \n score_ = value;\n onChanged();\n return this;\n }",
"public Builder setScore(long value) {\n \n score_ = value;\n onChanged();\n return this;\n }",
"void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }",
"public void addScore(int score) {\n currentScore += score;\n }",
"public void notifyScoreChange(int score) {\n scoreLabel.setText(String.valueOf(score));\n }",
"public void setScore(int hole, int score) {\n\t\tif (hole < 1 || hole > 18) return;\n\t\tscores[hole - 1] = score;\n\t}",
"public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }",
"public void updateScore(){\n scoreChange++;\n if(scoreChange % 2 == 0){\n if(score_val < 999999999)\n score_val += 1;\n if(score_val > 999999999)\n score_val = 999999999;\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n if(scoreChange == 10000)\n scoreChange = 0;\n }\n }",
"public void setScoreStitok() {\n this.scoreStitok.setText(\"Score \" + this.score);\n }",
"public void addToScore(int score)\n {\n this.score += score;\n }",
"void setFitnessScore(double score){\n fitnessScore = score;\n }",
"@Override\r\n\tpublic boolean updateScore(int score) {\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"update member set score=score+\"+score+\" where id='\"+LoginServiceImpl.getCurrentUser().getID()+\"'\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\t\r\n\t\t\tif(ps.executeUpdate()==0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}else\r\n\t\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}",
"public static void setActivityScore(int score) {\n\n\t\tmActivityScore = score;\n\t}",
"@Test\n void updateScore() {\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.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }",
"private void updateScore(int point) {\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(SCORE_KEY, mScore);\n\n }",
"public void setMyScoreDisplay(String score) {\n myScoreDisplay.setText(score);\n }",
"public void setAwayScore(int a);",
"public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }",
"public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }",
"public void setBonusScore() {\r\n count = count+50;\r\n }",
"static int SetScore(int p){\n\t\tif (p==1) {\n\t\t\tp1Score=p1Score+4;\n\t\t\tlblp1Score.setText(Integer.toString(p1Score));\n\t\t\t\n\t\t\t//check whether the score reaches to destination score or not..........\n\t\t\t\n\t\t\tif(p1Score>=destinationScore){\n\t\t\t\tfrmCardGame.dispose();\n\t\t\t\tnew EndGame(p,p1Score,destinationScore).setVisible(true);\n\t\t\t}\n\t\t}\n\t\telse if(p==2){\n\t\t\tp2Score=p2Score+4;\n\t\t\tlblp2Score.setText(Integer.toString(p2Score));\n\t\t\t\n\t\t\tif(p2Score>=destinationScore){\n\t\t\t\tfrmCardGame.dispose();\n\t\t\t\tnew EndGame(p,p2Score,destinationScore).setVisible(true);\n\t\t\t}\n\t\t}\n\t\telse if(p==3){\n\t\t\tp3Score=p3Score+4;\n\t\t\tlblp3Score.setText(Integer.toString(p3Score));\n\t\t\t\n\t\t\tif(p3Score>=destinationScore){\n\t\t\t\tfrmCardGame.dispose();\n\t\t\t\tnew EndGame(p,p3Score,destinationScore).setVisible(true);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tp4Score=p4Score+4;\n\t\t\tlblp4Score.setText(Integer.toString(p4Score));\n\t\t\t\n\t\t\tif(p4Score>=destinationScore){\n\t\t\t\tfrmCardGame.dispose();\n\t\t\t\tnew EndGame(p,p4Score,destinationScore).setVisible(true);\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"void setBestScore(double bestScore);",
"public Player() {\n\t\tscore = 0;\n\t}",
"public void updatePlayer(Player player) {\n Duration playDuration = Duration.ofMinutes(player.getStatistic(Statistic.PLAY_ONE_MINUTE) / 20 / 60);\n int hoursPlayed = Math.toIntExact(playDuration.toHours());\n this.objective.getScore(player.getName()).setScore(hoursPlayed);\n }",
"public static int getPlayerScore()\r\n\t{\r\n\t\treturn playerScore;\r\n\t}",
"public void addScore(int s) {\n setScore(getScore() + s);\n }",
"public void setHighscore(int score)\n {\n this.highscore = score;\n }",
"public void raiseScoreOfEveryPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tp.raiseScore(value);\n\t\t}\n\t}",
"public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }"
] | [
"0.85214853",
"0.82473797",
"0.8034446",
"0.8034446",
"0.803155",
"0.8014329",
"0.7975591",
"0.7975591",
"0.7975591",
"0.7975591",
"0.7969885",
"0.79654765",
"0.7940658",
"0.79304403",
"0.79076517",
"0.78843445",
"0.785871",
"0.7853194",
"0.7849127",
"0.7843356",
"0.7838645",
"0.7828792",
"0.7800209",
"0.77990955",
"0.77848864",
"0.77740645",
"0.7767566",
"0.77643454",
"0.77579844",
"0.77143574",
"0.7685868",
"0.76767576",
"0.76716304",
"0.76144624",
"0.7564394",
"0.7558056",
"0.7555827",
"0.7539173",
"0.7503753",
"0.7489379",
"0.7462736",
"0.7428067",
"0.7346033",
"0.7316668",
"0.73053306",
"0.7283672",
"0.7279435",
"0.7268897",
"0.725833",
"0.7242154",
"0.7189157",
"0.71104616",
"0.7109099",
"0.710025",
"0.70810324",
"0.70678353",
"0.7062738",
"0.70578843",
"0.70204115",
"0.6964247",
"0.6928286",
"0.692219",
"0.6916127",
"0.6888719",
"0.6866856",
"0.6864009",
"0.68583494",
"0.68239224",
"0.6823607",
"0.6761258",
"0.67440665",
"0.67029154",
"0.67029154",
"0.666428",
"0.66585463",
"0.6651274",
"0.66363865",
"0.66227376",
"0.6621815",
"0.66218114",
"0.66169643",
"0.65984726",
"0.65854156",
"0.6574585",
"0.6572422",
"0.65669763",
"0.6558964",
"0.6552226",
"0.6541975",
"0.65362656",
"0.65355897",
"0.6532027",
"0.6531251",
"0.65220886",
"0.65122014",
"0.6506073",
"0.6504338",
"0.6502018",
"0.6499015",
"0.6479171"
] | 0.7996108 | 6 |
Returns the number of rounds the player has won | public byte getRoundsWon(){ return this.roundsWon; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getTotalOfwins() {\n return statistics.get(TypeOfGames.SIMGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getNumberOfWins()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getNumberOfWins();\n }",
"public int getWins() {\n return wins;\n }",
"public int getWins() {\n return wins;\n }",
"public int getNumWins() {\n\t\treturn this.numWins;\n\t}",
"public int totalGames() {\n return wins + losses + draws;\n }",
"public int wins(String team) {\n return 0;\n }",
"public int getTotalWins() {\n int sum = 0;\n for (int i = 0; i < 13; i++) {\n sum += i * this.statistics.getDecksByWins().get(i);\n }\n return sum;\n }",
"public static int numRounds() {\n\t\treturn numRounds;\n\t}",
"int getWins() {return _wins;}",
"public int getWinnings() {\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(\"data/winnings\"));\n\t\t\tString line = reader.readLine();\n\t\t\t_winnings = Integer.parseInt(line.trim());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn _winnings;\n\t}",
"public int getNumPlayed()\n\t{\n\t\treturn numPlayed;\n\t}",
"public int getUserWonNumber() {\n\t\tint result = -1;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT count(id) FROM tp.gamerecord WHERE winner = (SELECT id FROM tp.player WHERE isAI = false)\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tresult = rs.getInt(1);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Query is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}",
"public int playerCount()\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor(Player player: this.players)\r\n\t\t{\r\n\t\t\tif(player != null)\r\n\t\t\t{\r\n\t\t\t\t++count;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"public int calculateRounds(int numberOfPlayers) {\n //logarithm to find how many 2s to multiply to get numberOfPlayers 32 players (2 x 2 x 2 x 2 x 2 = 32) = 5 Rounds\n return (int) (Math.log(numberOfPlayers) / Math.log(2));\n }",
"public int addWinningGame() {\n\t\tgamesWon++;\n\t\treturn gamesWon;\n\t}",
"public int calculateNumberOfMatches(Tournament tournament, Round round) {\r\n\t\tint playersPerMatch = tournament.getTeamSize() * 2; // home and away team\r\n\t\tint possibleMatches = round.getPlayers().size() / playersPerMatch;\r\n\t\treturn Math.min(possibleMatches, tournament.getCourts());\r\n\t}",
"public int getNumberOfMonumentsPlayed() {\n\t\tint numberPlayed = 0;\n\t\t// Iterate through all the player owned soldier cards to check, which of these have been played\n\t\tfor(DevelopmentCard card: victoryPointCards) {\n\t\t\tif(card.hasBeenPlayed()) {\n\t\t\t\tnumberPlayed++;\n\t\t\t}\n\t\t}\n\t\treturn numberPlayed;\n\t}",
"public int getF_Wins() {\n return f_wins;\n }",
"public int getRoundNum(){\n return gameRounds;\n }",
"public int wins(String team) {\n return getTeamByName(team).wins;\r\n }",
"public int getRound() {\n\t\treturn myHistory.size() + opponentHistory.size();\n\t}",
"public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}",
"public int incrementNumberWins()\n\t{\n\t\treturn myNumberWins++;\n\t}",
"public static int numberOfRounds() {\n System.out.print(\"Entrez le nombre de rounds de cette partie : \");\n while (true) {\n try {\n int rounds = new Scanner(System.in).nextInt();\n if (rounds > 0) return rounds;\n } catch (Exception ignored) {\n }\n System.out.println(\"Entrez un entier supérieur à 0 : \");\n }\n }",
"public int getWinner() {\n for (int i = 0; i < nrOfPlayers(); i++) {\n if (players.get(i).isFinished()) {\n\n // PLAYERLISTENER : Trigger playerEvent for player that WON\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, players.get(i).getColour(), PlayerEvent.WON);\n listener.playerStateChanged(event);\n }\n return i;\n }\n }\n return -1;\n }",
"public int checkNoOfRapelPlayerHolds () { return noOfRapels; }",
"public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }",
"public static int GetPlayersLeft () {\n int players_left = 0;\r\n\r\n // LOOK AT EACH PLAYER AND CHECK IF THEY HAVEN'T LOST\r\n for (int i = 0; i < player_count; i++) {\r\n if (!player[i].lost)\r\n players_left++;\r\n }\r\n\r\n // RETURN THE RESULTS\r\n return players_left;\r\n }",
"public double getPlayRatio(int wins) {\n return StatisticsHelper.getDivision(getDecksByWins(wins), getTotalDeckAmount());\n }",
"public int calculateNextRound(Tournament tournament) {\r\n\t\treturn tournament.getRounds().size() + 1;\r\n\t}",
"private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}",
"public int playersCount(){\r\n\t\treturn players.size();\r\n\t}",
"public int getTurnCount() {\n return turnEncoder.getCount();\n }",
"public int getRounds() {\n\n\t\treturn rounds;\n\t}",
"public short getWins() {\n\n return m_wins;\n }",
"public int winner() {\n if (player1Wins())\n return 1;\n if (player2Wins())\n return 2;\n return -1; // No one has won\n }",
"public int getPlayerCount() {\n \n \treturn playerCount;\n \t\n }",
"private int getAttemptsPerTurn() {\n return attemptsPerTurn;\n }",
"public int getPlayerCount() {\n\t\treturn playerCount;\n\t}",
"public int getTimesPlayed() {\r\n\t\treturn timesPlayed;\r\n\t}",
"public int nrOfPlayers() {\n int playerCount = 0;\n for (Player player : players) {\n if (player.getName() != null) {\n playerCount++;\n }\n }\n\n return playerCount;\n }",
"public int getWhoseTurn() {\n if (gameStatus == null || gameStatus.getActivePlayer() == null) return -1;\n if (gameStatus.getActivePlayer().equals(gameStatus.getPlayerOne())) return 1;\n if (gameStatus.getActivePlayer().equals(gameStatus.getPlayerTwo())) return 2;\n return -2;\n }",
"public int getWinner() {\n return winner;\n }",
"public final boolean checkForWin() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n result = true;\r\n for(Tile tile : rail.getTiles()) {\r\n tile.setBackground(Color.GREEN);\r\n player = tile.getText();\r\n }\r\n if (player.equals(\"X\")) {\r\n winningPlayer = \"X\";\r\n this.xWins++;\r\n } else if (player.equals(\"0\")) {\r\n winningPlayer = \"0\";\r\n this.oWins++;\r\n }\r\n break;\r\n }\r\n }\r\n \r\n return result;\r\n }",
"private int determineWinning(GamePlayerInterface player, GamePlayerInterface dealer)\n {\n \n int playerValue = player.getTotalCardsValue();\n int dealerValue = dealer.getTotalCardsValue();\n int result = 0;\n \n if(dealerValue > playerValue)\n {\n \t view.print(\"Dealer Wins\");\n \t view.printLine();\n \t result = 1;\n }\n \n else if(dealerValue < playerValue)\n {\n \t view.print(\"Player Wins\");\n \t view.printLine();\n \t result = 2;\n }\n \n else{\n \t view.print(\"Match Draw!\");\n \t view.printLine();\n }\n \n return result;\n }",
"public int getNumberUnplayedRoads() {\n\t\t return playerPieces.getNumberUnplayedRoads();\n\t }",
"public int wins(String team) {\n validateTeam_(team);\n TeamRecord_ teamRecord = teamsRecord_.get(team);\n validateTeamRecord_(teamRecord);\n return teamRecord.numberOfWins_;\n }",
"public int get_uWins()\r\n {\r\n return uWins;\r\n }",
"protected int getTotalEnrolledMorning() {\n return getMorningRoster().size();\n }",
"public int getNumPlayers() {\n return numPlayers;\n }",
"public int getNumOfPlayers() {\n\t\treturn numOfPlayers;\n\t}",
"@Override\n public int getWinner() {\n return this.board.getWinner();\n }",
"private int checkWinner() {\n if (this.turnCount >= 2) {\n int colWin = this.checkColumn();\n if (colWin > 0) {\n return colWin;\n }\n\n int rowWin = this.checkRow();\n if (rowWin > 0) {\n return rowWin;\n }\n\n int diagWin = checkDiagonal();\n if (diagWin > 0) {\n return diagWin;\n }\n }\n return 0;\n }",
"public int whoWin(){\r\n int winner = -1;\r\n \r\n int highest = 0;\r\n \r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(getPlayerPoints(player) > highest){\r\n highest = getPlayerPoints(player);\r\n winner = player.getID();\r\n }\r\n \r\n }\r\n \r\n return winner;\r\n }",
"void computeResult() {\n // Get the winner (null if draw).\n roundWinner = compareTopCards();\n\n\n if (roundWinner == null) {\n logger.log(\"Round winner: Draw\");\n logger.log(divider);\n // Increment statistic.\n numDraws++;\n\n } else {\n logger.log(\"Round winner: \" + roundWinner.getName());\n\t logger.log(divider);\n this.gameWinner = roundWinner;\n if (roundWinner.getIsHuman()) {\n // Increment statistic.\n humanWonRounds++;\n }\n }\n\n setGameState(GameState.ROUND_RESULT_COMPUTED);\n }",
"public String countScore() {\n String str =\"\";\n System.out.println(\"Game has ended\");\n int playerOneCount = 0;\n int playerTwoCount = 0;\n System.out.println(\"this is size of computer board\" + player2.playerTwoDomino.size());\n System.out.println(\"this is size of boneyard \" + allElements.size());\n System.out.println(\"this is size of human board \" + human1.playerOneDomino.size());\n System.out.println(\"this is size of game board \" + gameBoard.size());\n for (int i = 0; i < human1.playerOneDomino.size(); i++) {\n playerOneCount = playerOneCount + human1.playerOneDomino.get(i).getX() + human1.playerOneDomino.get(i).getX();\n }\n for (int j = 0; j < player2.playerTwoDomino.size(); j++) {\n playerTwoCount = playerTwoCount + player2.playerTwoDomino.get(j).getX() + player2.playerTwoDomino.get(j).getY();\n }\n\n if (playerOneCount < playerTwoCount) {\n str = \"Winner is Human by \" + (playerTwoCount - playerOneCount) + \" points\";\n\n\n } else {\n str = \"Winner is Computer by \" + (playerOneCount - playerTwoCount) + \" points\";\n\n }\n\n return str;\n }",
"@RequestMapping(value = \"/score/wins\", method=RequestMethod.GET)\n\tpublic int getWins() {\n\t\treturn score.getWins();\n\t}",
"public int getWinner()\n {\n //Loops to get the winner\n for(int i = 0; i < NUM_PLAYERS; i++){\n if(isPlayerWinner(i)) return i; //This player is a winner\n }\n return -1; //no one is a winner so far\n }",
"public int getNumPlayers() {\n\n\t\treturn this.playerCount;\n\t}",
"public int getWinner() {return winner();}",
"public static Integer getBotWins() {\n return humanVsBot.OWins + botVsHuman.XWins;\n }",
"public int countPlayers(){\n return players.size();\n }",
"public int getNumberOfSoldiersPlayed() {\n\t\tint numberPlayed = 0;\n\t\t// Iterate through all the player owned soldier cards to check, which of these have been played\n\t\tfor(DevelopmentCard card: soldierCards) {\n\t\t\tif(card.hasBeenPlayed()) {\n\t\t\t\tnumberPlayed++;\n\t\t\t}\n\t\t}\n\t\treturn numberPlayed;\n\t}",
"public int numPlayers() {\n return playerList.size();\n }",
"public int playerCount() {\n\t\treturn playerList.size();\n\t}",
"public int getNumPlayers(){\n\t\treturn this.players.size();\n\t}",
"public int getWinPercentage() {\n return winPercentage;\n }",
"public int getCurrentGameRound(){\n\t\treturn currentGameRound;\n\t}",
"public void setWins() {\r\n this.wins++;\r\n }",
"public int wins(String team) {\n return wins[findTeamIndex(team)];\n }",
"public int getNumberOfSoldiersPlayed() {\n\t\t\treturn developmentCardHand.getNumberOfSoldiersPlayed();\n\t\t}",
"public int checkForWinner() {\n\n // Check horizontal wins\n for (int i = 0; i <= 6; i += 3)\t{\n if (mBoard[i] == HUMAN_PLAYER &&\n mBoard[i+1] == HUMAN_PLAYER &&\n mBoard[i+2]== HUMAN_PLAYER)\n return 2;\n if (mBoard[i] == COMPUTER_PLAYER &&\n mBoard[i+1]== COMPUTER_PLAYER &&\n mBoard[i+2] == COMPUTER_PLAYER)\n return 3;\n }\n\n // Check vertical wins\n for (int i = 0; i <= 2; i++) {\n if (mBoard[i] == HUMAN_PLAYER &&\n mBoard[i+3] == HUMAN_PLAYER &&\n mBoard[i+6]== HUMAN_PLAYER)\n return 2;\n if (mBoard[i] == COMPUTER_PLAYER &&\n mBoard[i+3] == COMPUTER_PLAYER &&\n mBoard[i+6]== COMPUTER_PLAYER)\n return 3;\n }\n\n // Check for diagonal wins\n if ((mBoard[0] == HUMAN_PLAYER &&\n mBoard[4] == HUMAN_PLAYER &&\n mBoard[8] == HUMAN_PLAYER) ||\n (mBoard[2] == HUMAN_PLAYER &&\n mBoard[4] == HUMAN_PLAYER &&\n mBoard[6] == HUMAN_PLAYER))\n return 2;\n if ((mBoard[0] == COMPUTER_PLAYER &&\n mBoard[4] == COMPUTER_PLAYER &&\n mBoard[8] == COMPUTER_PLAYER) ||\n (mBoard[2] == COMPUTER_PLAYER &&\n mBoard[4] == COMPUTER_PLAYER &&\n mBoard[6] == COMPUTER_PLAYER))\n return 3;\n\n // Check for tie\n for (int i = 0; i < BOARD_SIZE; i++) {\n // If we find a number, then no one has won yet\n if (mBoard[i] != HUMAN_PLAYER && mBoard[i] != COMPUTER_PLAYER)\n return 0;\n }\n\n // If we make it through the previous loop, all places are taken, so it's a tie\n return 1;\n }",
"public int getAIWonNumber() {\n\t\tint result = -1;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT count(id) FROM tp.gamerecord WHERE winner IN (SELECT id FROM tp.player WHERE isAI = true)\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tresult = rs.getInt(1);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Query is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}",
"public int getTotalRegularCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getCardsByWins());\n }",
"public int getTotalGoldenCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getGoldCardsByWins());\n }",
"@Test\n public void testWinLossRatio(){\n float wins = 0;\n float losses = 0;\n\n realDie1 = new Dice();\n realDie2 = new Dice();\n realDie3 = new Dice();\n\n game = new Game(realDie1, realDie2, realDie3);\n\n when (mockPlayer.getBalance()).thenReturn(100);\n\n int currentGameWins = 0;\n\n for (int i = 0; i < 10000; i++) {\n currentGameWins = game.playRound(mockPlayer, DiceValue.ANCHOR, 10);\n\n if (currentGameWins == 0) {\n losses ++;\n } else {\n wins ++;\n }\n\n }\n System.out.println(\"Wins = \" + wins + \" Losses = \" + losses);\n float ratio = wins/(losses + wins);\n System.out.println(\"Win ratio = \" + ratio);\n }",
"public int getNumberOfPlayers() {\n return listaJogadores.size() - listaJogadoresFalidos.size();\n }",
"public int addWin() {\n\t\treturn ++this.numWins;\n\t}",
"int getNumOfPlayers() {\n return this.numOfPlayers;\n }",
"@Override\n\tpublic int getOnlinePlayerSum() {\n\t\treturn PlayerManager.getInstance().getOnlinePlayers().size();\n\t}",
"public int getNumberOfMoves();",
"public int getPoints(){\n\t\t//add the player socres(including monster killing, powerUp points and winning points\n\t\tint points = this.player.getScore() + 200*this.player.getHealth();\n\t\t\n\t\t//since the better the less time used, we use 600 seconds to minus the total seconds being used\n\t\t//and add it to the points\n\t\t//600 seconds is 10 minutes, which is definity long enough\n\t\t//if exceeds 10 minutes, we will subtract total score\n\t\tif(this.player.win()){\t//only if the player wins will we calculate the time\n\t\t\tpoints += (int)(3600 - (this.time / 1000000000));\n\t\t}\n\t\t\n\t\tthis.totalLabel.setText(String.valueOf(points));\t//set the value of the JLabel\n\t\t\n\t\treturn points;\n\t\t\n\t}",
"public void getWinnerRPS(int w) {\n switch(w) {\n case -1: // Error testing\n System.out.println(\"Error: Game not evaluated properly\");\n break;\n case 0: // Implement code for a draw\n //System.out.println(\"It's a draw!\");\n gameString = \"Both drew with \";\n gameString += addRPSPlayed(game.getPlayerPlays());\n break;\n case 1: // Implement code for player won\n //System.out.println(\"Player Won!\");\n gameString = \"Player Won with \";\n pScore++;\n gameString += addRPSPlayed(game.getPlayerPlays());\n break;\n case 2: // Implement code for computer won\n //System.out.println(\"Computer Won!\");\n gameString = \"Computer Won with \";\n cScore++;\n gameString += addRPSPlayed(game.getComputerPlays());\n break;\n }\n game.resetGame();\n }",
"@Override\n public int getWinner()\n {\n return currentPlayer;\n }",
"public int winningPlayerScore(LinkedList<Integer> player1Cards, LinkedList<Integer> player2Cards){\n if (recursiveCombat(player1Cards, player2Cards) == 1)\n return countWinnerScore(player1Cards);\n else\n return countWinnerScore(player2Cards);\n }",
"public int getWinRecord()\n {\n return gamesWon;\n }",
"static int calculateScore(Card[] winnings) {\n int score = 0;\n for (Card card : winnings)\n if (card != null)\n score++;\n else\n break;\n return score;\n }",
"int getCount(Side player) {\n return player == BLACK ? _countBlack : _countWhite;\n }",
"public int evalBoard(){\n if (wins('o')){\n return 3;\n }\n // Return 0 if human wins\n else if (wins('b')){\n return 0;\n }\n //Return 2 if game is draw\n else if (isDraw()){\n return 2;\n }\n // Game is not a draw and no player has won. Game is still undecided.\n else {\n return 1;\n }\n }",
"private int getTotalPlayerCount() {\n String baseUrl = \"https://www.runescape.com/player_count.js?varname=iPlayerCount\";\n String url = baseUrl + \"&callback=jQuery33102792551319766081_1618634108386&_=\" + System.currentTimeMillis();\n try {\n String response = new NetworkRequest(url, false).get().body;\n Matcher matcher = Pattern.compile(\"\\\\(\\\\d+\\\\)\").matcher(response);\n if(!matcher.find()) {\n throw new Exception();\n }\n return Integer.parseInt(response.substring(matcher.start() + 1, matcher.end() - 1));\n }\n catch(Exception e) {\n return 0;\n }\n }",
"public int getOWins() {\n return oWins;\n }",
"public int getPlayerCount() {\n return 0;\n }",
"public int getRoundScore() {\n return score;\n }",
"public int numPlayers(){\n return this.members.size();\n }",
"public int getGuessesLeft() {\r\n return (guessesAllowed - numWrongGuesses);\r\n }",
"public int getTotalOftimePlayed() {\n return secToMin(statistics.get(TypeOfGames.SIMGAME).getTotalOfTime()\n + statistics.get(TypeOfGames.EASYCOMPUTERGAME).getTotalOfTime()\n + statistics.get(TypeOfGames.HARDCOMPUTERGAME).getTotalOfTime());\n }",
"private int getOSRSPlayerCount() {\n try {\n Document document = Jsoup.connect(\"https://oldschool.runescape.com\").get();\n String playerCountText = document.getElementsByClass(\"player-count\").get(0).text();\n Matcher matcher = Pattern.compile(\"[\\\\d,?]+\").matcher(playerCountText);\n if(!matcher.find()) {\n throw new Exception();\n }\n playerCountText = playerCountText.substring(matcher.start(), matcher.end());\n return Integer.parseInt(playerCountText.replace(\",\", \"\"));\n }\n catch(Exception e) {\n return 0;\n }\n }",
"public void logRoundWinner(Player player, int round){\n\t\tif(player instanceof HumanPlayer)\n\t\t\tlog += String.format(\"%nUSER WINS ROUND %d\", round);\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) player;\n\t\t\tlog += String.format(\"%n%s WINS ROUND %d\", ai.getName().toUpperCase(), round);\n\t\t\tString win = ai.getName();\n\t\t\tif(win.equals(\"ai player1\"))\n\t\t\t{\n\t\t\t\troundWins[1]=roundWins[1]+1;\n\t\t\t}\n\t\t\telse if(win.equals(\"ai player2\"))\n\t\t\t{\n\t\t\t\troundWins[2]=roundWins[2]+1;\n\t\t\t}\n\t\t\telse if(win.equals(\"ai player3\"))\n\t\t\t{\n\t\t\t\troundWins[3]=roundWins[3]+1;\n\t\t\t}\n\t\t\telse if(win.equals(\"ai player4\"))\n\t\t\t{\n\t\t\t\troundWins[4]=roundWins[4]+1;\n\t\t\t}\n\t\t\t/*switch(win)\n\t\t\t{\n\t\t\tcase \"ai player1\":{\n\t\t\t\troundWins[1]=roundWins[1]+1;\n\t\t\t}\n\t\t\tcase \"ai player2\":{\n\t\t\t\troundWins[2]=roundWins[2]+1;\n\t\t\t}\n\t\t\tcase \"ai player3\":{\n\t\t\t\troundWins[3]=roundWins[3]+1;\n\t\t\t}\n\t\t\tcase \"ai player4\":{\n\t\t\t\troundWins[4]=roundWins[4]+1;\n\t\t\t}\n\t\t\t}*/\n\t\t}\n\t\tlineBreak();\n\t}",
"public int getXWins() {\n return xWins;\n }",
"public int getTurnCount(){\n return this.turn;\n }",
"public String winner() {\r\n\t\tif(player1.isDone() || player2.isDone()) {\r\n\t\t\tint count1 = player1.winningsCount();\r\n\t\t\tint count2 = player2.winningsCount();\r\n\t\t\tif(count1 > count2) {\r\n\t\t\t\treturn \"Player 1 wins, \" + count1 + \" to \" + count2 + \"!\";\r\n\t\t\t}else if(count2 > count1) {\r\n\t\t\t\treturn \"Player 2 wins, \" + count2 + \" to \" + count1 + \"!\";\r\n\t\t\t}else {\r\n\t\t\t\treturn \"The Game ends in a tie!\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}"
] | [
"0.76428825",
"0.75364196",
"0.75128007",
"0.7371336",
"0.7345458",
"0.7237661",
"0.7182672",
"0.71484476",
"0.71176195",
"0.71172065",
"0.7072398",
"0.70695853",
"0.70686305",
"0.706661",
"0.7005998",
"0.6951441",
"0.69399834",
"0.6917369",
"0.69112796",
"0.6911266",
"0.6903262",
"0.68587404",
"0.68584",
"0.6839956",
"0.6834187",
"0.6829044",
"0.6803152",
"0.6799894",
"0.67957693",
"0.67916024",
"0.6786193",
"0.67570746",
"0.67515004",
"0.67483056",
"0.6722033",
"0.6720899",
"0.67084306",
"0.6698244",
"0.66930526",
"0.66892433",
"0.66789275",
"0.66713655",
"0.666936",
"0.6662437",
"0.6657636",
"0.6656222",
"0.66277796",
"0.66202897",
"0.6619183",
"0.6612051",
"0.6609297",
"0.660089",
"0.6596336",
"0.6594675",
"0.65868825",
"0.65768",
"0.65748906",
"0.65738785",
"0.65673447",
"0.6564285",
"0.6559627",
"0.65385276",
"0.6535591",
"0.65244865",
"0.6520712",
"0.65167457",
"0.650208",
"0.6501088",
"0.6495032",
"0.6487435",
"0.6485158",
"0.6480608",
"0.64687014",
"0.6466941",
"0.6462337",
"0.6460019",
"0.6456939",
"0.64518887",
"0.64458483",
"0.64449835",
"0.64423144",
"0.6439522",
"0.6434906",
"0.64298797",
"0.6420606",
"0.6419132",
"0.641608",
"0.6414871",
"0.6414137",
"0.64129496",
"0.64120656",
"0.64072514",
"0.6406395",
"0.6405934",
"0.6403692",
"0.6395874",
"0.6394102",
"0.6393942",
"0.6383994",
"0.6375813",
"0.6373696"
] | 0.0 | -1 |
Sets the number of the rounds the player has won | public void setRoundsWon(byte roundsWon){ this.roundsWon=roundsWon; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setWins() {\r\n this.wins++;\r\n }",
"public void setWins(int wins) {\n if (wins > 0) {\n this.wins = wins;\n }\n }",
"public void setWins(int value) {\n this.wins = value;\n }",
"public void setRoundNum(int roundNum){\n gameRounds = roundNum;\n }",
"public void setWinner(int num){\r\n \twinner = num;\r\n }",
"private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }",
"public void increaseRound() {\n\t\tif(this.activePlayer==this.player1) {\n\t\t\tthis.setScorePlayer1(this.getScorePlayer1()+1);\n\t\t}else {\n\t\t\tthis.setScorePlayer2(this.getScorePlayer2()+1);\n\t\t}\n\t\t//On check si c'est le dernier round\n\t\tif (round != ROUNDMAX) {\n\t\tthis.round++;\n\t\t//On change un round sur deux le premier joueur de la manche\n\t\t\n\t\tif (0==round%2) {\n\t\t\t\n\t\t\tthis.setActivePlayer(player2);\n\t\t}else {\n\t\t\n\t\t\tthis.setActivePlayer(player1);\n\t\t}\n\t\t}else {\n\t\t\t//Sinon la partie est gagne\n\t\t\tdraw.win = true;\n\t\t}\n\t\t}",
"public void increaseWins(){\n this.numberOfWins=this.numberOfWins+1;\n }",
"@Override\n public void setNrPlayers(int value) {\n this.nrPlayers = value;\n }",
"@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }",
"public void setGamesWon(int number) {\n\t\tthis.gamesWon = number;\n\t}",
"public int incrementNumberWins()\n\t{\n\t\treturn myNumberWins++;\n\t}",
"public void setUpNewRound(){\n int newRound = getRoundNum() + 1;\n getRound().getPlayer(0).clearPiles();\n getRound().getPlayer(1).clearPiles();\n mRound = new Round(players);\n setRoundNum(newRound);\n mRound.beginRound();\n }",
"public void setWinner(Player winner) {\n this.winner = winner;\n }",
"public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }",
"public void incrementWin(){wins += 1;}",
"public void setNumPlayed(int numPlayed)\n\t{\n\t\tthis.numPlayed = numPlayed;\n\t}",
"public void setCurrentGameRound(int round){\n\t\tcurrentGameRound = round;\n\t\trepaint();\n\t}",
"public int getWins() {\n return wins;\n }",
"public int getWins() {\n return wins;\n }",
"public void incOWins() {\n oWins++;\n }",
"int getWins() {return _wins;}",
"public void play(){\n\n gameRounds++;\n mRound = new Round(players);\n mRound.beginRound();\n\n }",
"public void setNumberOfPlayers(int numberOfPlayers) {\n this.numberOfPlayers = numberOfPlayers;\n }",
"public void setRound(final int value) {\n round = value;\n }",
"public void setNumberOfRounds(int duration) {\n numberOfRounds = players.size() * duration;\n }",
"public void setWins(String teamName, int wins)\n\t throws SQLException\n\t \t\t{\n\t\t // Create a connection to the database.\n\t\t conn = DriverManager.getConnection(DB_URL);\n\n\t\t// Create a Statement object for the query.\n\t\tStatement stmt = conn.createStatement();\n\n\t\t// Execute the update.\n\t\tstmt.executeUpdate(\"UPDATE Team \" +\n\t \"SET wins = \" +\n\t wins +\n\t \" WHERE teamName = '\" +\n\t teamName + \"'\");\n\n\t\t// Close the Connection and Statement objects.\n\t\tconn.close();\n\t\tstmt.close();\n\t\t}",
"private void nextRound(){\n round++;\n if(round == 6){\n endGame();\n }else{\n out.println(\"###ROUND \" + round + \"###\");\n// ArrayList<Player> playerList = game.getPlayerList();\n for (Player e : playerList) {\n e.resetActions();\n }\n game.applyCards();\n }\n }",
"public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}",
"public void setWinnumber(int Number) {\n\t\tif (Number != 0) {\n\t\t\tthis.winnumber = winnumber + Number;\n\t\t} else {\n\t\t\tthis.winnumber = 0;\n\t\t}\n\t}",
"Status setWornCount();",
"public void setUserNumberOfRocks(int number) {\n\t\tfor (int x = 0; x < 14; x++) {\n\t\t\tif (x == 0 || x == 7) {\n\t\t\t\tbucket[x].setnumOfRocks(0, true);\n\t\t\t} else {\n\t\t\t\tbucket[x].setnumOfRocks(number, true);\n\t\t\t}\n\t\t}\n\t}",
"public int getRoundNum(){\n return gameRounds;\n }",
"@Override\n public void setWinner(Player winner)\n {\n for(int i = 0; i < gc.getF().size(); i++)\n {\n if(gc.getF().get(i).readyStart() == 0 || gc.getF().get(i).readyStart() == 1)\n {\n gc.getF().get(gc.getF().size() -1).addPlayer(this.winner);\n sl.save(\"The winner of QuarterFinal ID: \" + this.getGameID() + \" is: \"\n + winner.getName(), \"qfwinners.txt\");\n gc.getGameHistory().add(this); \n System.out.println(winner.getName() + \" has won the round! Player added to the Final!\");\n return;\n }\n }\n //If there are no available spots, make a new game\n Final f = new Final();\n System.out.println(\"created a new Final!\");\n f.addPlayer(winner);\n //Save winner details\n sl.save(\"The winner of QuarterFinal ID: \" + this.getGameID() + \" is: \"\n + winner.getName(), \"qfwinners.txt\");\n \n gc.getF().add(f);\n //Move game to history \n gc.getGameHistory().add(this); \n System.out.println(winner.getName() + \" has won the round! Player added to the Final!\");\n \n }",
"@Override\r\n\tpublic void setRound(int x) {\n\t\troundNum = x;\r\n\t\tupdate();\r\n\t}",
"public static void playerWonInc(){\r\n\t\t_playerWon++;\r\n\t}",
"public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }",
"public int getNumWins() {\n\t\treturn this.numWins;\n\t}",
"public void setRoundScore(int roundScore) {\n\t\tthis.roundScore = roundScore;\n\t}",
"public int addWin() {\n\t\treturn ++this.numWins;\n\t}",
"public void incrementCurrentRoundNumber() {\n\t\t\n\t\tcurrentRoundnumber = currentRoundnumber +1;\n\t}",
"public void setPlayerNumber(int num) {\n playerNum = num;\n }",
"private void DeclareWinner(){\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\tTextView tvP1Score = (TextView) findViewById(R.id.tvP1Score);\n\t\tTextView tvP2SCore = (TextView) findViewById(R.id.tvP2Score);\n\t\tTextView tvTieScore = (TextView) findViewById(R.id.tvTieScore);\n\t\tswitch(winner){\n\t\t\tcase CAT:\n\t\t\t\ttieScore = tieScore + 1;\n\t\t\t\ttvStatus.setText(\"Tie Cat Wins!\");\n\t\t\t\ttvTieScore.setText(String.valueOf(tieScore));\n\t\t\t\tbreak;\n\t\t\tcase P1_WINNER:\n\t\t\t\tp1Score = p1Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 1 Wins!\");\n\t\t\t\ttvP1Score.setText(String.valueOf(p1Score));\n\t\t\t\tbreak;\n\t\t\tcase P2_WINNER:\n\t\t\t\tp2Score = p2Score + 1;\n\t\t\t\ttvStatus.setText(\"Player 2 Wins!\");\n\t\t\t\ttvP2SCore.setText(String.valueOf(p2Score));\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n\tpublic void setRound(int round) {\n\t\tthis.round = \"Round: \"+round;\r\n\t\tupdate();\r\n\t}",
"public void incrementNumberOfWins(TypeOfGames type) {\n statistics.get(type).incrementNumberOfWins();\n }",
"public void setWinner(String winner) {\n this.winner = winner;\n }",
"public void winGame() {\n this.isWinner = true;\n }",
"public int wins(String team) {\n return 0;\n }",
"public void increaseTurnCount()\n\t{\n\t\tturnNumber++;\n\t\tthis.currentPlayerID++;\n\t\tthis.currentPlayerID = this.currentPlayerID % this.playerList.size();\n\t}",
"public int addWinningGame() {\n\t\tgamesWon++;\n\t\treturn gamesWon;\n\t}",
"public void setRound(int round) {\r\n this.round = round;\r\n }",
"public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }",
"public void win(int wager){\n bankroll += wager;\n }",
"@Override\n\tpublic void win() {\n\t\t\n\t\tfround[fighter1]++;\n\t fplatz[fighter1]=Math.round((float)fplatz[fighter1]/2); \n\t \n\t\tnextRound();\n\t}",
"public void incGamesPlayed() {\n gamesPlayed++;\n }",
"public void setNumberRounds(int numberRounds) {\n this.numberRounds = numberRounds;\n }",
"public void incXWins() {\n xWins++;\n }",
"void setWinningTeam(TeamId winner) {\n winningTeam.set(winner);\n }",
"public void gewonnen(int gewinn) {\n\t\tthis.gewinn += gewinn;\n\t}",
"public void setLosses(int value) {\n this.losses = value;\n }",
"public void win(int player)\r\n\t{\r\n\t\taccountValue[player]+=pool;\r\n\t\tendRund();\r\n\t}",
"public Round(int roundNo) {\n\t\tthis.niceMoves = new ArrayList<Move>();\n\t\tthis.roundNo = roundNo;\n\t}",
"public TournamentMode(int rounds) {\n\n\t\tthis.rounds = rounds;\n\t\tdealer = Director.getInstance().getDealer();\n\t}",
"public void setGameDraw() {\n this.gameStarted = false; \n this.winner = 0; \n this.isDraw = true; \n }",
"public void setWinner(boolean winner) {\n\t\tthis.winner = winner;\n\t}",
"public void incrTurn(){\n this.turn++;\n }",
"public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }",
"public void setGoldCardsByWins(int wins, int cards) {\n statistics.getGoldCardsByWins().put(wins, cards);\n }",
"public void setMinimumPlayers(int nPlayers)\r\n {\n \r\n }",
"private void nextRound() {\r\n action = 0;\r\n if (round == GameConstants.ROUNDS) {\r\n round = 0;\r\n if (phase == 0) {\r\n vc = null;\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n }\r\n phase++;\r\n } else {\r\n round++;\r\n }\r\n }",
"public void resetWinRecord()\n{\n gamesWon = 0;\n}",
"public void changeTurn(){\n // this function is used to calculate the turn of a player after every move is played\n int turn = this.turn;\n turn++;\n this.turn = turn%GameConfiguration.NUMBER_OF_PLAYERS;\n }",
"public Round() {\n\t\tthis.niceMoves = null;\n\t\tthis.roundNo = 1;\n\t}",
"public void setPlayedTimes(int newPlayedTimes) {\n this.playedTimes = newPlayedTimes;\n }",
"public void incrementD_CurrentNumberOfTurns() {\n d_CurrentNumberOfTurns++;\n }",
"public void playRound(){\n int roundScoreOne = 0;\n int roundScoreTwo = 0 ;\n this.handOne.drawNewHandFrom(gameDeck);\n this.handTwo.drawNewHandFrom(gameDeck);\n roundScoreOne = this.scoreHand(handOne, handTwo);\n roundScoreTwo = this.scoreHand(handTwo, handOne);\n\n System.out.println(\"Your hand: \");\n System.out.println(handOne.toString());\n System.out.println(\"Score: \" + roundScoreOne + \"\\n\");\n\n System.out.println(\"Opponent's hand: \");\n System.out.println(handTwo.toString());\n System.out.println(\"Score: \" + roundScoreTwo + \"\\n\");\n\n if (roundScoreOne > roundScoreTwo) {\n int updateAmount = roundScoreOne - roundScoreTwo;\n this.playerScore += updateAmount;\n System.out.println(\"You score \" + updateAmount + \" points !\");\n System.out.println(\"You: \" + playerScore);\n System.out.println(\"Opponent: \" + oppoScore);\n } else if (roundScoreTwo > roundScoreOne) {\n int updateAmount = roundScoreTwo - roundScoreOne;\n this.oppoScore += updateAmount;\n System.out.println(\"Opponent scores \" + updateAmount + \" points !\");\n System.out.println(\"You: \" + playerScore);\n System.out.println(\"Opponent: \" + oppoScore);\n }\n }",
"public static void setPlayerCount(int playerCount) {\n PLAYER_COUNT = playerCount;\n }",
"private void setRound(ChesspairingRound round) {\n\t\tint rNumber = round.getRoundNumber();\n\t\tif (rNumber < 1) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tList<ChesspairingRound> rounds = mTournament.getRounds();\n\t\tif (rounds.size() >= rNumber) {\n\t\t\trounds.remove(rNumber - 1);\n\t\t}\n\t\trounds.add(rNumber - 1, round);\n\t}",
"public void setGamesCompleted(int num)\r\n {\r\n //Check if the new average time is less than 0 before setting the new average time \r\n if(num < 0)\r\n {\r\n //Outouts a warning message\r\n System.out.println(\"WARNING:You cannot assign a negative number of games completed\");\r\n }\r\n else \r\n {\r\n this.gamesCompleted = num; \r\n }//end if\r\n }",
"public static void NextTurn() {\n if (num_of_players == turn)\n turn=0;\n turn++;\n }",
"public void setWinner(boolean isTopWinner) {\n winner = isTopWinner ? 2 : 1;\n }",
"void win() {\n\t\t_money += _bet * 2;\n\t\t_wins++;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}",
"@IcalProperty(pindex = PropertyInfoIndex.POLL_WINNER,\n jname = \"pollWinner\",\n vpollProperty = true\n )\n @NoDump\n public void setPollWinner(final Integer val) {\n if (val == null) {\n final BwXproperty x = findXproperty(BwXproperty.pollWinner);\n if (x != null) {\n removeXproperty(x);\n }\n } else {\n replaceXproperty(BwXproperty.pollWinner, String.valueOf(val));\n }\n }",
"public void setNumVotes(int value) {\n this.numVotes = value;\n }",
"private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}",
"public void setWinner(String winner) {\n this.winner.setText(winner + \" Won!\");\n }",
"private int setRank() {\n this.rank = 0;\n for(int row = 0; row < SIZE; row++){\n for(int col = 0; col < SIZE; col++){\n int currentBoardNumber = row * 3 + col + 1;\n if(row == 2 && col == 2) {\n currentBoardNumber = 0;\n }\n if(this.board[row][col] != currentBoardNumber) {\n this.rank += 1;\n }\n }\n }\n this.rank += this.prevMoves.length();\n return this.rank;\n }",
"public void setGameWon(Boolean won){\n\t\tm_gameWon = won;\n\t}",
"private void updateGame(int roundWinner) {\n\n\t\t// War cards get face down\n\t\tif (game.getWarring() == 2) {\n\t\t\tcpuStack.setIcon(new ImageIcon(Card.CARD_DOWN));\n\t\t\tplayerStack.setIcon(new ImageIcon(Card.CARD_DOWN));\n\t\t\tgame.clearWar();\n\t\t} else if (game.getWarring() == 1)\n\t\t\tgame.nextDown(); // next one is down, current battle triggered a war\n\t\telse {\n\n\t\t\tcpuStack.setIcon(new ImageIcon(game.getCardImage(War.CPU)));\n\t\t\tplayerStack.setIcon(new ImageIcon(game.getCardImage(War.PLAYER)));\n\t\t}\n\t\tif (roundWinner == War.TIE_FLAG) {\n\t\t\tstatus.setText(\"Tie Game!\");\n\t\t\tplayerDeck.setEnabled(false);\n\t\t} else if (roundWinner == War.WAR_FLAG)\n\t\t\tstatus.setText(\"War!\");\n\t\telse if (game.gameWinner() != null) {\n\t\t\tif (game.cpuScore() > game.playerScore())\n\t\t\t\tstatus.setText(\"CPU Wins!\");\n\t\t\telse\n\t\t\t\tstatus.setText(\"You Win!\");\n\t\t\tplayerDeck.setEnabled(false);\n\t\t} else {\n\t\t\tif (roundWinner == War.CPU)\n\t\t\t\tstatus.setText(\"CPU \" + \"wins the round!\");\n\t\t\telse\n\t\t\t\tstatus.setText(\"Player \" + \"wins the round!\");\n\n\t\t}\n\t\tcpuScore.setText(game.getCPUScore());\n\t\tplayerScore.setText(game.getPlayerScore());\n\t\tupdateDecks();\n\t}",
"public static void win()\n\t{\n\t\tGame.setMoney(Game.getMoney()+bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}",
"public int incrementPlayerTurn() {\r\n\t\tthis.playerTurn++;\r\n\t\tif ( playerTurn >= 3 ) {\r\n\t\t\tthis.playerTurn = 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.playerTurn;\r\n\t}",
"public void win() {\n if (turn == 1) {\n p1.incrementLegs();\n if (p1.getLegs() == 5) {\n p1.incrementSets();\n p1.setLegs(0);\n p2.setSets(0);\n\n }\n if (p1LastScore > p1.getHighout()) {\n p1.setHighout(p1LastScore);\n\n }\n\n if (p1.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p1.getHighout();\n }\n } else if (turn == 2) {\n p2.incrementLegs();\n if (p2.getLegs() == 5) {\n p2.incrementSets();\n p2.setLegs(0);\n p1.setSets(0);\n\n }\n if (p2LastScore > p2.getHighout()) {\n p2.setHighout(p2LastScore);\n }\n\n if (p2.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p2.getHighout();\n }\n\n\n\n }\n changeFirstTurn();\n win = true;\n\n\n\n }",
"public static int numRounds() {\n\t\treturn numRounds;\n\t}",
"private void resetRoundVars() {\n\t\tmAttackerDelay = 0;\n\t\tmRoundTimeElapsed = 0;\n\t\tmRoundScore = 0f;\n\t\tmKnightSpawnChance = 0.35f + (0.1f * (mRoundNumber - 1)); // +10% chance per round, starting at 35%\n\t\tif(mKnightSpawnChance > 0.65f) mKnightSpawnChance = 0.65f; // Hard cap at 65%\n\t\tmRoundMaxAttackers = 5 + mRoundNumber * 2;\n\t\tmRoundMaxTime = 50 + (mRoundNumber * 1.5f);\n\t\tmRoundSaved = false;\n\t\tmRoundText = \"Round: \" + mRoundNumber;\n\t\tmSpawnTimeMin = mSpawnTimeMin - (mRoundNumber * 5);\n\t\tmSpawnTimeMax = mSpawnTimeMax - (mRoundNumber * 5);\n\n\t\t// Kill all living attackers\n\t\tfor(int i = 0; i < ATTACKER_ARRAY_SIZE; i++) {\n\t\t\tmAttackers[i].kill();\n\t\t}\n\t}",
"public void setMaxRoundsPerBattle(int value) {\n this.maxRoundsPerBattle = value;\n }",
"public int getWinner() {\n return winner;\n }",
"public void setPlayerRoll10()\r\n {\r\n \r\n roll1 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE10 + LOWEST_DIE_VALUE10);\r\n }",
"public int getF_Wins() {\n return f_wins;\n }",
"public void playRound(){\n this.gameState = GameController.createGameState(this.game);\n \n // Verifica se o \n if(this.gameState.isEnded()){\n var winner = this.gameState.getPlayerQttCards() == 0 ? this.game.getComputer() : this.game.getPlayer();\n\n this.gameState.setWinner(winner);\n }\n else{\n \n // Mostrando o vira, as manilhas, a quantidade de cartas dos jogadores e as cartas do jogador\n this.view.displayGame(this.gameState);\n\n var playerCardChose = this.getPlayerCardChose();\n var computerCardChose = Utils.generateRandomNumber(getGameState().getComputerQttCards());\n\n try{\n var playerCard = this.game.getPlayer().playCard(playerCardChose);\n var computerCard = this.game.getComputer().playCard(computerCardChose);\n\n var winnerCard = this.verifyBiggerCard(playerCard, computerCard);\n\n // Verificando qual `Player` ganhou e se um ganhou\n\n var hasPlayerWon = winnerCard.equals(playerCard);\n var hasComputerWon = winnerCard.equals(computerCard);\n\n var turnedCard = this.getGameState().getTurnedCard();\n\n // Aqui caso o player tenha ganhado ele recebe a carta do computador e senão ele perde a carta para o computador\n if(hasPlayerWon){\n this.game.getPlayer().earnCard(computerCard);\n this.game.getComputer().loseCard(computerCard);\n }\n else if(hasComputerWon){\n this.game.getComputer().earnCard(playerCard);\n this.game.getPlayer().loseCard(playerCard);\n }\n \n // Na hora de mostrar o vencedor eu verifico se um player venceu, se sim eu mostro vitória ou derrota para o Player\n // Se não eu mostro empate\n \n if(hasComputerWon || hasPlayerWon){\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard, hasPlayerWon);\n }\n else {\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard);\n }\n\n }\n catch(Exception excp){\n this.view.displayMessageError(excp.getMessage());\n\n this.playRound();\n }\n }\n \n }",
"public void incrementNumMoves() {\n\t\tthis.moveMade = true;\n\t\tthis.numMoves++;\n\t}"
] | [
"0.77711844",
"0.76894516",
"0.76633626",
"0.74821097",
"0.74382126",
"0.718933",
"0.71781534",
"0.7015893",
"0.68634665",
"0.67676204",
"0.6712907",
"0.6711283",
"0.669758",
"0.6639395",
"0.66321313",
"0.66145456",
"0.6576929",
"0.65343165",
"0.64773995",
"0.64465934",
"0.64422387",
"0.64044017",
"0.6383",
"0.6370472",
"0.6368906",
"0.63593596",
"0.6353914",
"0.6306877",
"0.63066524",
"0.62957424",
"0.6295626",
"0.6294595",
"0.6286441",
"0.6283328",
"0.6276698",
"0.6201279",
"0.6184969",
"0.6165224",
"0.61650336",
"0.61367357",
"0.60992086",
"0.60991126",
"0.6094917",
"0.60945326",
"0.6093718",
"0.6081654",
"0.60788536",
"0.6070649",
"0.6060249",
"0.6058821",
"0.60445756",
"0.60345894",
"0.6031745",
"0.60301095",
"0.6028544",
"0.6023476",
"0.60107446",
"0.59989655",
"0.59982866",
"0.599818",
"0.59966487",
"0.5990098",
"0.59773433",
"0.5973817",
"0.59729373",
"0.5971828",
"0.5969224",
"0.59685576",
"0.59650874",
"0.5962908",
"0.59500664",
"0.59446895",
"0.59400254",
"0.592941",
"0.5927384",
"0.5926605",
"0.5924734",
"0.59241307",
"0.59230155",
"0.5910696",
"0.59090626",
"0.59034646",
"0.5903064",
"0.58989626",
"0.5892231",
"0.58852416",
"0.5883429",
"0.5875065",
"0.58721423",
"0.5842941",
"0.5842618",
"0.5842286",
"0.58381",
"0.58355224",
"0.5816153",
"0.581215",
"0.58097965",
"0.58057535",
"0.58036125",
"0.580125"
] | 0.68835586 | 8 |
Returns the players state of movement | public int getStateOfMovement(){ return stateOfMovement; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Player getState() {\n\t\treturn state;\n\t}",
"public PlayerState getPlayerState() {\r\n return playerState;\r\n }",
"public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}",
"public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }",
"PlayerState getPlayerState() {\n return playerState;\n }",
"public State getMoving() {\n\t\treturn moving;\n\t}",
"void playerMove(State state);",
"public Boolean getMovingState()\r\n\t{\r\n\t\tObject[] result = pParent.status.requestOne(TuxAPIConst.ST_NAME_FLIPPERS_MOTOR_ON);\r\n\t\tif (result[0] == null)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (result[0].equals(\"False\"))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public PlayerState getPlayerState() {\n return this.playerState;\n }",
"Object GetMove (Object game_state);",
"private void updatePlayerMovingStatus(){\n // get player's moving status\n if(keyPressed.contains(KeyCode.LEFT)){\n player.setFacing(Direction.LEFT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.RIGHT)){\n player.setFacing(Direction.RIGHT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.UP)){\n player.setFacing(Direction.UP);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.DOWN)){\n player.setFacing(Direction.DOWN);\n player.setIsMoving(true);\n } else {\n player.setIsMoving(false);\n }\n }",
"public interface GameState {\n\n\t/**\n * Method used by a player in order to perform transfer of stones \n * @param pitId the identifier of the pit by which the player will start (the associated pit must belong to him) This is the only method that can change the state \n * @return map {@link Map Map.class} with (pitId,#stones) as entries\n */\n\tpublic Map<Integer, Integer> move(final int pitId);\n\t\n\t/**\n\t * @return the {@link GameStateEnum GameStateEnum.class} that corresponds to {@link GameState GameState.class} concretions\n\t */\n\tpublic GameStateEnum getStateEnum();\n}",
"public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}",
"interface GameState {\n String WAITING_FOR_SECOND_PLAYER = \"WAITING_FOR_SECOND_PLAYER\";\n String TURN_HARE = \"TURN_HARE\";\n String TURN_HOUND = \"TURN_HOUND\";\n String WIN_HARE_BY_ESCAPE = \"WIN_HARE_BY_ESCAPE\";\n String WIN_HARE_BY_STALLING = \"WIN_HARE_BY_STALLING\";\n String WIN_HOUND = \"WIN_HOUND\";\n }",
"public boolean GetMove();",
"public Player getPlayerToMove()\n {\n return playerToMove;\n }",
"private float getPlayerMove() {\r\n\t\treturn 1.0f / 5;\r\n\t}",
"private int getMovementState (float dx, float dy) {\n\t\tif (dx == 0.0f && dy == 0.0f) {\n\t\t\treturn SCANNING;\n\t\t} else if (dx > 0) {\n\t\t\treturn (dy == 0) ? WALKING_RIGHT : WALKING_RIGHT_DIAGONAL;\n\t\t} else {\n\t\t\treturn (dy == 0) ? WALKING_LEFT : WALKING_LEFT_DIAGONAL;\n\t\t}\n\t}",
"public GameState getGameState();",
"public GameState GetState(){\n\t\treturn this.state;\n\t}",
"public void setStateOfMovement(int movementState){stateOfMovement = movementState; }",
"@PlayerState\n public abstract int getPlayerState();",
"public int getWhoseMove() {\n\t\treturn playerToMove;\n\t}",
"public boolean makeMove(GameState gameState);",
"boolean isMoving();",
"public EnumSet<Movement> movement() {\n return movement;\n }",
"public int getMovement() {\n return movement;\n }",
"Color playerOnMove() {\n return _playerOnMove;\n }",
"public byte getState(){\n\t\t/*\n\t\tOFFLINE((byte)0),\n ONLINE((byte)1),\n SAVING((byte)2);\n\t\t */\n\t\t//getWorld().getcWorld().update(this);\n\t\treturn state;\n\t}",
"public GameState getState() {\n\t\treturn state;\n\t}",
"public int moves()\n {\n return moves;\n }",
"public PlayerState getEnemy()\n {\n if(this.turnOfPlayer == playerBlack)\n {\n return playerWhite;\n }\n return playerBlack;\n }",
"private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }",
"public int gameState() {\n \tboolean check = isCheck(turn);\n \t\n \t//change this code to be some sort of checkmate detection\n \tif(check) {\n \t\t//we need to check whether there is a legal move that puts the king out of check\n \t\t//we need to loop through all pieces of the same color as the turn and make all legal moves\n \t\t//then after each move, check whether the king is still in check\n \t\t\n \t\t//first generate a list of all pieces for the turn color\n \t\tArrayList<Piece> pieces = getPieces(turn);\n \t\t\n \t\tboolean freedom;\n \t\t\n \t\t//now for each piece, check whether moving that piece can get the king out of check\n \t\tfor(int i = 0; i < pieces.size(); i++) {\n \t\t\tfreedom = simulate(pieces.get(i));\n \t\t\tif(freedom) {\n \t \t\tupdateCheckMove(false);\n \t \t\tSystem.out.println(\"Check on \" + turn + \" King!\");\n \t\t\t\treturn 2; //if the king can move, then the game isn't over yet\n \t\t\t}\n \t\t}\n \t\t\n \t\t//the game is over if we reach this far, so we can assume checkmate\n \t\t//resignation logic will probably be specific to Display class\n \t\t\n \t\tupdateCheckMove(true);\n \t\t\n \t\tif(turn == PieceColor.White) return -1; //black win if white king in check and can't move\n \t\tif(turn == PieceColor.Black) return 1;\n \t}\n \t\n \t//if all of these fail, the game isn't over yet\n \treturn 2;\n }",
"public void movementStrategy() {\n System.out.println(\"Player has chosen\" + this.playerMovement);\n }",
"public boolean isMoving() {\n return moving;\n }",
"public int moves() {\n return moves;\n }",
"public int moves() {\n return moves;\n }",
"protected int getMove() \t\t\t\t{\treturn move;\t\t}",
"protected int getMove(){\r\n\t\treturn this.move;\r\n\t}",
"public double[] getState(){\n if (AgentType.Abstraction == SimpleExperiment.activeAgentType) {\n // Abstraction agent type\n return this.getCustomState();\n }\n else {\n // System.out.println(\"E[\" + marioEgoPos[0] + \",\" + marioEgoPos[1] + \"] F[\" + marioFloatPos[0] + \",\" + marioFloatPos[1] + \"]\");\n\n // other agent type\n double[] state = new double[10];\n\n // CLOSEST TWO ENEMIES\n state[0] = isMarioAbleToJump ? 1 : 0;\n state[1] = isMarioOnGround ? 1 : 0;\n state[2] = isMarioAbleToShoot ? 1 : 0;//marioMode;//\n float xdiff = marioFloatPos[0] - prevMarioPos[0];\n float ydiff = marioFloatPos[1] - prevMarioPos[1];\n state[3] = xdiff < 0 ? 0 : (xdiff == 0 ? 1 : 2);\n state[3] += 3*(ydiff < 0 ? 0 : (ydiff == 0 ? 1 : 2));\n\n state[4] = enemies(1, 0);\n state[5] = enemies(3, 1);\n state[6] = 0;//enemies(5, 3);\n\n state[7] = obstacle();\n\n int[] enemy = closestEnemy();\n if(Math.abs(enemy[0]) < 11 && Math.abs(enemy[1]) < 11){\n state[8] = enemy[0]+10;\n state[9] = enemy[1]+10;\n } else {\n state[8] = 21;\n state[9] = 21;\n }\n\n //state[10] = marioFloatPos[0];\n //state[11] = marioFloatPos[1];\n\n return state;\n }\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}",
"@Override\n public BattleState getBattleState() {\n return state;\n }",
"public int getMoveMode();",
"public static boolean getIsPlayersTurn()\r\n {\r\n return isPlayersTurn;\r\n }",
"public int moves() {\r\n if (!isSolvable) return -1;\r\n return goal.previousMoves;\r\n }",
"int moves() {\n return moves;\n }",
"public boolean isMoving() {\n\t\treturn state.getDirection() != Direction.STATIONARY;\n\t}",
"public IGameAlgo.GameState getGameState (GameBoard.GameMove move){\n\t\t/*\n\t\t * If last move made by computer,check if computer wins.\n\t\t */\n\t\tif(this.board[lastMove.getRow()][lastMove.getColumn()]==BoardSigns.COMPUTER.getSign()) {\n\t\t\t if(\n\t\t (board[0][0] == BoardSigns.COMPUTER.getSign() && board[0][1] == BoardSigns.COMPUTER.getSign() && board[0][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[1][0] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[1][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[2][0] == BoardSigns.COMPUTER.getSign() && board[2][1] == BoardSigns.COMPUTER.getSign() && board[2][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.COMPUTER.getSign() && board[1][0] == BoardSigns.COMPUTER.getSign() && board[2][0] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][1] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[2][1] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.COMPUTER.getSign() && board[1][2] == BoardSigns.COMPUTER.getSign() && board[2][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[2][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[2][0] == BoardSigns.COMPUTER.getSign())\n\t\t )\n\t\t\t\t return GameState.PLAYER_LOST;\t\t\t\t\t\t \n\t\t}\n\t\t/*\n\t\t * If last move made by player,check if player wins.\n\t\t */\n\t\telse {\n\t\t\t if(\n\t\t (board[0][0] == BoardSigns.PLAYER.getSign() && board[0][1] == BoardSigns.PLAYER.getSign() && board[0][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[1][0] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[1][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[2][0] == BoardSigns.PLAYER.getSign() && board[2][1] == BoardSigns.PLAYER.getSign() && board[2][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.PLAYER.getSign() && board[1][0] == BoardSigns.PLAYER.getSign() && board[2][0] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][1] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[2][1] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.PLAYER.getSign() && board[1][2] == BoardSigns.PLAYER.getSign() && board[2][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[2][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[2][0] == BoardSigns.PLAYER.getSign())\n\t\t )\n\t\t\t\t return GameState.PLAYER_WON;\t\n\t\t}\n\t\t/*\n\t\t * No one wins,check if in progress or game ends with tie.\n\t\t */\n\t\t\n\t\t //check if exist empty spots. \n\t\t\tfor(int i=0;i<3;i++)\n\t\t\tfor(int j=0;j<3;j++)\n\t\t\t\tif(board[i][j]==TicTacTow.BoardSigns.BLANK.getSign()) \n\t\t\t\t return GameState.IN_PROGRESS;\n\t\t\treturn GameState.TIE;\t\t\t\n\t}",
"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 GameState getGameState() {\n return this.state;\n }",
"public GameState won() {\n if ( (board[0][0] != TileState.BLANK) && (board[0][0] == board[0][1]) && (board[0][0] == board[0][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[1][0] != TileState.BLANK) && (board[1][0] == board[1][1]) && (board[1][0] == board[1][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[2][0] != TileState.BLANK) && (board[2][0] == board[2][1]) && (board[2][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][1]) && (board[0][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ( (board[0][2] != TileState.BLANK) && (board[0][2] == board[1][1]) && (board[0][2] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][0]) && (board[0][0] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][1] != TileState.BLANK) && (board[0][1] == board[1][1]) && (board[0][1] == board[2][1])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][2] != TileState.BLANK) && (board[0][2] == board[1][2]) && (board[0][2] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if (movesPlayed == 9)\n return GameState.DRAW;\n return GameState.IN_PROGRESS;\n }",
"public boolean isMoving() {\r\n\t\treturn moving;\r\n\t}",
"public int getMove(){\n return this.move;\n }",
"public int status() \n {\n \tif (stonesCount(7,12) != 0 && stonesCount(0,5) != 0)\n \t\treturn GAME_NOT_OVER;\n \telse if (stonesCount(7,13) < stonesCount(0,6))\n \t\treturn GAME_OVER_WIN;\n \telse if (stonesCount(7,13) == stonesCount(0,6))\n \t\treturn GAME_OVER_TIE;\n \telse\n \t\treturn GAME_OVER_LOSE;\n }",
"public boolean getPassed(){\n return passedLastMove;\n }",
"public boolean isMovementChanged() {\n return movementChanged;\n }",
"public void getMovements()\n {\n if(\n Greenfoot.isKeyDown(\"Up\")||Greenfoot.isKeyDown(\"W\")||\n Greenfoot.isKeyDown(\"Down\")||Greenfoot.isKeyDown(\"S\")||\n Greenfoot.isKeyDown(\"Right\")||Greenfoot.isKeyDown(\"D\")||\n Greenfoot.isKeyDown(\"Left\") ||Greenfoot.isKeyDown(\"A\")||\n getWorld().getObjects(Traps.class).isEmpty() == false //car trap engendre un mouvement sans les touches directionnelles\n )\n {\n isMoved = true;\n }\n else{isMoved = false;}\n }",
"public States getPilotState() {\n\t\treturn state;\n\t}",
"public int moves() {\n\t\tif (goal == null)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn goal.moves;\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 }",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"public IPlacementState getState();",
"boolean canMove();",
"public boolean isMovement() {\n return isMovementEvent;\n }",
"public GameState getGameState(){\n return this.gameState;\n }",
"public static HashSet<gameState> Actions(gameState currentState) {\n\t\t\n\t\tHashSet<gameState> possibleStates = new HashSet<gameState>();\n\t\t\n\t\t\n\t\t// Store which player goes next after this player plays\n\t\tint nextNextUp;\n\t\tif (currentState.getNextUp() == 0) {\n\t\t\tnextNextUp = 1;\n\t\t} else {\n\t\t\tnextNextUp = 0;\n\t\t}\n\t\t\n\t\t// Store corresponding characters for each player\n\t\t// DARK(X) - 0, LIGHT(O) - 1\n\t\tchar myTile;\n\t\tchar opponentTile;\n\t\tif (currentState.getNextUp() == 0) {\n\t\t\tmyTile = 'x';\n\t\t\topponentTile = 'o';\n\t\t} else {\n\t\t\tmyTile = 'o';\n\t\t\topponentTile = 'x';\n\t\t}\n\n\t\t\n\n\t\t// Check the entire board of the state \n\t\tfor (int i = 0; i<boardSize; i++) {\n\t\t\tfor (int j = 0; j<boardSize; j++) {\n\t\t\t\t\n\t\t\t\t// If the tile is my tile\n\t\t\t\tif (currentState.getBoard()[i][j] == '_') {\n\t\t\t\t\t\n\t\t\t\t\tchar[][] moveBoard = createNewBoard(currentState);\n\t\t\t\t\t\n\t\t\t\t\t// Up\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// If it is an opponent tile, then you keep going up until you either my tile (fail) or\n\t\t\t\t\t\t// a blank space (success/move possible)\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j] == opponentTile) { \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][j] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k+1; l<=i;l++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[l][j] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][j] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\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\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Down\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][j] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k-1; l>=i;l--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[l][j] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][j] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i][j-1] == opponentTile) { \n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = j-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[i][k] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k+1; l<=j;l++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[i][l] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[i][k] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\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\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i][j+1] == opponentTile) { \n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = j+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[i][k] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k-1; l>=j;l--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[i][l] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[i][k] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Up and Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j-1] == opponentTile) { \n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j-2;\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l+1;\n\t\t\t\t\t\t\t\t\tfor (int q = k+1; q<=i;q++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\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\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Up and Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j+1] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j+2;\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l-1;\n\t\t\t\t\t\t\t\t\tfor (int q = k+1; q<=i;q++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl++;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\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\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} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Down and Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j-1] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j-2;\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l+1;\n\t\t\t\t\t\t\t\t\tfor (int q = k-1; q>=i;q--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\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\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Down and Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j+1] == opponentTile) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j+2;\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l-1;\n\t\t\t\t\t\t\t\t\tfor (int q = k-1; q>=i;q--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl++;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\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}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\tif (!compareBoards(moveBoard, currentState.getBoard())) {\n\t\t\t\t\t\tgameState move = new gameState(moveBoard, nextNextUp);\t\t\n\t\t\t\t\t\tpossibleStates.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\n\t\treturn possibleStates;\n\t\t\n\t\t\n\t\t\n\t}",
"public String getMove() {\n\t\treturn move;\n\t}",
"public GameState getGameState() {\n return this.gameState;\n }",
"@Override\n\tpublic Direction getMove() {\n\t\t//Equal probability for each of the 8 compass direction, as well as staying stationary\n\t\treturn choices[this.random.nextInt(9)];\n\t}",
"private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }",
"@Override\n public void update(float delta) {\n\tif (player.getState() == PlayerState.JUMPING) {\n\t walkingStateTime = 0;\n\t jumpingStateTime += delta;\n\t} else if (player.getState() == PlayerState.WALKING) {\n\t jumpingStateTime = 0;\n\t walkingStateTime += delta;\n\t} else if (player.getState() == PlayerState.IDLE) {\n\t walkingStateTime = 0;\n\t jumpingStateTime = 0;\n\t}\n\t\n }",
"@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}",
"public GameObjectState getState() {\r\n\t\treturn state;\r\n\t}",
"public int moves()\n {\n\n if (goalNode!=null && goalNode.board.isGoal()){\n return goalNode.moves;\n }\n return -1;\n }",
"public double getDirectionMove();",
"private boolean canMove() {\n\t\tif (System.currentTimeMillis() - lastTrunTime < 300) {// move time is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 300ms before\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last move\n\t\t\treturn false;\n\t\t}\n\t\tboolean status = false;\n\t\tif(stage == 1){\n\t\t\tmap = GameView.map;\n\t\t}else if(stage == 2){\n\t\t\tmap = GameViewStage2.map;\n\t\t}else {\n\t\t\tmap = GameViewStage3.map;\n\t\t}\n\t\tif (direction == UP) {// when tank moves up\n\t\t\tif (centerPoint.getY() - speed >= 0) {\n\t\t\t\tif (map[(centerPoint.getY() - speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == DOWN) {\n\t\t\tif (centerPoint.getY() + tankBmp.getHeight() + speed < screenHeight) {\n\t\t\t\tif (map[(centerPoint.getY() + 2 * UNIT + speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == LEFT) {\n\n\t\t\tif (centerPoint.getX() - speed >= 0) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX() - speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == RIGHT) {\n\t\t\tif (centerPoint.getX() + tankBmp.getWidth() + speed < screenWidth) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX()\n\t\t\t\t\t\t+ 2 * UNIT + speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (status)\n\t\t\tlastTrunTime = System.currentTimeMillis();\n\t\treturn status;\n\t}",
"public Vector<Point> getValidMoves(){\r\n return this.validMoves;\r\n }",
"public void getMove(){\n\t\t\n\t}",
"@Test\n\tpublic void testGetMoves() {\n\t\tGameState test = new GameState();\n\t\ttest.move(4);\n\t\ttest.move(7);\n\t\ttest.move(15);\n\t\ttest.move(20);\n\t\tassertEquals(4, test.getMoves());\n\t\ttest.move(24);\n\t\ttest.move(16);\n\t\tassertEquals(6, test.getMoves());\n\t}",
"public int moves() {\n return moveMin;\n }",
"public static Move openingStrategy(PentagoBoardState boardState, int player) {\n\t Move firstMoveOne = new PentagoMove(1, 0, Quadrant.BL, Quadrant.BR, player);\r\n\t Move firstMoveTwo = new PentagoMove(1, 3, Quadrant.BL, Quadrant.BR, player);\r\n\t Move moveThree = new PentagoMove(0, 1, Quadrant.BL, Quadrant.TR, player);\r\n\t Move moveFour = new PentagoMove(0, 4, Quadrant.TL, Quadrant.BR, player);\r\n\t Move moveFive = new PentagoMove(3, 1, Quadrant.BL, Quadrant.TL, player);\r\n\t Move moveSix = new PentagoMove(3, 4, Quadrant.TL, Quadrant.TR, player);\r\n\t Move moveSeven = new PentagoMove(2, 2, Quadrant.TL, Quadrant.TR, player);\r\n\t Move moveEight = new PentagoMove(2, 5, Quadrant.TL, Quadrant.BR, player);\r\n\t Move moveNine = new PentagoMove(5, 2, Quadrant.BL, Quadrant.TL, player);\r\n\t Move moveTen = new PentagoMove(5, 5, Quadrant.TL, Quadrant.TR, player);\r\n\t \r\n\t //First turn as either Black or White\r\n\t if(boardState.getTurnNumber() == 0 || boardState.getTurnNumber() == 1) {\r\n\t if(boardState.isLegal((PentagoMove) firstMoveOne)) {\r\n\t \treturn firstMoveOne;\r\n\t }\r\n\t else if(boardState.isLegal((PentagoMove) firstMoveTwo)) {\r\n\t \treturn firstMoveTwo;\r\n\t }\r\n\t else {\r\n\t \t/* If something goes awry, play the first legal move (will place pieces in TL quadrant usually).\r\n\t \t * Same error condition for the following moves as well.\r\n\t \t **/\r\n\t \tArrayList<PentagoMove> legalMoves = boardState.getAllLegalMoves();\r\n\t \treturn legalMoves.get(0);\r\n\t }\r\n\t }\r\n\t else if(boardState.getTurnNumber() == 2 || boardState.getTurnNumber() == 3) {\r\n\t \t//White player turn 2 & 3 set up\r\n\t \tif(player == 0) {\r\n\t\t \tif(boardState.isLegal((PentagoMove) moveThree) && boardState.getPieceAt(1, 0).toString().equals(\"w\")) {\r\n\t\t \treturn moveThree;\r\n\t\t }\r\n\t\t \tif(boardState.isLegal((PentagoMove) moveFour) && boardState.getPieceAt(1, 3).toString().equals(\"w\")) {\r\n\t\t \t\treturn moveFour;\r\n\t\t \t}\r\n\t\t \tif(boardState.isLegal((PentagoMove) moveFive) && boardState.getPieceAt(4, 0).toString().equals(\"w\")) {\r\n\t\t \treturn moveFive;\r\n\t\t }\r\n\t\t \tif(boardState.isLegal((PentagoMove) moveSix) && boardState.getPieceAt(4, 3).toString().equals(\"w\")) {\r\n\t\t \t\treturn moveSix;\r\n\t\t \t}\r\n\t\t \tif(boardState.getPieceAt(0, 1).toString().equals(\"b\") && boardState.getPieceAt(1, 0).toString().equals(\"w\")\t\r\n\t\t \t\t\t&& boardState.isLegal((PentagoMove) moveSeven)) {\r\n\t\t \treturn moveSeven;\r\n\t\t }\r\n\t\t \tif(boardState.getPieceAt(0, 4).toString().equals(\"b\") && boardState.getPieceAt(1, 3).toString().equals(\"w\")\r\n\t\t \t\t\t&& boardState.isLegal((PentagoMove) moveEight)) {\r\n\t\t \t\treturn moveEight;\r\n\t\t \t}\r\n\t\t \tif(boardState.getPieceAt(3, 1).toString().equals(\"b\") && boardState.getPieceAt(4, 0).toString().equals(\"w\")\r\n\t\t \t\t\t&& boardState.isLegal((PentagoMove) moveNine)) {\r\n\t\t \treturn moveNine;\r\n\t\t }\r\n\t\t \tif(boardState.getPieceAt(3, 4).toString().equals(\"b\") && boardState.getPieceAt(4, 3).toString().equals(\"w\")\r\n\t\t \t\t\t&& boardState.isLegal((PentagoMove) moveTen)) {\r\n\t\t \t\treturn moveTen;\r\n\t\t \t}\r\n\t\t else {\r\n\t\t \tArrayList<PentagoMove> legalMoves = boardState.getAllLegalMoves();\r\n\t\t \treturn legalMoves.get(0);\r\n\t\t }\r\n\t \t} \r\n\t \t//Black player turn 2 & 3 set up\r\n\t \telse {\r\n\t \t\tif(boardState.isLegal((PentagoMove) moveThree) && boardState.getPieceAt(1, 0).toString().equals(\"b\")) {\r\n\t\t \treturn moveThree;\r\n\t\t }\r\n\t \t\tif(boardState.isLegal((PentagoMove) moveFour) && boardState.getPieceAt(1, 3).toString().equals(\"b\")) {\r\n\t\t \treturn moveFour;\r\n\t\t }\r\n\t \t\tif(boardState.isLegal((PentagoMove) moveFive) && boardState.getPieceAt(4, 0).toString().equals(\"b\")) {\r\n\t\t \treturn moveFive;\r\n\t\t }\r\n\t \t\tif(boardState.isLegal((PentagoMove) moveSix) && boardState.getPieceAt(4, 3).toString().equals(\"b\")) {\r\n\t\t \treturn moveSix;\r\n\t\t }\r\n\t \t\tif(boardState.getPieceAt(0, 1).toString().equals(\"w\") && boardState.getPieceAt(1, 0).toString().equals(\"b\")\r\n\t \t\t\t\t&& boardState.isLegal((PentagoMove) moveSeven)) {\r\n\t\t \treturn moveSeven;\r\n\t\t }\r\n\t\t \tif(boardState.getPieceAt(0, 4).toString().equals(\"w\") && boardState.getPieceAt(1, 3).toString().equals(\"b\")\r\n\t\t \t\t\t&& boardState.isLegal((PentagoMove) moveEight)) {\r\n\t\t \t\treturn moveEight;\r\n\t\t \t}\r\n\t\t \tif(boardState.getPieceAt(3, 1).toString().equals(\"w\") && boardState.getPieceAt(4, 0).toString().equals(\"b\")\r\n\t\t \t\t\t&& boardState.isLegal((PentagoMove) moveNine)) {\r\n\t\t \treturn moveNine;\r\n\t\t }\r\n\t\t \tif(boardState.getPieceAt(3, 4).toString().equals(\"w\") && boardState.getPieceAt(4, 3).toString().equals(\"b\")\r\n\t\t \t\t\t&& boardState.isLegal((PentagoMove) moveTen)) {\r\n\t\t \t\treturn moveTen;\r\n\t\t \t}\r\n\t\t else {\r\n\t\t \tArrayList<PentagoMove> legalMoves = boardState.getAllLegalMoves();\r\n\t\t \treturn legalMoves.get(0);\r\n\t\t }\r\n\t \t}\t \r\n\t }\r\n\t else {\r\n\t \t//If we are past Player's Turn 3, start using MiniMax with a-b pruning\r\n\t \tMiniMaxABPruning instc = new MiniMaxABPruning();\r\n\t \treturn instc.abPruningStrategy(boardState, boardState.getTurnPlayer());\r\n\t }\r\n\t}",
"boolean isGameSpedUp();",
"public int getNumMoving() {\n int numMoving = 0;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n if (single.getState() == SingleState.MOVING ||\n single.getState() == SingleState.CATCHING_UP ||\n single.getState() == SingleState.ROUTING) {\n numMoving += 1;\n }\n }\n return numMoving;\n }",
"@Override\n public GameState getGameState() {\n return this.gameState;\n }",
"private PawnMoveInformation getMoveInformation() {\n\t\treturn this.info;\n\t}",
"public int moves() {\n if (isSolvable())\n return _moves;\n else\n return -1;\n }",
"public boolean isWalking(){\n if (jumpState < 2)\n return true;\n else\n return false;\n}",
"boolean makeMove();",
"public String getMoves() {\n\t\treturn moves;\n\t}",
"public float getTimeToMove()\n\t{\n\t\treturn this.timeToMove;\n\t}",
"GameState getGameState() {\n return gameState;\n }",
"private int gameState() {\n\t\t\n\t\tint gameNotOver = 0;\n\t\tint gameOverWinnerX = 1;\n\t\tint gameOverWinnerO = 2;\n\t\tint gameOverTie = 3;\n\t\t\n\t\t\n\t\t\n\t\t//Win Vertically \n\t\t// 0 3 6 , 1 4 7 , 2 5 8\n\t\t\t\t\n\t\t//Win Horizontally\n\t\t//0 1 2 , 3 4 5 , 6 7 8 \n\t\t\t\t\n\t\t//Win Diagonally\n\t\t// 0 4 8 , 2 4 6\n\t\t\t\t\n\t\t//Assuming it's an equal grid\n\t\t\t\t\n\t\tMark winningMark = null;\n\t\t\t\t\n\t\tboolean hasFoundWinner = false;\n\t\t\t\t\n\t\tint row = 0;\n\t\tint column = 0;\n\t\t\t\t\n\t\t//Horizontal Winner Test\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\tcolumn ++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcolumn = 0;\n\t\t\trow++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t// Vertical Winner Test\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\n\t\twhile (!hasFoundWinner && column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\trow = 0;\n\t\t\tcolumn++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Winner Test \"\\\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Test \"/\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = COLUMN_COUNT - 1;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn--;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If there are no moves left, and there is no winner, game ends inn a tie \n\t\t\n\t\tboolean foundNoMove = false;\n\t\tfor (int i = 0; i < movesArray.length; i++) {\n\t\t\tif (movesArray[i] == NO_MOVE) {\n\t\t\t\tfoundNoMove = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!foundNoMove && !hasFoundWinner) {\n\t\t\treturn gameOverTie;\n\t\t}\n\t\t\n\t\t// If there is no winner and there are still moves left, game is not over\n\t\t\n\t\treturn gameNotOver;\n\t\t\n\t}",
"private int getStateOfPositionFromBoard(positionTicTacToe position, List<positionTicTacToe> targetBoard)\n\t{\n\t\tint index = position.x*16+position.y*4+position.z;\n\t\treturn targetBoard.get(index).state;\n\t}",
"@Override\n public Position[] getCanMoves() {\n PieceWay way = new PieceWay(getPosition());\n Position[] PawnWay = way.waysPawnPos(color);\n return PawnWay;\n }"
] | [
"0.72836167",
"0.71546906",
"0.7140662",
"0.7121212",
"0.7116435",
"0.7081303",
"0.6984136",
"0.6980493",
"0.69785833",
"0.66366035",
"0.6593406",
"0.6575819",
"0.6575513",
"0.6567006",
"0.6550409",
"0.6451895",
"0.6422045",
"0.64166373",
"0.6405671",
"0.63964915",
"0.63881373",
"0.6383023",
"0.6379521",
"0.6331206",
"0.632813",
"0.63202596",
"0.628057",
"0.6251469",
"0.6236778",
"0.6226503",
"0.6224481",
"0.6193839",
"0.616981",
"0.6169326",
"0.6165567",
"0.6163426",
"0.6161389",
"0.6161389",
"0.61539483",
"0.6151664",
"0.61482775",
"0.6137328",
"0.61193746",
"0.61166877",
"0.61127156",
"0.61032575",
"0.60943055",
"0.6076568",
"0.6065413",
"0.6060769",
"0.6056185",
"0.60325307",
"0.6015011",
"0.60142803",
"0.6010633",
"0.60020685",
"0.5987548",
"0.5985751",
"0.5977861",
"0.59765416",
"0.59677655",
"0.5966665",
"0.5966665",
"0.5966665",
"0.5966665",
"0.5966665",
"0.5966665",
"0.5962804",
"0.59614265",
"0.59587365",
"0.5957203",
"0.5955445",
"0.5942031",
"0.5932498",
"0.59211516",
"0.59180075",
"0.5914379",
"0.5902914",
"0.58993876",
"0.5895785",
"0.5886817",
"0.5881796",
"0.5876052",
"0.58744174",
"0.5872801",
"0.5866643",
"0.58645725",
"0.58639497",
"0.58602405",
"0.5856166",
"0.58511454",
"0.5848679",
"0.58457375",
"0.58393914",
"0.5834961",
"0.5834408",
"0.58327985",
"0.5825925",
"0.5825485",
"0.5822092"
] | 0.7739871 | 0 |
Sets the state of movement of the player | public void setStateOfMovement(int movementState){stateOfMovement = movementState; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setMoving(boolean isMoving);",
"public void setState(PlayerState state) {\n this.state = state;\n }",
"public void setMovementState(int movementState) {\n this.movementState = movementState;\n }",
"void playerMove(State state);",
"protected void setMove(int t){\r\n\t\tthis.move = t;\r\n\t}",
"public void move() {\n\t\tthis.hero.setPF(1);\n\t\tthis.hero.setState(this.hero.getMoved());\n\t}",
"public void setState(Player player) {\n\t\tstate = player;\n\t\tstateChanged();\n\t}",
"private void updatePlayerMovingStatus(){\n // get player's moving status\n if(keyPressed.contains(KeyCode.LEFT)){\n player.setFacing(Direction.LEFT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.RIGHT)){\n player.setFacing(Direction.RIGHT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.UP)){\n player.setFacing(Direction.UP);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.DOWN)){\n player.setFacing(Direction.DOWN);\n player.setIsMoving(true);\n } else {\n player.setIsMoving(false);\n }\n }",
"public void setMovement(){\n\t\tfloat distance = GameManager.getInstance().getGameCamera().getWidth();\n\t\tfloat durationTime = distance/this.speed;\n\t\t\n\t\tmoveX = new MoveByModifier(durationTime, -(this.xInicial-this.xFinal), 0);\n\t\t\n\t\tthis.registerEntityModifier(moveX);\n\t}",
"public void setPlayerState(boolean state)\n\t{\n\t\tthis.blnPlayerState = state;\n\t\t\n\t}",
"public void setMoving(boolean TorF) {\n this.moving = TorF;\n }",
"public void setPlayState(PlayerState state) { isPaused = !state.playing; }",
"public void setDirectionMove(double direction);",
"public void setPlayerState(PlayerState playerState) {\n this.playerState = playerState;\n }",
"public void setMoving(boolean isMoving) {\r\n\t\tthis.isMoving = isMoving;\r\n\t}",
"public void move()\n {\n move(WALKING_SPEED);\n }",
"public void setMovement(int value) {\n this.movement = value;\n }",
"public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }",
"public void move() {\n\t\tif(right) {\n\t\t\tgoRight();\n\t\t\tstate++;\n\t\t\tif(state > 5) {\n\t\t\t\tstate = 3;\n\t\t\t}\n\t\t}\n\t\telse if(left) {\n\t\t\tgoLeft();\n\t\t\tstate++;\n\t\t\tif(state > 2) {\n\t\t\t\tstate = 0;\n\t\t\t}\n\t\t}\n\t}",
"private void movement()\n {\n if(gameOverBool==false)\n {\n if(Greenfoot.isKeyDown(\"up\"))\n {\n setLocation(getX(), getY()-6);\n setRotation(2);\n } else if (Greenfoot.isKeyDown(\"down\")){\n setLocation(getX(), getY()+6); \n setRotation(8);\n } else{\n setRotation(5);\n } \n }\n }",
"public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }",
"private void setState(WFDState s) {\n Log.d(TAG, \"Moving from \" + sState + \" --> \" + s);\n sState = s;\n }",
"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}",
"@Override\n public void move() {\n switch (direction){\n case SOUTH:\n position.setY(position.getY() + currentSpeed);\n break;\n case NORTH:\n position.setY(position.getY() - currentSpeed);\n break;\n case WEST:\n position.setX(position.getX() - currentSpeed);\n break;\n case EAST:\n position.setX(position.getX() + currentSpeed);\n }\n }",
"@Override\n\tvoid setMove(RobotStatus status, ITargetManager targetMan)\n\t{\n\t}",
"public abstract boolean changeMove();",
"public void setMove(int move){\n this.move = move;\n }",
"@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }",
"private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }",
"protected void setMove(int _move)\t\t{\tmove = _move;\t\t}",
"void update() {\n if (gameState.states > 1)\n move();\n }",
"@Override\n\tpublic void update() {\n\n\t\t//Get current time\n\t\tdouble currentTime = System.currentTimeMillis();\n\t\tdouble movement = ((currentTime - previousTime) * movementSpeed) / 1000.0;\n\t\t\n\t\t//Create a translation vector\n\t\tVector translation = new Vector(2);\n\n\t\tboolean moving = false;\n\t\t\n\t\t//Determine which keys are pressed\n\t\tif(Directory.inputManager.isKeyPressed('w')){\n\t\t\t//Set translation Vector to move up\n\t\t\ttranslation.setComponent(1, translation.getComponent(1)-movement);\n\t\t\tattachedTo.getSprite().playAnimation(3, true);\n\t\t\tmoving = true;\n\t\t}\n\t\tif(Directory.inputManager.isKeyPressed('s')){\n\t\t\t//Set translation vector to move down\n\t\t\ttranslation.setComponent(1, translation.getComponent(1) + movement);\n\t\t\tattachedTo.getSprite().playAnimation(2, true);\n\t\t\tmoving = true;\n\n\t\t}\n\t\tif(Directory.inputManager.isKeyPressed('a')){\n\t\t\t//Set translation Vector to move left\n\t\t\ttranslation.setComponent(0, translation.getComponent(0)-movement);\n\t\t\tattachedTo.getSprite().playAnimation(0, true);\n\t\t\tmoving = true;\n\n\t\t}\n\t\tif(Directory.inputManager.isKeyPressed('d')){\n\t\t\t//Set translation Vector to move right\n\t\t\ttranslation.setComponent(0, translation.getComponent(0)+movement);\n\t\t\tattachedTo.getSprite().playAnimation(1, true);\n\t\t\tmoving = true;\n\n\t\t}\n\t\t\n\t\tif(!moving) attachedTo.getSprite().setRepeating(false);\n\t\t\n\t\t//Move this gameObject\n\t\tgetAttachedMObj().move(translation);\n\t\t\n\t\t//Update previous time\n\t\tpreviousTime = currentTime;\n\t\t\t\n\t}",
"public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}",
"private void move()\n\t{\n\t\tif(moveRight)\n\t\t{\n\t\t\tif(position.getX() + speedMovement <= width)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() +speedMovement+speedBoost);\n\t\t\t\tmoveRight = false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tif(moveLeft)\n\t\t{\n\t\t\tif(position.getX() - speedMovement > 0)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() -speedMovement - speedBoost + gravitationalMovement);\n\t\t\t\tmoveLeft = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * If a gravitational field is pushing the ship, set the movement accordingly\n\t\t */\n\t\tif(gravitationalMovement>0)\n\t\t{\n\t\t\tif(position.getX()+gravitationalMovement <= width)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(position.getX() + gravitationalMovement > 0)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t}",
"public void changeMovement(int directionX, int directionY) {\r\n movementX = directionX;\r\n movementY = directionY;\r\n }",
"public void move()\r\n\t{\r\n\t\tmoveHor(xVel);\r\n\t\tmoveVert(yVel);\r\n\t}",
"void startMovement();",
"public void setMove(int move) {\n this.move = move;\n }",
"public void setMovementChanged(boolean movementChanged) {\n this.movementChanged = movementChanged;\n }",
"public void move() {\n if(Objects.nonNull(this.position)) {\n Position position = this.getPosition();\n Function<Position, Position> move = moveRobotInDirectionMap.get(position.getDirection());\n this.position = move.apply(position);\n }\n }",
"public void setMovement(int dx, int dy, int time)\n\t{\n\t\tthis.dx = dx;\n\t\tthis.dy = dy;\n\t\tthis.time = time;\n\t\t//run();\n\t}",
"public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }",
"@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() {\r\n if (y > HEIGHT)\r\n y = initialY;\r\n y = y + speed;\r\n }",
"@Override\r\n\tpublic Behaviour update(GameContext context) {\n\t\tif (Math.abs(thing.getX() - moveToX) < thing.getSpeed().getXv() / context.getTimeSinceLastUpdate()) {\r\n\t\t\tthing.setX(moveToX);\r\n\t\t}\r\n\t\tif (Math.abs(thing.getY() - moveToY) < thing.getSpeed().getYv() / context.getTimeSinceLastUpdate()) {\r\n\t\t\tthing.setY(moveToY);\r\n\t\t};\r\n\t\t\r\n\t\tif (!isContinueAfterTarget()) {\r\n\t\t\tthing.changeDirection(moveToX, moveToY, thing.getX(), thing.getY());\r\n\t\t}\r\n\t\tthing.updatePositionBasedOnSpeed(context);\r\n\t\t\r\n\t\tif (!isContinueAfterTarget()) {\r\n\t\t\tif ((int) thing.getX() == (int) moveToX) { // && thing.getY() == moveToLocation.y){\r\n\t\t\t\treturn new IdleBehaviour(thing);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t}",
"public void movement() {\n\n\t\t// If the player wants to move left ie presses 'a' key..\n\t\tif (spaceInvadersGame.getKeyManager().left) {\n\n\t\t\t// If the player is on the left bound of the window do not move.\n\t\t\tif (xPosition <= 0) {\n\n\t\t\t\t// Move the player's xPosition left.\n\t\t\t} else {\n\t\t\t\txPosition -= playerSpeed;\n\t\t\t}\n\n\t\t} else if (spaceInvadersGame.getKeyManager().right) {\n\t\t\tif (xPosition >= 500 - width) {\n\n\t\t\t} else {\n\t\t\t\txPosition += playerSpeed;\n\t\t\t}\n\t\t}\n\t}",
"public void move() {\n\t\tthis.move(velocity.x, velocity.y);\n\t}",
"public boolean setPlayerToMove(Player aNewPlayerToMove)\n {\n boolean wasSet = false;\n if (aNewPlayerToMove != null)\n {\n playerToMove = aNewPlayerToMove;\n wasSet = true;\n }\n return wasSet;\n }",
"public void updatePlayerLocation() {requires new property on gamestate object\n //\n }",
"public void setMoveLeft(boolean TorF) {\n moveLeft = TorF;\n }",
"public void setFrame() {\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"setFrame\");\r\n\t\t\r\n\t\tif (state != GameState.STOPPED) {\r\n\t\t\ttry {\r\n\t\t\t\t// Wait for event\r\n\t\t\t\tif (state == GameState.PAUSED\r\n\t\t\t\t\t|| state == GameState.WAITING_FRAME) {\r\n\t\t\t\t\tsynchronized (this) {\r\n\t\t\t\t\t\twait();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Wait between two frames\r\n\t\t\t\telse if (speed < CowSimulator.UNLIMITED_SPEED) {\r\n\t\t\t\t\tThread.sleep(period);\r\n\t\t\t\t}\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tlogger.error(e.getMessage(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Game stopped during turn\r\n\t\tif (state == GameState.STOPPED) {\r\n\t\t\t// End game\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}",
"public void move() {\r\n\t\tx = x + speed;\r\n\t}",
"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 move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}",
"public boolean moveOn() {\n\t\t\n\t}",
"public synchronized void set() {\n this.currentState = EventState.UP;\n notify();\n }",
"public void move() {\n\t\tif (!visible) {\r\n\t\t\thideTurtle();\r\n\t\t}\r\n\t}",
"public void setState(GameState aState){\n\t\tpoints=aState.getScore();\n\t\tcurrentBoard.setState(aState.getBoardState());\n\t}",
"public void setState(GameState s) {\n this.state = s;\n }",
"public void move()\n {\n x = x + unitVector.getValue(1)*speed;\n y = y + unitVector.getValue(2)*speed;\n }",
"public void setPlayerPosition() throws IOException\r\n\t{\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tint X = 0;\r\n\t\tint Y = 0;\r\n\t\t\r\n\t\twhile(flag == false)\r\n\t\t{\r\n\t\t\toStream.writeInt(X);\r\n\t\t\toStream.writeInt(Y);\r\n\t\t\tflag = iStream.readBoolean();\r\n\t\t\tX++;\r\n\t\t\tY++;\r\n\t\t}\r\n\t\tboard.makePlayer(X-1, Y-1);\r\n\t}",
"public boolean setMove(boolean movable)\n {\n canMove = movable;\n return true;\n }",
"public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}",
"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\tpublic void onPlayerMoveEvent(double x, double y, boolean isMove) {\n\t\tmouseX = x;\n\t\tmouseY = y;\n\t\tthis.isMove = isMove;\n\t}",
"private void setMove(char player, int location)\n {\n \tmGame.setMove(player, location);\n mBoardButtons[location].setEnabled(false);\n mBoardButtons[location].setText(String.valueOf(player));\n \tif (player == Player2Game.PLAYER_ONE)\n \t\tmBoardButtons[location].setTextColor(Color.GREEN);\n \telse\n \t\tmBoardButtons[location].setTextColor(Color.RED);\n }",
"public void startMoving ()\n {\n if (canMove()) {\n ((Mobile)_actor).setDirection(_actor.getRotation());\n _actor.set(Mobile.MOVING);\n }\n }",
"public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }",
"public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}",
"public void updatemove() {\n\t\tmove = new Movement(getX(), getY(),dungeon,this);\n\t\t//System.out.println(\"Updated\");\n\t\tnotifys();\n\t\tif(this.getInvincible()) {\n\t\t\tsteptracer++;\n\t\t}\n\t\tdungeon.checkGoal();\n\t}",
"@Override\n public void update(float delta) {\n\tif (player.getState() == PlayerState.JUMPING) {\n\t walkingStateTime = 0;\n\t jumpingStateTime += delta;\n\t} else if (player.getState() == PlayerState.WALKING) {\n\t jumpingStateTime = 0;\n\t walkingStateTime += delta;\n\t} else if (player.getState() == PlayerState.IDLE) {\n\t walkingStateTime = 0;\n\t jumpingStateTime = 0;\n\t}\n\t\n }",
"public void setMove(char player, int location)\n {\n if(mBoard[location] != HUMAN_PLAYER && mBoard[location] != COMPUTER_PLAYER )\n {\n mBoardButtons[location].setEnabled(false);\n mBoardButtons[location].setText(String.valueOf(player));\n\n if (player == TicTacToeGame.HUMAN_PLAYER)\n mBoardButtons[location].setTextColor(Color.rgb(0, 200, 0));\n else\n mBoardButtons[location].setTextColor(Color.rgb(200, 0, 0));\n\n mBoard[location] = player;\n }\n\n }",
"public GameMode(int s)\n {\n bird3.y+=15;\n bird3.goUp = true;\n \n state = s;\n sprite = 0; \n }",
"public void setPlaybackState(PlaybackStateCompat param1) {\n }",
"public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }",
"public void move() {\n float xpos = thing.getX(), ypos = thing.getY();\n int xdir = 0, ydir = 0;\n if (left) xdir -= SPEED; if (right) xdir += SPEED;\n if (up) ydir -= SPEED; if (down) ydir += SPEED;\n xpos += xdir; ypos += ydir;\n\n VeggieCopter game = thing.getGame();\n int w = game.getWindowWidth(), h = game.getWindowHeight();\n int width = thing.getWidth(), height = thing.getHeight();\n if (xpos < 1) xpos = 1; if (xpos + width >= w) xpos = w - width - 1;\n if (ypos < 1) ypos = 1; if (ypos + height >= h) ypos = h - height - 1;\n thing.setPos(xpos, ypos);\n }",
"public void setMoveModifier(Point point) {\n\t\tthis.translation = point;\n\t}",
"private void setMovingDir(Direction dir)\n {\n if(moving != dir)\n {\n \txSpeed = 0;\n \t\n \tSystem.out.println(\"xSpeed = 0\");\n \t\n resetAccelX();\n }\n moving = dir;\n setFacing(dir);\n //System.out.println(\"setMovingDir: \" + dir);\n }",
"public static void setState(GameState state) {\r\n\t\tgameState = state;\r\n\t}",
"public void changeHeadState() {\n //tracking the head with the player\n if(moveUp && moveRight){\n playerHead.setxPos(this.getxPos()+14);\n playerHead.setyPos(this.getyPos()-34);\n }\n else if(moveUp && moveLeft){\n playerHead.setxPos(this.getxPos()+2);\n playerHead.setyPos(this.getyPos()-34);\n }\n else if(moveDown && moveRight){\n playerHead.setxPos(this.getxPos()+14);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveDown && moveLeft){\n playerHead.setxPos(this.getxPos()+2);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveDown || shootDown || (!moving && !shooting && this.getPicY() == 0)){\n playerHead.setxPos(this.getxPos()+2);\n playerHead.setyPos(this.getyPos()-28); \n }\n else if((moveUp || (shootUp && moveUp))|| (!moving && this.getPicY() == 211)){\n playerHead.setxPos(this.getxPos()+9);\n playerHead.setyPos(this.getyPos()-28); \n }\n else if((!moving && shootUp && this.getPicY() == 0) ){\n playerHead.setxPos(this.getxPos()+3);\n playerHead.setyPos(this.getyPos()-28); \n }\n else if(shootLeft && moveRight || shootLeft){\n playerHead.setxPos(this.getxPos()+10);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveLeft ||(!moving && !shooting && this.getPicY() == 141)){\n playerHead.setxPos(this.getxPos()+3);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveRight||(shootRight && !moving)||(shootRight && moveRight)||(!moving && !shooting && this.getPicY() == 74)){\n playerHead.setxPos(this.getxPos()+10);\n playerHead.setyPos(this.getyPos()-29);\n }\n else if(shootUp && !moving){\n playerHead.setxPos(this.getxPos()+10);\n playerHead.setyPos(this.getyPos()-29);\n }\n //left right and shooting up\n \n //head faces the direction of the player while moving\n if (moveDown && moveRight) {\n playerHead.setPicX(52);//right\n } else if (moveDown && moveLeft) {\n playerHead.setPicX(0);//left\n } else if (moveUp && moveRight) {\n playerHead.setPicX(52);//right\n } else if (moveUp && moveLeft) {\n playerHead.setPicX(0);//left\n } else if (moveDown) {\n playerHead.setPicX(102);//down\n } else if (moveUp) {\n playerHead.setPicX(158);//up\n } else if (moveRight) {\n playerHead.setPicX(52);//right\n } else if (moveLeft) {\n playerHead.setPicX(0);//left\n }\n\n //head faces the direction of shooting while moving or standing in place\n if (shootDown) {\n playerHead.setPicX(102);\n } else if (shootUp) {\n playerHead.setPicX(158);\n } else if (shootRight) {\n playerHead.setPicX(52);\n } else if (shootLeft) {\n playerHead.setPicX(0);\n }\n\n if (shootLeft && shootRight) {\n playerHead.setPicX(52);//right\n } else if (shootUp && shootDown) {\n playerHead.setPicX(102);//down\n } else if (shootDown && shootRight) {\n playerHead.setPicX(102);//down\n } else if (shootDown && shootLeft) {\n playerHead.setPicX(102);//down\n } else if (shootUp && shootRight) {\n playerHead.setPicX(158);//up\n } else if (shootUp && shootLeft) {\n playerHead.setPicX(158);//up\n }\n\n if (!moving && !shooting) {\n if (this.getPicY() == 0) {\n playerHead.setPicX(102);//down\n } else if (this.getPicY() == 211) {\n playerHead.setPicX(158);//up\n } else if (this.getPicY() == 74) {\n playerHead.setPicX(52);//right\n } else if (this.getPicY() == 141) {\n playerHead.setPicX(0);//left\n }\n }\n }",
"public void set(GameState state){\n states.pop();\n states.push(state);\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}",
"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 }",
"void move(String direction) {\n \tif (direction.equals(\"A\")) { \n \t\tsetXCoord(getXCoord()-getHSpeed());\n \t} else if (direction.equals(\"D\")) {\n \t\tsetXCoord(getXCoord()+getHSpeed());\n \t}\n }",
"private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }",
"public void setMoveUp(boolean TorF) {\n moveUp = TorF;\n }",
"public void move() {\n\t\tif ( board.getLevel() == 5 )\n\t\t\tmovementIndex = ( movementIndex + 1 ) % movement.length;\n\t}",
"public void setMoved() {\r\n\t\tmoved = true;\r\n\t}",
"public void setPlaying() {\n\t\tstate = State.INGAME;\n\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 move()\n {\n double angle = Math.toRadians( getRotation() );\n int x = (int) Math.round(getX() + Math.cos(angle) * WALKING_SPEED);\n int y = (int) Math.round(getY() + Math.sin(angle) * WALKING_SPEED);\n setLocation(x, y);\n }",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\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 void move() {\n\t\tsuper.move();\n\t\t\n\t\t// if the slime hit the ground\n\t\tif (y >= 64*2) {\n\t\t\t// begin sliding (only needed for the first time he falls)\n\t\t\tif (accel_x != .25 && accel_x != duck_accel_x) accel_x = .25;\n\t\t\t\n\t\t\t// allow player to jump, since vel_y = 0 stops the jump\n\t\t\tif (jumping)\n\t\t\t\tjumping = false;\n\t\t\telse\n\t\t\t\tvel_y = 0;\n\t\t\t\n\t\t\t// slime is slightly lower while ducking\n\t\t\tif (ducking)\n\t\t\t\ty = 64*2+20;\n\t\t\telse\n\t\t\t\ty = 64*2;\n\t\t}\n\t\t\n\t\t// bounce if the slime hit the top\n\t\tif (y < 0) vel_y *= -1;\n\t}",
"public void move(){\n super.move();\n if(getX() >= Main.WIDTH - getWidth() * 1.5) {\n setDirection(-1);\n } else if(getX() <= 50) {\n setDirection(1);\n }\n }",
"public void setMove(Move move, Player player) {\n int hash = move.x*LENGTH + move.y;\n setMove(hash, player);\n }",
"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 }",
"@Override\r\n\tpublic void changePlayerMode(PlayerMode mode) {\r\n\t\tthis.playerMode = mode;\r\n\t\tdecideMakeAutomaticMove();\r\n\t}",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tplayer.right = true; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tplayer.left = true; \n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_Z) {\n\t\t\tplayer.shoot = true;\n\t\t}\n\t\t\n\t\tif(e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\tplayer.up = true; \n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tplayer.down = true; \n\t\t}\n}",
"@Override\n\tpublic void update() {\n\t\tkeyFrame++;\n\t\tif(keyFrame > 60)\n\t\t\tsetDead(true);\n\t\tif(move)\n\t\t\tif(!isDead())\n\t\t\t\tpositionY += getSpeed();\n\t}"
] | [
"0.7366184",
"0.710763",
"0.7076585",
"0.7045339",
"0.7009661",
"0.6925734",
"0.69209445",
"0.68722165",
"0.68065125",
"0.6773396",
"0.6762134",
"0.66918933",
"0.6630298",
"0.6584571",
"0.65765435",
"0.6558435",
"0.6543376",
"0.6530387",
"0.64886886",
"0.64869803",
"0.64724445",
"0.6462385",
"0.6448619",
"0.6422334",
"0.6421248",
"0.6401817",
"0.63694644",
"0.63342637",
"0.6332454",
"0.63196635",
"0.6311494",
"0.6260309",
"0.62491274",
"0.623417",
"0.6229403",
"0.6221626",
"0.6219392",
"0.6185997",
"0.6179498",
"0.6168989",
"0.6168791",
"0.6167072",
"0.6155565",
"0.615497",
"0.6146871",
"0.61415416",
"0.61391276",
"0.6128107",
"0.6115131",
"0.61115104",
"0.6108073",
"0.610548",
"0.609279",
"0.6079116",
"0.6073944",
"0.6072377",
"0.60707563",
"0.6050215",
"0.60495365",
"0.60482097",
"0.60414535",
"0.60386646",
"0.6038413",
"0.60325193",
"0.6032384",
"0.6025166",
"0.6022358",
"0.60209805",
"0.6020308",
"0.60086644",
"0.6006222",
"0.5999692",
"0.59966564",
"0.5996341",
"0.59907806",
"0.5990667",
"0.59891",
"0.5982374",
"0.59778494",
"0.59748614",
"0.5972834",
"0.59724337",
"0.5965641",
"0.5952738",
"0.5944616",
"0.594434",
"0.5937083",
"0.5935214",
"0.59268934",
"0.59246683",
"0.59134054",
"0.5910048",
"0.5909486",
"0.59080136",
"0.5900119",
"0.58997184",
"0.58953875",
"0.58950686",
"0.58937794",
"0.588958"
] | 0.75667256 | 0 |
Returns the jump state of the player | public boolean isJumping() { return isJumping; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isJumping(){\n if (jumpState == 2)\n return true;\n return false;\n\n}",
"public Image getJump(int player, boolean ep)\t{if (player==1) return jump1; else return jump2;}",
"public int getJumpValue() { \n return jumpValue; \n }",
"public void actionPerformed(ActionEvent e)\n {\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }",
"public int getKeyJump() {\n return jumpKey;\n }",
"public void setJumpState(int n)\n{\n jumpState=n;\n}",
"public String getJumpKey() {\n return this.jumpKey;\n }",
"public int getJumpCount() {return jumpCount;}",
"public boolean isWalking(){\n if (jumpState < 2)\n return true;\n else\n return false;\n}",
"public int jump() {\n if (Ylocation > 475) {\n Ylocation -= Ydir;\n }\n\n return Ylocation;\n }",
"public void jump() {\n jumped = true;\n teleport = true;\n waste = true;\n }",
"public boolean isJumping() {\r\n\t\treturn this.isJumping;\r\n\t}",
"public boolean isLegOut()\n{\n if (jumpState == 1)\n return true;\n return false;\n}",
"boolean jump(int posx, int posy, int prevPiece) {\n\t\tbool = false;\n\t\txdiff = (posx - prevPosX) / 2; \n\t\tydiff = (posy - prevPosY) / 2;\n\t\tif ((xdiff < 2 || xdiff > -2 && ydiff < 2) && prevPiece == 1) {\n\t\t\tSystem.out.println(\"Norm jump 1 \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 1 && (pieceJumped == 2 || pieceJumped == 4))\n\t\t\t\tbool = true;\n\t\t\telse if (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else if ((xdiff < 2 || xdiff > -2 && ydiff < -2) && prevPiece == 2) {\n\t\t\tSystem.out.println(\"Norm jump 2 \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else if (prevPiece == 3 || prevPiece == 4 && (xdiff < 2 || xdiff > -2 && ydiff < 2 || ydiff > -2)) {\n\t\t\tSystem.out.println(\"King jump \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 1 && (pieceJumped == 2 || pieceJumped == 4)) {\n\t\t\t\tSystem.out.println(curPlayer + \" Player 1 jumping over \" + pieceJumped);\n\t\t\t\tbool = true;\n\t\t\t} else if (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3)){\n\t\t\t\tSystem.out.println(curPlayer + \" jumping over \" + pieceJumped);\n\t\t\t\tbool = true;\n\t\t\t} else \n\t\t\t\tbool = false;\n\t\t}\n\t\tjumping = bool;\n\t\treturn bool;\n\t}",
"public Player getState() {\n\t\treturn state;\n\t}",
"public boolean isJumping(){\r\n\t\tif(jumping){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public boolean jumpOccurred()\n\t{\n\t\treturn _bJumpOccurred;\n\t}",
"public int getMaxJump() {return 2;}",
"public int getJumpCount()\n{\n return jumpCount;\n}",
"public void jumpPressed() {\n jumpingPressed = true;\n keys.get(keys.put(Keys.JUMP, true));\n }",
"public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }",
"public boolean jump () {\n\t\t// Velocity first (Symplectic Euler)\n\t\tdata._jumpVel = data._jumpVel - data._timeStep * data._gravity;\n\t\tdata._jumpPos = data._jumpPos + data._jumpVel * data._timeStep;\n\t\tif (data._jumpVel <= -10.5) {\n\t\t\tdata._timeStep = 0.02;\n\t\t\tdata._jumpPos = 0; \n\t\t\tdata._jumpVel = 10; \n\t\t\treturn false; \n\t\t}\n\t\t// Set position\n\t\tthis.setPosition( new Vec2d(this.getMainCharacter().getData().getPosition().x, - 70 * data._jumpPos + 400));\n\t\tthis.getMainCharacter().getData().setPosition(this.getPosition());\n\t\treturn true;\n\t}",
"public int getJumpSpot()\n{\n return jumpSpot;\n}",
"public PlayerState getPlayerState() {\r\n return playerState;\r\n }",
"public int getStateOfMovement(){ return stateOfMovement; }",
"@Override\n public void update(float delta) {\n\tif (player.getState() == PlayerState.JUMPING) {\n\t walkingStateTime = 0;\n\t jumpingStateTime += delta;\n\t} else if (player.getState() == PlayerState.WALKING) {\n\t jumpingStateTime = 0;\n\t walkingStateTime += delta;\n\t} else if (player.getState() == PlayerState.IDLE) {\n\t walkingStateTime = 0;\n\t jumpingStateTime = 0;\n\t}\n\t\n }",
"@Override\n public int getJumpMP() {\n return getJumpMP(true);\n }",
"public void jump() {\n if (this.numJumps < 3) {\n if (this.state.equals(\"onLeftWall\")) {\n this.moveRight();\n this.setSpecialState(\"jumpFromWall\", 180);\n } else if (this.state.equals(\"onRightWall\")) {\n this.moveLeft();\n this.setSpecialState(\"jumpFromWall\", 180);\n }\n this.yVel = this.jumpVel;\n this.numJumps++;\n }\n\n\n }",
"public PlayerState getPlayerState() {\n return this.playerState;\n }",
"PlayerState getPlayerState() {\n return playerState;\n }",
"public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}",
"private void jump() {\n\t\t\n\t\t// resets game\n\t\tif (gameOver) {\n\t\t\tbird = new Rectangle(WIDTH/2-10, HEIGHT/2-10, 20, 20);\n\t\t\tcolumns.clear();\n\t\t\tyMotion = 0;\n\t\t\tscore = 0;\n\t\t\t\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\t\n\t\t\tgameOver = false;\n\t\t}\n\t\t\n\t\t// starts game\n\t\tif (!started) {\n\t\t\tstarted = true;\n\t\t}\n\t\t\n\t\telse if (started && !gameOver) {\n\t\t\tif (yMotion > 0) {\n\t\t\t\tyMotion = 0;\n\t\t\t}\n\t\t\t\n\t\t\tyMotion -= 10;\n\t\t}\n\t\t\n\t}",
"@Override\n public int getJumpMPWithTerrain() {\n if ((getPosition() == null) || (getJumpType() == JUMP_BOOSTER)) {\n return getJumpMP();\n }\n int waterLevel = 0;\n if (!isOffBoard()) {\n waterLevel = game.getBoard().getHex(getPosition()).terrainLevel(Terrains.WATER);\n }\n if ((waterLevel <= 0) || (getElevation() >= 0)) {\n return getJumpMP();\n } else if (waterLevel > 1) {\n return 0;\n } else { // waterLevel == 1\n return applyGravityEffectsOnMP(torsoJumpJets());\n }\n }",
"void jump() {\n if (myIsJumping == myNoJumpInt) {\n myIsJumping++;\n // switch the cowboy to use the jumping image\n // rather than the walking animation images:\n setFrameSequence(null);\n setFrame(0);\n }\n }",
"public boolean getJustJumped() {\n\t\treturn this.just_jumped;\n\t}",
"PowerState getState();",
"public static BodyImage getJumpImage() {return jumpImage;}",
"public abstract String jump();",
"@Override\n public boolean canJump()\n {\n return canJump;\n }",
"@Override\n\tpublic void onJump(PlatformPlayer player) {\n\t\t\n\t}",
"public SoundClip getJumpSFX() {return jumpSFX;}",
"public void setJumping(boolean jumping) { isJumping = jumping; }",
"public void jump(){\n if(isOnGround()){\n setDy(0.08f);\n setOnGround(false);\n }\n }",
"public boolean isJumping() {\n if (steps.size() > 0) {\n boolean jump = false;\n for (MoveStep step : steps) {\n if (step.getType() == MovePath.MoveStepType.START_JUMP) {\n jump = true;\n }\n }\n return jump;\n }\n return false;\n }",
"public GameState getGameState();",
"public void jump() {\n\t\tif(!dead) {\r\n\t\t\tplaying = true;\r\n\t\t\tvelocity = jumpVelocity;\r\n\t\t\tplaySound(\"jump1.wav\");\r\n\t\t}\r\n\t}",
"public GameState GetState(){\n\t\treturn this.state;\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}",
"@Override\r\n\tpublic boolean Jump(Player arg0) {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean Jump(Player arg0) {\n\t\treturn false;\r\n\t}",
"@Override\n public int getJumpType() {\n if (jumpType == JUMP_UNKNOWN) {\n jumpType = JUMP_NONE;\n for (Mounted m : miscList) {\n if (m.getType().hasFlag(MiscType.F_JUMP_JET)) {\n if (m.getType().hasSubType(MiscType.S_IMPROVED)) {\n jumpType = JUMP_IMPROVED;\n } else {\n jumpType = JUMP_STANDARD;\n }\n break;\n } else if (m.getType().hasFlag(MiscType.F_JUMP_BOOSTER)) {\n jumpType = JUMP_BOOSTER;\n break;\n }\n }\n }\n return jumpType;\n }",
"private void jump() {\r\n\t\tjumping = true;\r\n\t\tjumpKeyPresses++;\r\n\t\tif (jumpKeyPresses < 12) {\r\n\t\t\tif (jumpKeyPresses == 1)\r\n\t\t\t\tdy = -0.02 * (1 / (0.3 + fatLevel));\r\n\t\t\tdy -= 0.001 * (1 / (0.3 + fatLevel));\r\n\t\t}\r\n\t}",
"@Override\n\tprotected float getJumpUpwardsMotion() {\n\t\treturn canFly() ? 1 : super.getJumpUpwardsMotion();\n\t}",
"@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}",
"interface GameState {\n String WAITING_FOR_SECOND_PLAYER = \"WAITING_FOR_SECOND_PLAYER\";\n String TURN_HARE = \"TURN_HARE\";\n String TURN_HOUND = \"TURN_HOUND\";\n String WIN_HARE_BY_ESCAPE = \"WIN_HARE_BY_ESCAPE\";\n String WIN_HARE_BY_STALLING = \"WIN_HARE_BY_STALLING\";\n String WIN_HOUND = \"WIN_HOUND\";\n }",
"@Override public BufferedImage getImg(){\n if(jumpState >= 1){\n return jumpingImg;\n }\n else\n return super.getImg();\n}",
"public GameState getState() {\n\t\treturn state;\n\t}",
"public void getGSpeedAfterJumpLand() {\n if(jumpState == JumpState.STATE_JUMP_DOWN && angle < 45) {\n groundSpeed = xSpeed;\n }\n else if(jumpState == JumpState.STATE_JUMP_DOWN && angle == 45) {\n if(Math.abs(xSpeed) > ySpeed) {\n groundSpeed = xSpeed; \n }\n else {\n groundSpeed = ySpeed*0.5*-Math.signum(Math.sin(angle));\n } \n } \n jumpState = JumpState.STATE_NOJUMP;\n springState = SpringState.STATE_NOSPRING;\n }",
"public boolean canJump() {\n\t\treturn false;\n\t}",
"public int getTextureState() {\n return MathHelper.clamp(MAX_TEXTURE_STATE * aggro / MAX_AGGRO, 0, MAX_TEXTURE_STATE);\n }",
"public PlayerState getEnemy()\n {\n if(this.turnOfPlayer == playerBlack)\n {\n return playerWhite;\n }\n return playerBlack;\n }",
"public void jump() {\n\n if (this.getPlanet() == null) {\n return;\n }\n\n float rot = this.getAngleBetween(this.getPlanet());\n\n this.jumpingTime = 0.5f;\n\n rot -= Math.PI / 2.0;\n\n Vector2 direction = new Vector2((float) Math.cos(rot), (float) Math.sin(rot)).nor();\n\n this.applyForceToCenter(direction.rotate(180).scl((float) (Math.pow(this.calculatePullForce(this.getPlanet()).len(), 4))), true);\n\n this.limitVelocity();\n\n this.removeFromPlanet();\n\n float time = this.state.getTime();\n\n this.setState(new FloatState(time + jumpBonusTime));\n\n }",
"@PlayerState\n public abstract int getPlayerState();",
"public boolean jumpMayBeChanged() {\n\t\treturn (subBlocks[1].jump != null || subBlocks[1].jumpMayBeChanged());\n\t}",
"public Gamestate myTurn() {\n\t\treturn this.iGoWhen;\n\t}",
"@Override\n public int getJumpMP(boolean gravity) {\n int jump = 0;\n\n if (hasShield() && (getNumberOfShields(MiscType.S_SHIELD_LARGE) > 0)) {\n return 0;\n }\n\n if (hasModularArmor()) {\n jump--;\n }\n\n for (Mounted mounted : getMisc()) {\n if (mounted.getType().hasFlag(MiscType.F_JUMP_JET) && !mounted.isDestroyed() && !mounted.isBreached()) {\n jump++;\n } else if (mounted.getType().hasFlag(MiscType.F_JUMP_BOOSTER) && !mounted.isDestroyed() && !mounted.isBreached()) {\n jump = getOriginalJumpMP();\n break;\n }\n }\n\n // apply Partial Wing bonus if we have the ability to jump\n if (jump > 0) {\n for (Mounted mount : getMisc()) {\n if (mount.getType().hasFlag(MiscType.F_PARTIAL_WING)) {\n jump += getPartialWingJumpBonus(mount);\n break;\n }\n }\n }\n\n if (gravity) {\n return applyGravityEffectsOnMP(jump);\n }\n return jump;\n }",
"public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}",
"private void jump(){\n getField().pandaJumped(this);\n }",
"public double getPlayerYPos() {\r\n return jumper.getYposition();\r\n }",
"@Override\n\tpublic boolean move() {\n\n\t\tif ((key_state & MyConst.Key.LEFT) == MyConst.Key.LEFT)\n\t\t\tif (x <= 0) {\n\t\t\t\tthis.pos.x = x + (int) (width * 0.25);\n\t\t\t\tthis.x = 0;\n\t\t\t} else {\n\t\t\t\tthis.pos.x -= 5;\n\t\t\t\tthis.x -= 5;\n\t\t\t}\n\t\tif ((key_state & MyConst.Key.RIGHT) == MyConst.Key.RIGHT)\n\t\t\tif (x >= MyConst.GamePan.GAMEPAN_W - MyImages.img_me.getWidth(null)) {\n\t\t\t\tx = MyConst.GamePan.GAMEPAN_W - MyImages.img_me.getWidth(null);\n\t\t\t\tthis.pos.x = x + (int) (width * 0.25);\n\t\t\t} else {\n\t\t\t\tthis.pos.x += 5;\n\t\t\t\tx += 5;\n\t\t\t}\n\t\tif (((key_state & MyConst.Key.UP) == MyConst.Key.UP) && !jump) {\n\t\t\tjump = true;\n\t\t\tSystem.out.println(jump);\n\t\t}\n\n\t\tif ((key_state & MyConst.Key.FIRE) == MyConst.Key.FIRE) {\n\t\t\tSystem.out.println(\"--Fire--\");\n\t\t\tbulletManager.make_bullet(x + width / 2, y);\n\t\t}\n\n\t\t// jump\n\t\tif (jump) {\n\t\t\tSystem.out.println(this.y);\n\t\t\tif (this.y >= jump_interval) {\n\t\t\t\tthis.y -= 5;\n\t\t\t\tthis.pos.y -= 5;\n\t\t\t} else {\n\t\t\t\tjump = false;\n\n\t\t\t}\n\t\t} else if (!jump && (this.y < MyConst.GamePan.GAMEPAN_H - height)) {\n\t\t\tthis.y += 5;\n\t\t\tthis.pos.y += 5;\n\t\t}\n\t\treturn false;\n\t}",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"public byte getState(){\n\t\t/*\n\t\tOFFLINE((byte)0),\n ONLINE((byte)1),\n SAVING((byte)2);\n\t\t */\n\t\t//getWorld().getcWorld().update(this);\n\t\treturn state;\n\t}",
"private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }",
"private int getMovementState (float dx, float dy) {\n\t\tif (dx == 0.0f && dy == 0.0f) {\n\t\t\treturn SCANNING;\n\t\t} else if (dx > 0) {\n\t\t\treturn (dy == 0) ? WALKING_RIGHT : WALKING_RIGHT_DIAGONAL;\n\t\t} else {\n\t\t\treturn (dy == 0) ? WALKING_LEFT : WALKING_LEFT_DIAGONAL;\n\t\t}\n\t}",
"public void jump(){\n if(onGround)\n y_velocity = -0.45f;\n }",
"public void jump(Boolean flag) {\n\t\tif (parent.onGround && jumpTicks == 0 && !(parent instanceof EntityFlyingPixelmon)) {\n\t\t\tif (parent instanceof EntityPixelmon)\n\t\t\t\tif (flag) {\n\t\t\t\t\tparent.motionY += 0.2; // makes mount jump higher. Do not\n\t\t\t\t\t\t\t\t\t\t\t// use big values!\n\t\t\t\t}\n\t\t\tjumpTicks = 10;\n\t\t}\n\t\tif (parent instanceof EntityFlyingPixelmon) {\n\t\t\tif (parent.onGround) {\n\t\t\t\tparent.motionY += 0.3;\n\t\t\t} else\n\t\t\t\tparent.motionY += 0.1;\n\t\t}\n\t}",
"public GameState getGameState() {\n return this.state;\n }",
"public void jump() {\n\t\t// if (isBlock_down()) {\n\t\t// setJumpTTL(getMaxJumpTTL());\n\t\t// setBlock_down(false);\n\t\t// }\n\t}",
"State getState();",
"State getState();",
"State getState();",
"State getState();",
"public GameObjectState getState() {\r\n\t\treturn state;\r\n\t}",
"Color playerOnMove() {\n return _playerOnMove;\n }",
"public void jump()\r\n\t{\t\r\n\t\t//que pasa si morimos:\r\n\t\tif (gameOver)\r\n\t\t{\t//si morirmos repintamos el pajaro\r\n\t\t\tif (Menu.jugador.equals(\"cide\") || Menu.jugador.equals(\"Cide\") || Menu.jugador.equals(\"CIDE\")) {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 75, 75);\r\n\t\t\t} else {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 50, 50);\r\n\t\t\t}\r\n\t\t\t//limiamos las columnas que se habian pintado antes\r\n\t\t\tcolumns.clear();\r\n\t\t\t//movimiento a cero\r\n\t\t\tyMotion = 0;\r\n\t\t\t//puntuacion a cero\r\n\t\t\tscore = 0;\r\n\t\t\t//creacion de las nuevas columnas\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\t//vivimos\r\n\t\t\tgameOver = false;\r\n\t\t}\r\n\r\n\t\t//ymotion es el salto del pajaro\r\n\t\tif (!started)\r\n\t\t{\r\n\t\t\tstarted = true;\r\n\t\t}\r\n\t\telse if (!gameOver)\r\n\t\t{\r\n\t\t\tif (yMotion > 0) {\r\n\t\t\t\tyMotion = 0;\r\n\t\t\t}\r\n\t\t\tyMotion -= 10;\r\n\t\t}\r\n\t}",
"public String jump(String s) {\n\t\tif(s.equals(\"JGT\")) {\n\t\t\treturn \"001\";\n\t\t} else if(s.equals(\"JEQ\")) {\n\t\t\treturn \"010\";\n\t\t} else if(s.equals(\"JGE\")) {\n\t\t\treturn \"011\";\n\t\t} else if(s.equals(\"JLT\")) {\n\t\t\treturn \"100\";\n\t\t} else if(s.equals(\"JNE\")) {\n\t\t\treturn \"101\";\n\t\t} else if(s.equals(\"JLE\")) {\n\t\t\treturn \"110\";\n\t\t} else if(s.equals(\"JMP\")) {\n\t\t\treturn \"111\";\n\t\t} else {\n\t\t\treturn \"000\";\n\t\t}\n\t}",
"public byte getState() {\n return myState;\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t//if the player has already pressed the jump and thus changing the status\n\t\t//so only when a player has not double jump before, and is now jumping, and also has\n\t\t//the power up present could this player double jump\n\t\tif(this.player.getDoubleJump() && this.player.getPowerUp() && this.player.getJump()){\n\t\t\tthis.player.doubleJump();\t\t\t\n\t\t\tthis.jumpSound.play();\n\t\t}\n\t\t//other wise, if the player is not on a gap, allow to jump\n\t\telse if(!(this.foreground.getIndex(this.player.getX()).getIsGap())){\n\t\t\tthis.player.jump();\n\t\t\tthis.jumpSound.play();\n\t\t}\n\t}",
"private void jump(){\n if(getYFromCamera() > -20 && getYFromCamera() < 20){\n getWorld().setCameraLocation(getGlobalX(),getGlobalY() + vSpeed);\n }\n vSpeed = vSpeed - jumpStrength;\n changeJumping(true);\n fall();\n }",
"@Override\n public BattleState getBattleState() {\n return state;\n }",
"void playerMove(State state);",
"public GameState getGameState() {\n return this.gameState;\n }",
"public final char getState() {\n\t\treturn _state;\n\t}",
"public int gameState() {\n \tboolean check = isCheck(turn);\n \t\n \t//change this code to be some sort of checkmate detection\n \tif(check) {\n \t\t//we need to check whether there is a legal move that puts the king out of check\n \t\t//we need to loop through all pieces of the same color as the turn and make all legal moves\n \t\t//then after each move, check whether the king is still in check\n \t\t\n \t\t//first generate a list of all pieces for the turn color\n \t\tArrayList<Piece> pieces = getPieces(turn);\n \t\t\n \t\tboolean freedom;\n \t\t\n \t\t//now for each piece, check whether moving that piece can get the king out of check\n \t\tfor(int i = 0; i < pieces.size(); i++) {\n \t\t\tfreedom = simulate(pieces.get(i));\n \t\t\tif(freedom) {\n \t \t\tupdateCheckMove(false);\n \t \t\tSystem.out.println(\"Check on \" + turn + \" King!\");\n \t\t\t\treturn 2; //if the king can move, then the game isn't over yet\n \t\t\t}\n \t\t}\n \t\t\n \t\t//the game is over if we reach this far, so we can assume checkmate\n \t\t//resignation logic will probably be specific to Display class\n \t\t\n \t\tupdateCheckMove(true);\n \t\t\n \t\tif(turn == PieceColor.White) return -1; //black win if white king in check and can't move\n \t\tif(turn == PieceColor.Black) return 1;\n \t}\n \t\n \t//if all of these fail, the game isn't over yet\n \treturn 2;\n }",
"abstract boolean performJump(long value);"
] | [
"0.70153505",
"0.6797767",
"0.67201656",
"0.6560546",
"0.65402377",
"0.6474318",
"0.64573246",
"0.64065784",
"0.63948596",
"0.63645977",
"0.63050014",
"0.6198078",
"0.6143",
"0.6142151",
"0.6098166",
"0.60653514",
"0.6038968",
"0.6032606",
"0.60296255",
"0.6020745",
"0.6014412",
"0.59485596",
"0.5945893",
"0.59185475",
"0.59069467",
"0.58465195",
"0.582101",
"0.5785496",
"0.578431",
"0.5768032",
"0.57611346",
"0.5756331",
"0.5744412",
"0.57277477",
"0.56987697",
"0.56920797",
"0.56896275",
"0.56801575",
"0.56514156",
"0.5649437",
"0.5645555",
"0.5640218",
"0.56266",
"0.56245506",
"0.5605617",
"0.5595758",
"0.5589908",
"0.558266",
"0.5581503",
"0.5581503",
"0.556807",
"0.555682",
"0.55533767",
"0.5532669",
"0.5504623",
"0.5498541",
"0.5498424",
"0.54910594",
"0.547698",
"0.5475774",
"0.5465049",
"0.544244",
"0.54352176",
"0.5433432",
"0.5418886",
"0.54183203",
"0.5414724",
"0.540782",
"0.54039365",
"0.53904855",
"0.5384269",
"0.5384269",
"0.5384269",
"0.5384269",
"0.5384269",
"0.5384269",
"0.5372414",
"0.5365153",
"0.53573424",
"0.5335739",
"0.5326561",
"0.5322473",
"0.5311725",
"0.5311555",
"0.5311555",
"0.5311555",
"0.5311555",
"0.5302249",
"0.5301111",
"0.529585",
"0.5295294",
"0.5263968",
"0.52418995",
"0.523533",
"0.52240646",
"0.522337",
"0.52157205",
"0.52137285",
"0.52089196",
"0.5201805"
] | 0.65699834 | 3 |
Sets the jump state of the player | public void setJumping(boolean jumping) { isJumping = jumping; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void jump() {\n jumped = true;\n teleport = true;\n waste = true;\n }",
"public void setJumpState(int n)\n{\n jumpState=n;\n}",
"public void actionPerformed(ActionEvent e)\n {\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }",
"public void jump(){\n if(isOnGround()){\n setDy(0.08f);\n setOnGround(false);\n }\n }",
"public void jump() {\n if (this.numJumps < 3) {\n if (this.state.equals(\"onLeftWall\")) {\n this.moveRight();\n this.setSpecialState(\"jumpFromWall\", 180);\n } else if (this.state.equals(\"onRightWall\")) {\n this.moveLeft();\n this.setSpecialState(\"jumpFromWall\", 180);\n }\n this.yVel = this.jumpVel;\n this.numJumps++;\n }\n\n\n }",
"@Override\n public void setCanJump(boolean b)\n {\n canJump = b;\n isJumping = !b;\n }",
"void jump() {\n if (myIsJumping == myNoJumpInt) {\n myIsJumping++;\n // switch the cowboy to use the jumping image\n // rather than the walking animation images:\n setFrameSequence(null);\n setFrame(0);\n }\n }",
"public void jump() {\n\t\tif(!dead) {\r\n\t\t\tplaying = true;\r\n\t\t\tvelocity = jumpVelocity;\r\n\t\t\tplaySound(\"jump1.wav\");\r\n\t\t}\r\n\t}",
"public void jumpPressed() {\n jumpingPressed = true;\n keys.get(keys.put(Keys.JUMP, true));\n }",
"public void setJumping(boolean isJumping) {\r\n\t\tthis.isJumping = isJumping;\r\n\t}",
"private void jump(){\n getField().pandaJumped(this);\n }",
"private void jump(){\n if(getYFromCamera() > -20 && getYFromCamera() < 20){\n getWorld().setCameraLocation(getGlobalX(),getGlobalY() + vSpeed);\n }\n vSpeed = vSpeed - jumpStrength;\n changeJumping(true);\n fall();\n }",
"public void jump(Boolean flag) {\n\t\tif (parent.onGround && jumpTicks == 0 && !(parent instanceof EntityFlyingPixelmon)) {\n\t\t\tif (parent instanceof EntityPixelmon)\n\t\t\t\tif (flag) {\n\t\t\t\t\tparent.motionY += 0.2; // makes mount jump higher. Do not\n\t\t\t\t\t\t\t\t\t\t\t// use big values!\n\t\t\t\t}\n\t\t\tjumpTicks = 10;\n\t\t}\n\t\tif (parent instanceof EntityFlyingPixelmon) {\n\t\t\tif (parent.onGround) {\n\t\t\t\tparent.motionY += 0.3;\n\t\t\t} else\n\t\t\t\tparent.motionY += 0.1;\n\t\t}\n\t}",
"private void jump() {\r\n\t\tvelocity = new Vector(velocity.getX(), 7.0);\r\n\t}",
"public void jump(){\n if(onGround)\n y_velocity = -0.45f;\n }",
"public void jump() {\n\n if (this.getPlanet() == null) {\n return;\n }\n\n float rot = this.getAngleBetween(this.getPlanet());\n\n this.jumpingTime = 0.5f;\n\n rot -= Math.PI / 2.0;\n\n Vector2 direction = new Vector2((float) Math.cos(rot), (float) Math.sin(rot)).nor();\n\n this.applyForceToCenter(direction.rotate(180).scl((float) (Math.pow(this.calculatePullForce(this.getPlanet()).len(), 4))), true);\n\n this.limitVelocity();\n\n this.removeFromPlanet();\n\n float time = this.state.getTime();\n\n this.setState(new FloatState(time + jumpBonusTime));\n\n }",
"private void jump() {\r\n\t\tjumping = true;\r\n\t\tjumpKeyPresses++;\r\n\t\tif (jumpKeyPresses < 12) {\r\n\t\t\tif (jumpKeyPresses == 1)\r\n\t\t\t\tdy = -0.02 * (1 / (0.3 + fatLevel));\r\n\t\t\tdy -= 0.001 * (1 / (0.3 + fatLevel));\r\n\t\t}\r\n\t}",
"public void moveJump() {\n\t\t// getSpeed().setY(-getClimbPertTick());\n\t\t// setJumpTTL(getJumpTTL() - 1);\n\n\t}",
"public void jump() {\n\t\t// if (isBlock_down()) {\n\t\t// setJumpTTL(getMaxJumpTTL());\n\t\t// setBlock_down(false);\n\t\t// }\n\t}",
"public void setJumpCount(int jumpCount) {this.jumpCount = jumpCount;}",
"private void jump() {\n\t\t\n\t\t// resets game\n\t\tif (gameOver) {\n\t\t\tbird = new Rectangle(WIDTH/2-10, HEIGHT/2-10, 20, 20);\n\t\t\tcolumns.clear();\n\t\t\tyMotion = 0;\n\t\t\tscore = 0;\n\t\t\t\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\t\n\t\t\tgameOver = false;\n\t\t}\n\t\t\n\t\t// starts game\n\t\tif (!started) {\n\t\t\tstarted = true;\n\t\t}\n\t\t\n\t\telse if (started && !gameOver) {\n\t\t\tif (yMotion > 0) {\n\t\t\t\tyMotion = 0;\n\t\t\t}\n\t\t\t\n\t\t\tyMotion -= 10;\n\t\t}\n\t\t\n\t}",
"public void jump() {\n endSoftwareAnimations();\n }",
"public void setJumpSpot(int spot)\n{\n jumpSpot = spot;\n}",
"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 JumpCommand(Player jump) {\r\n\t\tthis.jump = jump;\r\n\t}",
"public boolean jump () {\n\t\t// Velocity first (Symplectic Euler)\n\t\tdata._jumpVel = data._jumpVel - data._timeStep * data._gravity;\n\t\tdata._jumpPos = data._jumpPos + data._jumpVel * data._timeStep;\n\t\tif (data._jumpVel <= -10.5) {\n\t\t\tdata._timeStep = 0.02;\n\t\t\tdata._jumpPos = 0; \n\t\t\tdata._jumpVel = 10; \n\t\t\treturn false; \n\t\t}\n\t\t// Set position\n\t\tthis.setPosition( new Vec2d(this.getMainCharacter().getData().getPosition().x, - 70 * data._jumpPos + 400));\n\t\tthis.getMainCharacter().getData().setPosition(this.getPosition());\n\t\treturn true;\n\t}",
"public void setJumpCount(int count)\n{\n jumpCount = count;\n}",
"@Override\n\tprotected void onJump() {\n\t\tvelocity.setPolar(moveSpeed, GMath.random.nextInt(8) * GMath.QUARTER_PI);\n\n\t\t// Occasionally jump toward the player.\n\t\tif (GMath.random.nextInt(10) == 0) {\n\t\t\tsuper.onJump();\n\t\t\tvelocity.scale(1.7);\n\t\t\tzVelocity *= 1.3;\n\t\t}\n\t}",
"public void setKeyJump(final int key) {\n jumpKey = key;\n }",
"public void setJumpValue(int jumpValue) {\n this.jumpValue = jumpValue;\n }",
"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}",
"@Override\r\n\tpublic boolean Jump(Player arg0) {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean Jump(Player arg0) {\n\t\treturn false;\r\n\t}",
"void setGameOver() {\n myGameOver = true;\n myJump.userPauseThreads();\n }",
"public boolean isJumping() { return isJumping; }",
"public boolean isJumping(){\n if (jumpState == 2)\n return true;\n return false;\n\n}",
"@Override\n\tpublic void onJump(PlatformPlayer player) {\n\t\t\n\t}",
"public void jump()\r\n\t{\t\r\n\t\t//que pasa si morimos:\r\n\t\tif (gameOver)\r\n\t\t{\t//si morirmos repintamos el pajaro\r\n\t\t\tif (Menu.jugador.equals(\"cide\") || Menu.jugador.equals(\"Cide\") || Menu.jugador.equals(\"CIDE\")) {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 75, 75);\r\n\t\t\t} else {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 50, 50);\r\n\t\t\t}\r\n\t\t\t//limiamos las columnas que se habian pintado antes\r\n\t\t\tcolumns.clear();\r\n\t\t\t//movimiento a cero\r\n\t\t\tyMotion = 0;\r\n\t\t\t//puntuacion a cero\r\n\t\t\tscore = 0;\r\n\t\t\t//creacion de las nuevas columnas\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\t//vivimos\r\n\t\t\tgameOver = false;\r\n\t\t}\r\n\r\n\t\t//ymotion es el salto del pajaro\r\n\t\tif (!started)\r\n\t\t{\r\n\t\t\tstarted = true;\r\n\t\t}\r\n\t\telse if (!gameOver)\r\n\t\t{\r\n\t\t\tif (yMotion > 0) {\r\n\t\t\t\tyMotion = 0;\r\n\t\t\t}\r\n\t\t\tyMotion -= 10;\r\n\t\t}\r\n\t}",
"public void changeHasHighJump()\r\n\t{\r\n\t\thasHighJump = !hasHighJump;\r\n\t}",
"public void setState(Player player) {\n\t\tstate = player;\n\t\tstateChanged();\n\t}",
"@Override\n public void start() {\n final LivingEntity target = mob.getTarget();\n if( target == null )\n return;\n \n // Perform the jump\n mob.getLookControl().setLookAt( target, 180.0F, 0.0F );\n final Vector3d jumpXZ = new Vector3d( target.getX() - mob.getX(), 0.0, target.getZ() - mob.getZ() )\n .normalize().scale( Config.ELITE_AI.JUMP.jumpSpeedForward.get() ).add( mob.getDeltaMovement().scale( 0.2 ) );\n mob.setDeltaMovement( jumpXZ.x, Config.ELITE_AI.JUMP.jumpSpeedUpward.get(), jumpXZ.z );\n \n // Start the cooldown (this won't tick down until the entity has landed)\n cooldownTimer = Config.ELITE_AI.JUMP.cooldown.next( mob.getRandom() );\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t//if the player has already pressed the jump and thus changing the status\n\t\t//so only when a player has not double jump before, and is now jumping, and also has\n\t\t//the power up present could this player double jump\n\t\tif(this.player.getDoubleJump() && this.player.getPowerUp() && this.player.getJump()){\n\t\t\tthis.player.doubleJump();\t\t\t\n\t\t\tthis.jumpSound.play();\n\t\t}\n\t\t//other wise, if the player is not on a gap, allow to jump\n\t\telse if(!(this.foreground.getIndex(this.player.getX()).getIsGap())){\n\t\t\tthis.player.jump();\n\t\t\tthis.jumpSound.play();\n\t\t}\n\t}",
"public void setState(PlayerState state) {\n this.state = state;\n }",
"public void resetJumps() {\n this.numJumps = 0;\n this.lightRecovery = false;\n this.heavyRecovery = false;\n }",
"protected void setJustJumped(boolean just_jumped) {\n\t\tthis.just_jumped = just_jumped;\n\t}",
"@Override\n public void update(float delta) {\n\tif (player.getState() == PlayerState.JUMPING) {\n\t walkingStateTime = 0;\n\t jumpingStateTime += delta;\n\t} else if (player.getState() == PlayerState.WALKING) {\n\t jumpingStateTime = 0;\n\t walkingStateTime += delta;\n\t} else if (player.getState() == PlayerState.IDLE) {\n\t walkingStateTime = 0;\n\t jumpingStateTime = 0;\n\t}\n\t\n }",
"public Jump() {\n try {\n myCanvas = new JumpCanvas(this);\n myCanvas.addCommand(myExitCommand);\n myCanvas.addCommand(myMusicCommand);\n myCanvas.addCommand(myPauseCommand);\n myCanvas.setCommandListener(this);\n } catch (Exception e) {\n errorMsg(e);\n }\n }",
"@Override\n public boolean canJump()\n {\n return canJump;\n }",
"public void doublejump(){\r\n\t\t//jump a second time.\r\n\t}",
"public void setStateOfMovement(int movementState){stateOfMovement = movementState; }",
"public boolean isJumping() {\r\n\t\treturn this.isJumping;\r\n\t}",
"public void setPlayerState(boolean state)\n\t{\n\t\tthis.blnPlayerState = state;\n\t\t\n\t}",
"public void nextClockChange(int nextJump);",
"public void setToPlaceTowerState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Grass) {\n cells.set(i, CellState.ToPlaceTower);\n } else if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n }\n }\n }",
"private void continuousJump(Vector3 position, Move m) {\n if (m.moving)\n position.y += m.jumpForceMoving;\n\t\telse\n position.y += m.jumpForce;\n //Gdx.app.log(TAG, \"continuious jkumpj\");\n\n\t}",
"public void setPlayState(PlayerState state) { isPaused = !state.playing; }",
"public static void jump(Jumpable object){\n\n if (object.canJump()) {\n ///\n }\n\n }",
"public boolean isJumping(){\r\n\t\tif(jumping){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void setPlayerState(PlayerState playerState) {\n this.playerState = playerState;\n }",
"public boolean jumpMayBeChanged() {\n\t\treturn (subBlocks[1].jump != null || subBlocks[1].jumpMayBeChanged());\n\t}",
"public void jump(int address) {\n pc = nPC;\n nPC = address;\n }",
"public void handleJumping(){\r\n\r\n if ( !collide) {\r\n speedY += 1;\r\n if ((centerY + speedY >= 630 || collide )) {\r\n centerY = 630;\r\n speedY = 0;\r\n jumped = false;\r\n }\r\n }\r\n }",
"void jump() {\n myCowboy.jump();\n }",
"public void jump(int dyIn)\n\t{\n\t\ty = y - dY;\n\t}",
"@Override\n\tpublic void onStopJump(PlatformPlayer player) {\n\t\t\n\t}",
"boolean jump(int posx, int posy, int prevPiece) {\n\t\tbool = false;\n\t\txdiff = (posx - prevPosX) / 2; \n\t\tydiff = (posy - prevPosY) / 2;\n\t\tif ((xdiff < 2 || xdiff > -2 && ydiff < 2) && prevPiece == 1) {\n\t\t\tSystem.out.println(\"Norm jump 1 \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 1 && (pieceJumped == 2 || pieceJumped == 4))\n\t\t\t\tbool = true;\n\t\t\telse if (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else if ((xdiff < 2 || xdiff > -2 && ydiff < -2) && prevPiece == 2) {\n\t\t\tSystem.out.println(\"Norm jump 2 \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else if (prevPiece == 3 || prevPiece == 4 && (xdiff < 2 || xdiff > -2 && ydiff < 2 || ydiff > -2)) {\n\t\t\tSystem.out.println(\"King jump \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 1 && (pieceJumped == 2 || pieceJumped == 4)) {\n\t\t\t\tSystem.out.println(curPlayer + \" Player 1 jumping over \" + pieceJumped);\n\t\t\t\tbool = true;\n\t\t\t} else if (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3)){\n\t\t\t\tSystem.out.println(curPlayer + \" jumping over \" + pieceJumped);\n\t\t\t\tbool = true;\n\t\t\t} else \n\t\t\t\tbool = false;\n\t\t}\n\t\tjumping = bool;\n\t\treturn bool;\n\t}",
"public void walking(final Player p){\n timerListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n //test to see if the player is currently jumping\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }\n };\n //creates the timer for continous animation of walkListener\n walker = new Timer(getWalkSpeed(), timerListener);\n //starts timer for walk animation\n walker.start();\n ActionListener walkIncListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if (getWalkSpeed() > WALK_SPEED_MIN)\n {\n System.out.println(\"1\");\n walker.stop();\n incWalkSpeed(getWalkSpeedInc());\n walker = new Timer(getWalkSpeed(), timerListener);\n walker.start();\n }\n else\n {\n walkInc.stop();\n System.out.println(\"2\");\n }\n\n }\n };\n walkInc = new Timer(WALK_SPEED, walkIncListener);\n //starts timer for walk animation\n walker.start();\n ActionListener dead = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if(p.isAlive() == false){\n walker.stop();\n }\n }\n };\n Timer kill = new Timer(100, dead);\n kill.start();\n\n }",
"@Override\n\tpublic boolean move() {\n\n\t\tif ((key_state & MyConst.Key.LEFT) == MyConst.Key.LEFT)\n\t\t\tif (x <= 0) {\n\t\t\t\tthis.pos.x = x + (int) (width * 0.25);\n\t\t\t\tthis.x = 0;\n\t\t\t} else {\n\t\t\t\tthis.pos.x -= 5;\n\t\t\t\tthis.x -= 5;\n\t\t\t}\n\t\tif ((key_state & MyConst.Key.RIGHT) == MyConst.Key.RIGHT)\n\t\t\tif (x >= MyConst.GamePan.GAMEPAN_W - MyImages.img_me.getWidth(null)) {\n\t\t\t\tx = MyConst.GamePan.GAMEPAN_W - MyImages.img_me.getWidth(null);\n\t\t\t\tthis.pos.x = x + (int) (width * 0.25);\n\t\t\t} else {\n\t\t\t\tthis.pos.x += 5;\n\t\t\t\tx += 5;\n\t\t\t}\n\t\tif (((key_state & MyConst.Key.UP) == MyConst.Key.UP) && !jump) {\n\t\t\tjump = true;\n\t\t\tSystem.out.println(jump);\n\t\t}\n\n\t\tif ((key_state & MyConst.Key.FIRE) == MyConst.Key.FIRE) {\n\t\t\tSystem.out.println(\"--Fire--\");\n\t\t\tbulletManager.make_bullet(x + width / 2, y);\n\t\t}\n\n\t\t// jump\n\t\tif (jump) {\n\t\t\tSystem.out.println(this.y);\n\t\t\tif (this.y >= jump_interval) {\n\t\t\t\tthis.y -= 5;\n\t\t\t\tthis.pos.y -= 5;\n\t\t\t} else {\n\t\t\t\tjump = false;\n\n\t\t\t}\n\t\t} else if (!jump && (this.y < MyConst.GamePan.GAMEPAN_H - height)) {\n\t\t\tthis.y += 5;\n\t\t\tthis.pos.y += 5;\n\t\t}\n\t\treturn false;\n\t}",
"public void setState(GameState s) {\n this.state = s;\n }",
"public boolean canJump() {\n\t\treturn false;\n\t}",
"public int getJumpCount() {return jumpCount;}",
"public void setAlive(boolean state) {\n alive = state;\n setColor();\n }",
"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 act() \n {\n fall();\n if(Greenfoot.isKeyDown(\"space\") && isOnSolidGround())\n {\n jump();\n }\n move();\n }",
"abstract boolean performJump(long value);",
"public void jumpRun(int bars) {\n }",
"public boolean isWalking(){\n if (jumpState < 2)\n return true;\n else\n return false;\n}",
"@Override\n public void draw(SpriteBatch batch) {\n stateTime += Gdx.graphics.getDeltaTime();\n\n if (SinglePGameModel.getInstance().getPlayer().isWalking())\n sprite.setRegion(walkingAnimation.getKeyFrame(stateTime, true));\n else\n sprite.setRegion(jumpingAnimation);\n\n sprite.draw(batch);\n }",
"public void pauseGame(boolean state) {\r\n paused = state;\r\n }",
"public String getJumpKey() {\n return this.jumpKey;\n }",
"public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }",
"public void enterHatchingState() {\n\n\t}",
"public void setGearState(boolean state) {\n shifter.set(state);\n }",
"public void doubleJump() {\n\t\tmultipleJump = true;\n\t\tint pieceJumping = arr[prevPosX][prevPosY];\n\t\tLogic.arr[prevPosX][prevPosY] = 0;\n\t\tLogic.arr[prevPosX + (xdiff * 2)][prevPosY + (ydiff * 2)] = 0;\n\t\tLogic.arr[prevPosX + (xdiff * 3)][prevPosY + (ydiff * 3)] = 0;\n\t\tif (prevPosX + (xdiff * 4) == 7 || prevPosX + (xdiff * 4) == 0) {\n\t\t\tif (pieceJumping < 3) // If the piece is a pawn\n\t\t\t\tsetPieceJumpingToArr(pieceJumping + 2); // Make a king\n\t\t\telse\n\t\t\t\tsetPieceJumpingToArr(pieceJumping); // Set the king on row 0 or 7\n\t\t} else\n\t\t\tsetPieceJumpingToArr(pieceJumping); // Set the piece\n\t\tP2P.pieceMoveChanger();\n\t\tfor (int i = 0; i < 8; i++){\n\t\t\tSystem.out.println();\n\t\t\tfor (int j = 0; j < 8; j++)\n\t\t\t\tSystem.out.print(arr[i][j]);\n\t\t}\n\t}",
"public void pauseToggle() {\r\n if(gameState == 1) {\r\n gameState = 0;\r\n }\r\n else gameState = 1;\r\n }",
"public void setCellState(int newState) {\n this.myState = newState;\n }",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"void playerMove(State state);",
"public void setToGrassState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.ToPlaceTower) {\n cells.set(i, CellState.Grass);\n }\n }\n }",
"void setMoving(boolean isMoving);",
"void startClipJump();",
"protected void setCurrentState(boolean currentState) {\n this.currentState = currentState;\n }",
"protected abstract void setCell(int x, int y, boolean state);",
"@Test\n\tpublic void testJump() {\n\t\tActorWorld world = new ActorWorld();\n\t\tworld.add(new Location(5, 5), alice); // alice default direction is NORTH\n\t\talice.jump();\n\t\tassertEquals(new Location(3, 5), alice.getLocation());\n\t}",
"public static void setState(GameState state) {\r\n\t\tgameState = state;\r\n\t}",
"public synchronized void set() {\n this.currentState = EventState.UP;\n notify();\n }",
"public void jumpToCurrentState() {\n if (mRunningAnimator != null) {\n mRunningAnimator.end();\n }\n }",
"public boolean isLegOut()\n{\n if (jumpState == 1)\n return true;\n return false;\n}",
"public void endJump() {\n\t\tsetVy(Math.min(0, getVy()));\n\t}",
"public abstract String jump();"
] | [
"0.78441197",
"0.7709302",
"0.75153774",
"0.7187586",
"0.708002",
"0.7010652",
"0.69975275",
"0.69068277",
"0.6894087",
"0.68048644",
"0.67962",
"0.676354",
"0.67060953",
"0.66938686",
"0.66670185",
"0.6622797",
"0.66224164",
"0.6598354",
"0.6588374",
"0.65539473",
"0.6522696",
"0.65181005",
"0.6447841",
"0.6328375",
"0.6326324",
"0.6324802",
"0.63057077",
"0.63055104",
"0.6287718",
"0.6278226",
"0.62745243",
"0.62215155",
"0.62215155",
"0.62111795",
"0.6191838",
"0.6177447",
"0.61704904",
"0.6152518",
"0.61224884",
"0.5974497",
"0.59611934",
"0.59059936",
"0.5898527",
"0.587633",
"0.5873002",
"0.58533454",
"0.582531",
"0.5777328",
"0.57760674",
"0.5731283",
"0.5704532",
"0.5680686",
"0.5657951",
"0.56458956",
"0.5645533",
"0.5635232",
"0.56061846",
"0.5595276",
"0.5588245",
"0.55287564",
"0.5524443",
"0.5508114",
"0.5506358",
"0.55057746",
"0.54915875",
"0.5425268",
"0.5420389",
"0.53811556",
"0.5366598",
"0.5355157",
"0.53508157",
"0.5343675",
"0.5340842",
"0.5333139",
"0.53277975",
"0.5322734",
"0.532261",
"0.5322455",
"0.5305367",
"0.5296696",
"0.52944446",
"0.5285614",
"0.5277118",
"0.5275771",
"0.52663",
"0.5259122",
"0.52575713",
"0.5253508",
"0.5251061",
"0.5248232",
"0.52475464",
"0.52446073",
"0.52336025",
"0.52158594",
"0.521307",
"0.51965564",
"0.51949537",
"0.5192928",
"0.5192628",
"0.5190507"
] | 0.7386672 | 3 |
Returns the fall state of the player | public boolean isFalling() { return isFalling; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}",
"public PlayerState getPlayerState() {\r\n return playerState;\r\n }",
"public Image getFall(int player, int fallNum, boolean ep)\n\t{\n\t\tif (player==1)\n\t\t{\n\t\t\tif (fallNum==1) return fall1;\n\t\t\telse if (fallNum==2) return fall2;\n\t\t\telse return fall3;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif (fallNum==1) return fall1P2;\n\t\t\telse if (fallNum==2) return fall2P2;\n\t\t\telse return fall3P2;\n\t\t}\n\t}",
"public Player getState() {\n\t\treturn state;\n\t}",
"PlayerState getPlayerState() {\n return playerState;\n }",
"public PlayerState getPlayerState() {\n return this.playerState;\n }",
"boolean canFall();",
"public void fall() {\n\t\t// getSpeed().setY(-stats.getGRAVITY());\n\t\tsetBlock_up(false);\n\t}",
"public GameState getGameState();",
"public boolean getFalling() {return falling;}",
"public PlayerState getEnemy()\n {\n if(this.turnOfPlayer == playerBlack)\n {\n return playerWhite;\n }\n return playerBlack;\n }",
"public GameState getGameState() {\n return this.state;\n }",
"private void checkFall(){\n if(onGround()){\n vSpeed = 0;\n }\n else{\n if(getGlobalY() > 590)\n {\n death();\n changeCanMove(false);\n }\n else{\n fall();\n }\n }\n }",
"public GameState GetState(){\n\t\treturn this.state;\n\t}",
"public void fall() {\n\t\tthis.notJumping();\n\t\tthis.setForcedToStop(false);\n\t\tthis.setOnTheEdge(false);\n\t\tthis.setCornerToClimb(null);\n\t\tthis.setCornerToClimbDown(null);\n\t\tthis.setFallDistance(0);\n\t\tthis.setFallingSpeed(0);\n\t\t\n\t\t// lands variables resets\n\t\tthis.setCanLongLand(false);\n\t\tthis.setLongLand(false);\n\t\t\n\t\tthis.setCurrentAnimation(\"falling_\" + orientation, FRAME_DURATION);\n\t\tint fallOffset = 20;\t\t\n//\t\tif (orientation.equals(\"left\")) {\n//\t\t\tthis.move(-fallOffset/2, 0);\n//\t\t\tSystem.out.println(\"Fall offset left applied\");\n//\t\t}\n//\t\telse if (orientation.equals(\"right\")) {\n//\t\t\tthis.move(fallOffset*2/3, 0);\n//\t\t\tSystem.out.println(\"Fall offset right applied\");\n//\t\t}\n\t\tthis.falling = true;\n\t}",
"public GameState getGameState() {\n return this.gameState;\n }",
"@Override\n\tpublic void onFall(PlatformPlayer player) {\n\t\t\n\t}",
"interface GameState {\n String WAITING_FOR_SECOND_PLAYER = \"WAITING_FOR_SECOND_PLAYER\";\n String TURN_HARE = \"TURN_HARE\";\n String TURN_HOUND = \"TURN_HOUND\";\n String WIN_HARE_BY_ESCAPE = \"WIN_HARE_BY_ESCAPE\";\n String WIN_HARE_BY_STALLING = \"WIN_HARE_BY_STALLING\";\n String WIN_HOUND = \"WIN_HOUND\";\n }",
"@Override\n public GameState getGameState() {\n return this.gameState;\n }",
"public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }",
"@java.lang.Override public int getCombatStateValue() {\n return combatState_;\n }",
"int getAttackStatStage();",
"@Override\n public BattleState getBattleState() {\n return state;\n }",
"@Override\n\tprotected void fall(float par1) {\n\t\t\n\t}",
"public GameState won() {\n if ( (board[0][0] != TileState.BLANK) && (board[0][0] == board[0][1]) && (board[0][0] == board[0][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[1][0] != TileState.BLANK) && (board[1][0] == board[1][1]) && (board[1][0] == board[1][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[2][0] != TileState.BLANK) && (board[2][0] == board[2][1]) && (board[2][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][1]) && (board[0][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ( (board[0][2] != TileState.BLANK) && (board[0][2] == board[1][1]) && (board[0][2] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][0]) && (board[0][0] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][1] != TileState.BLANK) && (board[0][1] == board[1][1]) && (board[0][1] == board[2][1])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][2] != TileState.BLANK) && (board[0][2] == board[1][2]) && (board[0][2] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if (movesPlayed == 9)\n return GameState.DRAW;\n return GameState.IN_PROGRESS;\n }",
"public boolean getIsBattleOver()\r\n {\r\n return isBattleOver;\r\n }",
"public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}",
"public GameState getState() {\n\t\treturn state;\n\t}",
"public SimplePoolGameState evaluateShot(SimplePoolMove shot) {\r\n\t\tapplyShot(shot);\r\n\t\tSimplePoolGameState gameState = TurnOver;\r\n\t\tif (shot.somethingPotted())\r\n\t\t\tgameState = table().isBallsLeftOnTable() ? TurnContinued : GameOver;\r\n\t\treturn shot.isFoul() ? gameState.forFoul() : gameState;\r\n\t}",
"@java.lang.Override public int getCombatStateValue() {\n return combatState_;\n }",
"public GameState getGameState(){\n return this.gameState;\n }",
"@PlayerState\n public abstract int getPlayerState();",
"int getAttackRoll();",
"public Gamestate myTurn() {\n\t\treturn this.iGoWhen;\n\t}",
"GameState getGameState() {\n return gameState;\n }",
"private void fall()\n {\n\t\tif (handler.getWorld().AsteroidCount < 200)\n\t\t{\n \tdeltaX = 0;\n \tdeltaY = speed;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (x < player.getX())\n\t\t\t{\n\t\t\t\tdeltaX = speed;\n\t\t\t\tdeltaY = speed;\n\t\t\t}\n\t\t\tif (x > player.getX()+player.getWidth())\n\t\t\t{\n\t\t\t\tdeltaX = -speed;\n\t\t\t\tdeltaY = speed;\n\t\t\t}\n\t\t}\n }",
"public String getFallOutPercent() {\r\n\t\treturn fallOutPercent;\r\n\t}",
"public int getStateOfMovement(){ return stateOfMovement; }",
"public int status() \n {\n \tif (stonesCount(7,12) != 0 && stonesCount(0,5) != 0)\n \t\treturn GAME_NOT_OVER;\n \telse if (stonesCount(7,13) < stonesCount(0,6))\n \t\treturn GAME_OVER_WIN;\n \telse if (stonesCount(7,13) == stonesCount(0,6))\n \t\treturn GAME_OVER_TIE;\n \telse\n \t\treturn GAME_OVER_LOSE;\n }",
"protected void fall(float par1) {\r\n\t}",
"@java.lang.Override public POGOProtos.Rpc.CombatProto.CombatState getCombatState() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.CombatProto.CombatState result = POGOProtos.Rpc.CombatProto.CombatState.valueOf(combatState_);\n return result == null ? POGOProtos.Rpc.CombatProto.CombatState.UNRECOGNIZED : result;\n }",
"private void fallDetection(double acceleration){\n \n switch (state){\n case INIT_STATE:\n // Acceleration considered as free fall if it has value lower than 0.42G ~ 0.63G\n if (acceleration < 0.63){\n freeFallTime = Instant.now().toEpochMilli();\n Log.println(Log.DEBUG, TAG, \"FREE_FALL_DETECTED: \" +freeFallTime);\n sendBroadcast(new Intent().setAction(FALLING_STATE));\n state = FallingState.FREE_FALL_DETECTION_STATE;\n }\n break;\n\n case FREE_FALL_DETECTION_STATE:\n // Detect ground impact: > 2.02g ~ 3.10g\n if (acceleration > 2.02){\n long impactTime = Instant.now().toEpochMilli();\n long duration = impactTime - freeFallTime;\n // Measure duration between free fall incident and impact\n if (duration > 250 && duration < 800){\n Log.println(Log.DEBUG, TAG, \"IMPACT_DETECTED - Falling Duration: \"\n +duration +\" ms\");\n sendBroadcast(new Intent().setAction(LAYING_STATE));\n state = FallingState.IMPACT_DETECTION_STATE;\n }\n else{\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n sendBroadcast(new Intent().setAction(STANDING_STATE));\n state = FallingState.INIT_STATE;\n }\n }\n else if (Instant.now().isAfter(Instant.ofEpochMilli(freeFallTime).plusMillis(800))){\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n sendBroadcast(new Intent().setAction(STANDING_STATE));\n state = FallingState.INIT_STATE;\n }\n break;\n\n case IMPACT_DETECTION_STATE:\n // Detect Immobility (about 1G): If stand still for over 2.5 seconds\n if (Instant.now().isAfter(Instant.ofEpochMilli(freeFallTime).plusMillis(1800)) &&\n acceleration >= 0.90 && acceleration <= 1.10){\n // Detection of motion interrupts the count\n long duration = Instant.now().toEpochMilli() - freeFallTime;\n sendBroadcast(new Intent().setAction(LAYING_STATE));\n // 1800ms since free fall detection and 2200ms standing still\n if (duration > 4000){\n Log.println(Log.DEBUG, TAG, \"IMMOBILITY_DETECTED\");\n state = FallingState.IMMOBILITY_DETECTION_STATE;\n }\n }\n // If motion is detected go to Initial State\n else if(Instant.now().isAfter(Instant.ofEpochMilli(freeFallTime).plusMillis(1800))){\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n sendBroadcast(new Intent().setAction(STANDING_STATE));\n state = FallingState.INIT_STATE;\n }\n break;\n\n case IMMOBILITY_DETECTION_STATE:\n // Trigger Countdown Alarm\n sendBroadcast(new Intent().setAction(FALL_RECEIVER));\n Log.println(Log.DEBUG, TAG, \"Alarm Triggered!!!\");\n state = FallingState.INIT_STATE;\n break;\n }\n }",
"public int getTextureState() {\n return MathHelper.clamp(MAX_TEXTURE_STATE * aggro / MAX_AGGRO, 0, MAX_TEXTURE_STATE);\n }",
"public int gameState() {\n \tboolean check = isCheck(turn);\n \t\n \t//change this code to be some sort of checkmate detection\n \tif(check) {\n \t\t//we need to check whether there is a legal move that puts the king out of check\n \t\t//we need to loop through all pieces of the same color as the turn and make all legal moves\n \t\t//then after each move, check whether the king is still in check\n \t\t\n \t\t//first generate a list of all pieces for the turn color\n \t\tArrayList<Piece> pieces = getPieces(turn);\n \t\t\n \t\tboolean freedom;\n \t\t\n \t\t//now for each piece, check whether moving that piece can get the king out of check\n \t\tfor(int i = 0; i < pieces.size(); i++) {\n \t\t\tfreedom = simulate(pieces.get(i));\n \t\t\tif(freedom) {\n \t \t\tupdateCheckMove(false);\n \t \t\tSystem.out.println(\"Check on \" + turn + \" King!\");\n \t\t\t\treturn 2; //if the king can move, then the game isn't over yet\n \t\t\t}\n \t\t}\n \t\t\n \t\t//the game is over if we reach this far, so we can assume checkmate\n \t\t//resignation logic will probably be specific to Display class\n \t\t\n \t\tupdateCheckMove(true);\n \t\t\n \t\tif(turn == PieceColor.White) return -1; //black win if white king in check and can't move\n \t\tif(turn == PieceColor.Black) return 1;\n \t}\n \t\n \t//if all of these fail, the game isn't over yet\n \treturn 2;\n }",
"PowerState getState();",
"public int getGameStatus() {\n int status = BattleshipGame.GAME_ILLEGAL_EXIT;\n try {\n status = dis.readInt();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return status;\n }",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatState getCombatState() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.CombatProto.CombatState result = POGOProtos.Rpc.CombatProto.CombatState.valueOf(combatState_);\n return result == null ? POGOProtos.Rpc.CombatProto.CombatState.UNRECOGNIZED : result;\n }",
"protected void updateFallState(double var1, boolean var3)\n {}",
"@Override\n protected String checkIfGameOver() {\n if(state.isGameOver() == -1) {\n return \"Blue team wins\";\n } else if(state.isGameOver() == 1) {\n return \"Red team wins\";\n } else {\n return null;\n }\n }",
"public AeBpelState getState();",
"public TurnState step() {\n ReadOnlyHistory history = board.viewHistory();\n \n if (!isGameOver) {\n Player next = nextPlayer();\n Move move = null;\n \n try {\n final long startTime = System.currentTimeMillis();\n move = next.play(history);\n next.addTime(System.currentTimeMillis() - startTime);\n \n if (next.getTime() >= timeLimit || !board.isValid(move)){\n isGameOver = true;\n }\n else {\n board.set(move);\n }\n }\n catch (IllegalArgumentException ex) {\n System.err.println(\"Player \" + next.getName() + \": \" + ex.getMessage());\n isGameOver = true;\n }\n catch (ArrayIndexOutOfBoundsException ex) {\n System.err.println(\"Player \" + next.getName() + \": \" + ex.getMessage());\n isGameOver = true;\n }\n \n return new TurnState(next, move, isGameOver);\n }\n else {\n return new TurnState(null, null, true);\n }\n }",
"boolean GameOver() {\n\t\treturn player.isDead();\n\t}",
"boolean isPlayerTurn();",
"public boolean isTurned(){\n\treturn IS_TURNED;\n }",
"@Override\n public Player getWinningPlayer() {\n return wonGame ? currentPlayer : null;\n }",
"public boolean getGearState() {\n return shifter.get();\n }",
"public void fall() {\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\ty[i]++;\n\t}",
"private void fall(){\n \n if(getYFromCamera() > -20 && getYFromCamera() < 20){\n getWorld().setCameraLocation(getGlobalX(),getGlobalY() + vSpeed);\n }\n World w = getWorld();\n Level currentLevel = (Level)(w);\n currentLevel.checkHeight(getGlobalY());\n setGlobalLocation(getGlobalX(), getGlobalY() + vSpeed);\n vSpeed = vSpeed + acceleration;\n changeJumping(true);\n }",
"private State getState() throws InterruptedException{\n if (shouldBank){\n if (canWork()) {\n if (inventory.isFull()){\n if (bankArea.contains(myPlayer())){\n return State.BANK;\n }else{\n return State.TRAVEL_TO;\n }\n }else{\n if (chopArea.contains(myPlayer())){\n return State.CHOP;\n }else{\n return State.TRAVEL_BACK;\n }\n }\n }\n\n }else{\n if (canWork()) {\n if (inventory.isFull()){\n return State.DROP;\n }else{\n return State.CHOP;\n }\n }\n\n }\n\n return State.WAIT;\n\n }",
"public boolean canFall() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tif (y[i] + 1 == 20)\n\t\t\t\treturn false;\n\t\t\tif (Tetris.game.grid[x[i]][y[i] + 1] != 0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static Player whoLostGame() {\r\n\t\tint lowest = Main.loseScoreNumb;\r\n\t\tPlayer loser = null;\r\n\t\t\r\n\t\t\r\n\t\t//Three handed play.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\tloser = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\tloser = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\tloser = Main.playerThree;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Four handed play with no teams.\r\n\t\tif (Main.isFourHandedSingle){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player1Score);\r\n\t\t\t\tloser = Main.playerOne;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player2Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player2Score);\r\n\t\t\t\tloser = Main.playerTwo;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player3Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player3Score);\r\n\t\t\t\tloser = Main.playerThree;\r\n\t\t\t}\r\n\t\t\tif (Utils.stringToInt(Main.player4Score) <= lowest) {\r\n\t\t\t\tlowest = Utils.stringToInt(Main.player4Score);\r\n\t\t\t\tloser = Main.playerFour;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn loser;\r\n\t}",
"public boolean getStand()\r\n\t{\r\n\treturn stand;\r\n\t}",
"public boolean passPlayer() {\n if (this.state == 2) {\n if (this.playerBet != this.serverBet && this.money_server != 0 && this.money_player !=0) {\n return false;\n }\n // player moves and is dealer\n if (this.dealer == 1) {\n this.betRound += 1;\n if(this.betRound == 1){\n this.state = 3;\n }\n else{\n this.state = 4;\n }\n return true;\n } else {\n this.state = 1;\n return true;\n }\n } else {\n // server moves and is dealer\n if (this.dealer == 0) {\n this.betRound += 1;\n if(this.betRound == 1){\n this.state = 3;\n }\n else{\n this.state = 4;\n }\n return true;\n } else {\n this.state = 2;\n return true;\n }\n }\n }",
"public static double calcFallDam(L2Character cha, int fallHeight)\n\t{\n\t\tif (!Config.ENABLE_FALLING_DAMAGE || fallHeight < 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\treturn cha.calcStat(Stats.FALL, fallHeight * cha.getMaxHp() / 1000, null, null);\n\t}",
"public PlayerColor turn() {\n return board.getTurn();\n }",
"public GameStatus getGameStatus() {\n return gameStatus;\n }",
"public static Gamestatus getGameStatus() {\r\n\t\treturn STATUS;\r\n\t}",
"public boolean hitOrStand(){\r\n\t\treturn hitOrStand;\r\n\t}",
"public int getWhoseTurn() {\n if (gameStatus == null || gameStatus.getActivePlayer() == null) return -1;\n if (gameStatus.getActivePlayer().equals(gameStatus.getPlayerOne())) return 1;\n if (gameStatus.getActivePlayer().equals(gameStatus.getPlayerTwo())) return 2;\n return -2;\n }",
"private int evaluateState() {\r\n\r\n\t\t// add up score\r\n\t\t//\r\n\t\tint scoreWhite = 0;\r\n\t\tint scoreBlack = 0;\r\n\t\tfor (Piece piece : this.chessGame.getPieces()) {\r\n\t\t\tif(piece.getColor() == Piece.COLOR_BLACK){\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else if( piece.getColor() == Piece.COLOR_WHITE){\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else{\r\n\t\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\t\"unknown piece color found: \"+piece.getColor());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// return evaluation result depending on who's turn it is\r\n\t\tint gameState = this.chessGame.getGameState();\r\n\t\t\r\n\t\tif( gameState == ChessGame.GAME_STATE_BLACK){\r\n\t\t\treturn scoreBlack - scoreWhite;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_WHITE){\r\n\t\t\treturn scoreWhite - scoreBlack;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_END_WHITE_WON\r\n\t\t\t\t|| gameState == ChessGame.GAME_STATE_END_BLACK_WON){\r\n\t\t\treturn Integer.MIN_VALUE + 1;\r\n\t\t\r\n\t\t}else{\r\n\t\t\tthrow new IllegalStateException(\"unknown game state: \"+gameState);\r\n\t\t}\r\n\t}",
"protected void fall(float var1)\n {}",
"public BlackjackClientState get_state() {\n ArrayList<String> cards = new ArrayList<>();\n ArrayList<String> cards2 = new ArrayList<>();\n for (Card c : player_cards)\n cards.add(c.toString());\n\n // Calculate the current state of the game\n int player_hand = get_hand_val(player_cards);\n if (player_hand > 21)\n player_busted = true;\n else if (player_hand == 21)\n player_stand = true;\n\n String player_count = Integer.toString(player_hand);\n\n if (player_stand || player_busted) {\n house_deal();\n for (Card c : house_cards)\n cards2.add(c.toString());\n int house_hand = get_hand_val(house_cards);\n String house_count = Integer.toString(house_hand);\n if (house_hand > 21)\n return new BlackjackClientState(id, true, player_busted ? \"Draw\" : \"You Win!\", player_count,\n house_count, cards, cards2);\n else if (house_hand > player_hand)\n return new BlackjackClientState(id, true, \"You lose\", player_count, house_count, cards, cards2);\n else if (!player_busted)\n return new BlackjackClientState(id, true, house_hand == player_hand ? \"Draw\" : \"You Win!\", player_count,\n house_count, cards, cards2);\n else\n return new BlackjackClientState(id, true, \"You lose\", player_count, house_count, cards, cards2);\n }\n\n return new BlackjackClientState(id, false, null, player_count, \"?\", cards, cards2);\n }",
"public String getGameStatus() {\n return gameStatus;\n }",
"public int computeGameSituation() {\n\t\treturn computeGameSituation(checkerboard);\n\t}",
"GameState checkState(String guid, String username) throws GameStateException;",
"public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }",
"public int fight() {\r\n\t\treturn -this.randomObject.nextInt(50);\r\n\t}",
"public boolean getVictory()\n\t{\n\t\treturn blnPlayerVictory;\n\t\t\n\t}",
"boolean gameOver() {\n return _gameOver;\n }",
"public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }",
"public static boolean getIsPlayersTurn()\r\n {\r\n return isPlayersTurn;\r\n }",
"public State getState(){\n\t\treturn State.TUT_ISLAND;\n\t}",
"public int getGameSituation() {\n\t\treturn gameSituation;\n\t}",
"public SoundEvent getFallSound() {\n/* 103 */ return this.fallSound;\n/* */ }",
"public int getPlayerTurn() {\r\n\t\treturn this.playerTurn;\r\n\t}",
"public int getPlayState(){\r\n\t\tif(player.getStatus() == BasicPlayer.PLAYING){\r\n\t\t\treturn songsToPlay.isEmpty() ? selectedPreset + 10 : selectedPreset;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"int getDefenseStatStage();",
"void playerMove(State state);",
"private int getMovementState (float dx, float dy) {\n\t\tif (dx == 0.0f && dy == 0.0f) {\n\t\t\treturn SCANNING;\n\t\t} else if (dx > 0) {\n\t\t\treturn (dy == 0) ? WALKING_RIGHT : WALKING_RIGHT_DIAGONAL;\n\t\t} else {\n\t\t\treturn (dy == 0) ? WALKING_LEFT : WALKING_LEFT_DIAGONAL;\n\t\t}\n\t}",
"boolean isGameSpedUp();",
"private int gameState() {\n\t\t\n\t\tint gameNotOver = 0;\n\t\tint gameOverWinnerX = 1;\n\t\tint gameOverWinnerO = 2;\n\t\tint gameOverTie = 3;\n\t\t\n\t\t\n\t\t\n\t\t//Win Vertically \n\t\t// 0 3 6 , 1 4 7 , 2 5 8\n\t\t\t\t\n\t\t//Win Horizontally\n\t\t//0 1 2 , 3 4 5 , 6 7 8 \n\t\t\t\t\n\t\t//Win Diagonally\n\t\t// 0 4 8 , 2 4 6\n\t\t\t\t\n\t\t//Assuming it's an equal grid\n\t\t\t\t\n\t\tMark winningMark = null;\n\t\t\t\t\n\t\tboolean hasFoundWinner = false;\n\t\t\t\t\n\t\tint row = 0;\n\t\tint column = 0;\n\t\t\t\t\n\t\t//Horizontal Winner Test\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\tcolumn ++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcolumn = 0;\n\t\t\trow++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t// Vertical Winner Test\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\n\t\twhile (!hasFoundWinner && column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\trow = 0;\n\t\t\tcolumn++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Winner Test \"\\\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Test \"/\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = COLUMN_COUNT - 1;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn--;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If there are no moves left, and there is no winner, game ends inn a tie \n\t\t\n\t\tboolean foundNoMove = false;\n\t\tfor (int i = 0; i < movesArray.length; i++) {\n\t\t\tif (movesArray[i] == NO_MOVE) {\n\t\t\t\tfoundNoMove = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!foundNoMove && !hasFoundWinner) {\n\t\t\treturn gameOverTie;\n\t\t}\n\t\t\n\t\t// If there is no winner and there are still moves left, game is not over\n\t\t\n\t\treturn gameNotOver;\n\t\t\n\t}",
"public PlaybackStateCompat getPlaybackState() {\n }",
"int getTurn();",
"@Override\n public int getWinner()\n {\n return currentPlayer;\n }",
"public boolean isPlayerTurn() {\n return playerTurn;\n }"
] | [
"0.6291176",
"0.6264602",
"0.62386775",
"0.6224191",
"0.6196817",
"0.6172906",
"0.61598366",
"0.6095763",
"0.60487986",
"0.5988376",
"0.5885873",
"0.57935685",
"0.5792012",
"0.5765029",
"0.5735945",
"0.5714439",
"0.57045746",
"0.5678986",
"0.5637723",
"0.5637632",
"0.56160414",
"0.56011385",
"0.55916893",
"0.55883527",
"0.5587842",
"0.55795604",
"0.55684966",
"0.55678594",
"0.5564076",
"0.55619204",
"0.55595595",
"0.5549861",
"0.5545023",
"0.55151165",
"0.549249",
"0.5451585",
"0.5425077",
"0.54087585",
"0.5395734",
"0.53781074",
"0.53565323",
"0.5353832",
"0.5326364",
"0.5317727",
"0.5312305",
"0.52991855",
"0.5298771",
"0.5298771",
"0.5298771",
"0.5298771",
"0.5298771",
"0.5298771",
"0.52952015",
"0.5269424",
"0.5262349",
"0.5248831",
"0.52347004",
"0.523177",
"0.5215061",
"0.52107304",
"0.5203358",
"0.5200318",
"0.51956683",
"0.5193586",
"0.5192817",
"0.51859784",
"0.5180878",
"0.5173169",
"0.51633185",
"0.51629704",
"0.5159903",
"0.51567984",
"0.5154892",
"0.5153435",
"0.51480305",
"0.51464874",
"0.5140421",
"0.51400626",
"0.51293874",
"0.51222056",
"0.5117416",
"0.5108016",
"0.5105938",
"0.51009816",
"0.5098354",
"0.5095876",
"0.50954854",
"0.509472",
"0.50933",
"0.5093093",
"0.5088567",
"0.50825095",
"0.50774497",
"0.50755256",
"0.5075487",
"0.5070136",
"0.5068016",
"0.5067073",
"0.5066889",
"0.50616777",
"0.5059157"
] | 0.0 | -1 |
Sets the fall state of the player | public void setFalling(boolean falling) { isFalling = falling; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void fall() {\n\t\t// getSpeed().setY(-stats.getGRAVITY());\n\t\tsetBlock_up(false);\n\t}",
"public void fall() {\n\t\tthis.notJumping();\n\t\tthis.setForcedToStop(false);\n\t\tthis.setOnTheEdge(false);\n\t\tthis.setCornerToClimb(null);\n\t\tthis.setCornerToClimbDown(null);\n\t\tthis.setFallDistance(0);\n\t\tthis.setFallingSpeed(0);\n\t\t\n\t\t// lands variables resets\n\t\tthis.setCanLongLand(false);\n\t\tthis.setLongLand(false);\n\t\t\n\t\tthis.setCurrentAnimation(\"falling_\" + orientation, FRAME_DURATION);\n\t\tint fallOffset = 20;\t\t\n//\t\tif (orientation.equals(\"left\")) {\n//\t\t\tthis.move(-fallOffset/2, 0);\n//\t\t\tSystem.out.println(\"Fall offset left applied\");\n//\t\t}\n//\t\telse if (orientation.equals(\"right\")) {\n//\t\t\tthis.move(fallOffset*2/3, 0);\n//\t\t\tSystem.out.println(\"Fall offset right applied\");\n//\t\t}\n\t\tthis.falling = true;\n\t}",
"private void fall(){\n \n if(getYFromCamera() > -20 && getYFromCamera() < 20){\n getWorld().setCameraLocation(getGlobalX(),getGlobalY() + vSpeed);\n }\n World w = getWorld();\n Level currentLevel = (Level)(w);\n currentLevel.checkHeight(getGlobalY());\n setGlobalLocation(getGlobalX(), getGlobalY() + vSpeed);\n vSpeed = vSpeed + acceleration;\n changeJumping(true);\n }",
"protected void fall(float par1) {\r\n\t}",
"@Override\n\tprotected void fall(float par1) {\n\t\t\n\t}",
"public void fall()\n {\n powerUp.setBounds(powerUp.x,powerUp.y + 2, 65, 29);\n text.setBounds(powerUp.x,powerUp.y + 2, 65, 29);\n }",
"private void fall()\n {\n\t\tif (handler.getWorld().AsteroidCount < 200)\n\t\t{\n \tdeltaX = 0;\n \tdeltaY = speed;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (x < player.getX())\n\t\t\t{\n\t\t\t\tdeltaX = speed;\n\t\t\t\tdeltaY = speed;\n\t\t\t}\n\t\t\tif (x > player.getX()+player.getWidth())\n\t\t\t{\n\t\t\t\tdeltaX = -speed;\n\t\t\t\tdeltaY = speed;\n\t\t\t}\n\t\t}\n }",
"public void fall(){\n int vSpeed=30;\r\n if(canMove(0,vSpeed)==true){\r\n setLocation(getX(), getY()+vSpeed) ;\r\n Greenfoot.playSound(\"fall.wav\"); //(Volkovsound,2017)\r\n \r\n }\r\n }",
"private void setStandingAnim()\n {\n if(facing.equals(Direction.RIGHT))\n {\n currentAnim = rightStand;\n }\n else if(facing.equals(Direction.LEFT))\n {\n currentAnim = leftStand; \n }\n else \n \tthrow new IllegalStateException(\n \"standing dir neither left or right\");\n }",
"protected void updateFallState(double var1, boolean var3)\n {}",
"public void setState(Player player) {\n\t\tstate = player;\n\t\tstateChanged();\n\t}",
"private void checkFall(){\n if(onGround()){\n vSpeed = 0;\n }\n else{\n if(getGlobalY() > 590)\n {\n death();\n changeCanMove(false);\n }\n else{\n fall();\n }\n }\n }",
"protected void fall(float var1)\n {}",
"public void fall() {\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\ty[i]++;\n\t}",
"@Override\n\tpublic void onFall(PlatformPlayer player) {\n\t\t\n\t}",
"public void setFrame() {\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"setFrame\");\r\n\t\t\r\n\t\tif (state != GameState.STOPPED) {\r\n\t\t\ttry {\r\n\t\t\t\t// Wait for event\r\n\t\t\t\tif (state == GameState.PAUSED\r\n\t\t\t\t\t|| state == GameState.WAITING_FRAME) {\r\n\t\t\t\t\tsynchronized (this) {\r\n\t\t\t\t\t\twait();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Wait between two frames\r\n\t\t\t\telse if (speed < CowSimulator.UNLIMITED_SPEED) {\r\n\t\t\t\t\tThread.sleep(period);\r\n\t\t\t\t}\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tlogger.error(e.getMessage(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Game stopped during turn\r\n\t\tif (state == GameState.STOPPED) {\r\n\t\t\t// End game\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}",
"public void startFalling() {\n\t\tfalling = true;\n\t\tsetSpeedY(FALL_SPEED);\n\t}",
"public void setPlayerState(boolean state)\n\t{\n\t\tthis.blnPlayerState = state;\n\t\t\n\t}",
"public void setState(PlayerState state) {\n this.state = state;\n }",
"public void setPlayerState(PlayerState playerState) {\n this.playerState = playerState;\n }",
"public void setPlayState(PlayerState state) { isPaused = !state.playing; }",
"public void act() \n {\n fall();\n }",
"public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }",
"private void setTurn() {\n if (turn == black) {\n turn = white;\n } else {\n turn = black;\n }\n }",
"public void setPlaying() {\n\t\tstate = State.INGAME;\n\t}",
"void setGameOver() {\n myGameOver = true;\n myJump.userPauseThreads();\n }",
"public void changePlayerTurn()\n {\n if (player_turn == RED)\n player_turn = BLACK;\n else\n player_turn = RED;\n }",
"public void setToGrassState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.ToPlaceTower) {\n cells.set(i, CellState.Grass);\n }\n }\n }",
"void setPlayerTurn() throws RemoteException;",
"public void setToPlaceTowerState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Grass) {\n cells.set(i, CellState.ToPlaceTower);\n } else if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n }\n }\n }",
"public void setIsTurn()\n\t{\n\t\tthis.isTurn = true;\n\t}",
"public void setTurned(){\n\tIS_TURNED = true;\n\tvimage = turnedVimImage;\n }",
"public void changeTurnOfPlayer(PlayerState player)\n {\n if(player.getColorOfPlayer() == Color.BLACK)\n {\n this.turnOfPlayer = playerWhite;\n }\n else\n {\n this.turnOfPlayer = playerBlack;\n }\n }",
"@Override\n public void setGameState(GameState gameState) {\n this.gameState = gameState;\n }",
"public void setGameState(GameState gs){\n this.gameState = gs;\n }",
"public final void turnOver() {\r\n\t\tif (inPlay() == player1())\r\n\t\t\tsetInPlay(player2());\r\n\t\telse if (inPlay() == player2())\r\n\t\t\tsetInPlay(player1());\r\n\t\telse\r\n\t\t\tthrow new IllegalStateException(\"Can`t swap players for game! \"\r\n\t\t\t\t\t+ this);\r\n\t}",
"public void setGameDraw() {\n this.gameStarted = false; \n this.winner = 0; \n this.isDraw = true; \n }",
"@Override\n\tpublic void fall(float distance, float damageMultiplier) {\n\t\t// ignore fall damage if the entity can fly\n\t\tif (!canFly()) {\n\t\t\tsuper.fall(distance, damageMultiplier);\n\t\t}\n\t}",
"public void stand()\r\n\t{\r\n\t\tstand = true;\r\n\t}",
"public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}",
"boolean canFall();",
"public static void setState(GameState state) {\r\n\t\tgameState = state;\r\n\t}",
"private void fallDetection(double acceleration){\n \n switch (state){\n case INIT_STATE:\n // Acceleration considered as free fall if it has value lower than 0.42G ~ 0.63G\n if (acceleration < 0.63){\n freeFallTime = Instant.now().toEpochMilli();\n Log.println(Log.DEBUG, TAG, \"FREE_FALL_DETECTED: \" +freeFallTime);\n sendBroadcast(new Intent().setAction(FALLING_STATE));\n state = FallingState.FREE_FALL_DETECTION_STATE;\n }\n break;\n\n case FREE_FALL_DETECTION_STATE:\n // Detect ground impact: > 2.02g ~ 3.10g\n if (acceleration > 2.02){\n long impactTime = Instant.now().toEpochMilli();\n long duration = impactTime - freeFallTime;\n // Measure duration between free fall incident and impact\n if (duration > 250 && duration < 800){\n Log.println(Log.DEBUG, TAG, \"IMPACT_DETECTED - Falling Duration: \"\n +duration +\" ms\");\n sendBroadcast(new Intent().setAction(LAYING_STATE));\n state = FallingState.IMPACT_DETECTION_STATE;\n }\n else{\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n sendBroadcast(new Intent().setAction(STANDING_STATE));\n state = FallingState.INIT_STATE;\n }\n }\n else if (Instant.now().isAfter(Instant.ofEpochMilli(freeFallTime).plusMillis(800))){\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n sendBroadcast(new Intent().setAction(STANDING_STATE));\n state = FallingState.INIT_STATE;\n }\n break;\n\n case IMPACT_DETECTION_STATE:\n // Detect Immobility (about 1G): If stand still for over 2.5 seconds\n if (Instant.now().isAfter(Instant.ofEpochMilli(freeFallTime).plusMillis(1800)) &&\n acceleration >= 0.90 && acceleration <= 1.10){\n // Detection of motion interrupts the count\n long duration = Instant.now().toEpochMilli() - freeFallTime;\n sendBroadcast(new Intent().setAction(LAYING_STATE));\n // 1800ms since free fall detection and 2200ms standing still\n if (duration > 4000){\n Log.println(Log.DEBUG, TAG, \"IMMOBILITY_DETECTED\");\n state = FallingState.IMMOBILITY_DETECTION_STATE;\n }\n }\n // If motion is detected go to Initial State\n else if(Instant.now().isAfter(Instant.ofEpochMilli(freeFallTime).plusMillis(1800))){\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n sendBroadcast(new Intent().setAction(STANDING_STATE));\n state = FallingState.INIT_STATE;\n }\n break;\n\n case IMMOBILITY_DETECTION_STATE:\n // Trigger Countdown Alarm\n sendBroadcast(new Intent().setAction(FALL_RECEIVER));\n Log.println(Log.DEBUG, TAG, \"Alarm Triggered!!!\");\n state = FallingState.INIT_STATE;\n break;\n }\n }",
"public void setTurning(java.lang.Boolean value);",
"@Override\n public void setFacing(Direction dir)\n {\n facing = dir;\n if(!userHoldingLeftXOrRight)\n {\n setStandingAnim();\n }\n }",
"public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }",
"@Override\n public void hardMode() {\n super.setHP(1800);\n super.getFrontAttack().setBaseDamage(37.5);\n super.getRightAttack().setBaseDamage(37.5);\n super.getBackAttack().setBaseDamage(37.5);\n super.getLeftAttack().setBaseDamage(37.5);\n }",
"public void setGearState(boolean state) {\n shifter.set(state);\n }",
"public void setState(GameState s) {\n this.state = s;\n }",
"public void setSpriting(boolean b)\n\t{\n\t\tm_isSpriting = b;\n\t}",
"void setNightModeState(boolean b);",
"public void turnLeft ()\n\t{\n\t\t//changeFallSpeed (-1);\n\t\tturnInt = -1;\n\t}",
"private void setGameStatus() {\n this.gameStatus = false;\n }",
"@Override\n public void tick() { mob.fallDistance = 0.0F; }",
"public void setInGame() {\n this.inGame = true;\n }",
"public void setBattleState(BattleState newState) {\n requireNonNull(newState);\n this.state = newState;\n }",
"public void set(GameState state){\n states.pop();\n states.push(state);\n }",
"public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }",
"public GameMode(int s)\n {\n bird3.y+=15;\n bird3.goUp = true;\n \n state = s;\n sprite = 0; \n }",
"public void gameOver(boolean won){\r\n\t\tif(won){\r\n\t\t\tgameState = \"Won\";\r\n\t\t}else{\r\n\t\t\tgameState = \"Lost\";\r\n\t\t}\r\n\t\tb1.setVisible(true);\r\n\t\tb2.setText(\"Play Again\");\r\n\t\tb2.setVisible(true);\r\n\t}",
"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 }",
"void setMoving(boolean isMoving);",
"protected void setAutoFallRate(long autoFallRate) {\r\n\t\tthis.autoFallRate = autoFallRate;\r\n\t}",
"public void setFallDistance ( float distance ) {\n\t\texecute ( handle -> handle.setFallDistance ( distance ) );\n\t}",
"public void land() {\n Game currentGame = this.getGame();\n this.setHasBeenVisited(true);\n currentGame.setMode( Game.Mode.GAME_WON);\n\n }",
"public void setToDefualts(){\n\t\tchangeInPlayerHealth = 0;\n\t\tchangeInPlayerScore = 0;\n\t\tchangInBatteryCharge = 0;\n\t\tpuaseForAnimation = false;\n\t}",
"public void die() {\n\t\tthis.hp = 0;\n\t\tthis.currentState = PlayerState.DIED;\n\t\tthis.sword = null;\n\t\tthis.setCurrentAnimation(\"dieing_\" + orientation, FRAME_DURATION);\n\t}",
"public void setPlayer(boolean isWhiteTurn) {\n\t\tif (isWhiteTurn == true) setGraphic(new ImageView(whitePiece));\n\t\tif (isWhiteTurn == false) setGraphic(new ImageView(blackPiece));\n\t\tisActiveImageOn = false;\n\t}",
"public void setRolled(boolean rolled) {\n\t\tthis.rolled = rolled;\n\t\trepaint();\n\t}",
"public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }",
"public void setState(int state) {\n\t\tif (state == CHASE)\n\t\t\tthis.state = CHASE;\n\t\telse if (state == RUN) \n\t\t\tthis.state = RUN;\n\t}",
"@Override\n\tpublic void setPlayer(Player player) {\n\n\t}",
"public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }",
"void setTurn(int turn);",
"public void setPlayer(Sprite player) {\n\t\tthis.player = player;\n\t}",
"public void setPlayer(int play)\n {\n this.player=play;\n }",
"public synchronized void set() {\n this.currentState = EventState.UP;\n notify();\n }",
"public void setReached(boolean reached);",
"public void setPlayerTurn(boolean playerTurn) {\n this.playerTurn = playerTurn;\n }",
"public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public void changeTurn() {\n\t\t\n\t\tif(currentTurn == white) {\n\t\t\t\n\t\t\tcurrentTurn = black;\n\t\t}\n\t\telse if(currentTurn == black){\n\t\t\t\n\t\t\tcurrentTurn = white;\n\t\t}\n\t}",
"@Override\n public void setCanJump(boolean b)\n {\n canJump = b;\n isJumping = !b;\n }",
"@Override\r\n\tpublic void setHealth(int strike) {\n\t\t\r\n\t}",
"private void setState(WFDState s) {\n Log.d(TAG, \"Moving from \" + sState + \" --> \" + s);\n sState = s;\n }",
"public void move() {\n\t\tthis.hero.setPF(1);\n\t\tthis.hero.setState(this.hero.getMoved());\n\t}",
"public void setFlying(boolean flying) {\n\t\tL.trace(\"setFlying({})\", flying);\n\t\tdataManager.set(DATA_FLYING, flying);\n\t}",
"public void setPlaybackState(PlaybackStateCompat param1) {\n }",
"public void enableFlyingMode()\n\t{\n\t\tthis.player.useFlyingMode = true;\n\t\tif(this.player.healthIn < 100)\n\t\t{\n\t\t\tthis.player.healthIn = 100;\n\t\t}\n\t}",
"public void play() {\n field.draw();\n userTurn();\n if(! field.isFull()) {\n computerTurn();\n }\n }",
"public void actionPerformed(ActionEvent e)\n {\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }",
"private void setGameState(GAMESTATE gameState) {\r\n\t\tlog.info(\"GID \" + this.GID + \" GAME STATE has changed to \" + gameState );\r\n\t\tthis.gameState = gameState;\r\n\t\t\r\n\t}",
"public void setJumpState(int n)\n{\n jumpState=n;\n}",
"private void setWhitePlayer(Player player) {\r\n\t\tthis.whitePlayer = player;\r\n\t}",
"public void reborn() {\r\n if ( playerState != null ) // We have to clear ropes connected to this player first (but not at the first time)!\r\n for ( int playerIndex = 0; playerIndex< players.length; playerIndex++ )\r\n if ( playerIndex != ownIndex && players[ playerIndex ] != null ) {\r\n final PlayerState playerState = players[ playerIndex ].playerState;\r\n if ( playerState.rope != null && playerState.rope.hasEndPoint && playerState.rope.endPointMovingObject == this.playerState )\r\n playerState.rope = null;\r\n }\r\n // Then we regenerate the state of player.\r\n final PlayerState newPlayerState = new PlayerState( WORM_MASS, WORM_SHAPE_RESISTANCE_RATE, WORM_CAPACITY );\r\n if ( playerState!= null ) {\r\n newPlayerState.wormColorIndex = playerState.wormColorIndex;\r\n newPlayerState.name = playerState.name;\r\n newPlayerState.killCounter = playerState.killCounter;\r\n newPlayerState.deathCounter = playerState.deathCounter;\r\n }\r\n playerState = newPlayerState;\r\n for ( int weaponIndex = 0; weaponIndex < weapons.length; weaponIndex++ )\r\n weapons[ weaponIndex ].reloadNow();\r\n try {\r\n selectWeapon( 0 );\r\n }\r\n catch ( RemoteException re ) {\r\n Logging.logError( re );\r\n }\r\n generateRandomPosition();\r\n informationsForDrawing.playerStates[ ownIndex ] = playerState;\r\n }",
"public void setCurrentTurn(Player player) {\r\n\t\tthis.currentTurn = player;\r\n\t}",
"public void tick() {\r\n \t if (hasFalling()){\r\n if (!moveIfNoConflict(falling.moveDown(), falling))\r\n \t stopFallingBlock();\r\n \t }\r\n }",
"public void setFishing(boolean b)\n\t{\n\t\tm_isFishing = b;\n\t\tif(b == true)\n\t\t\tlastFishingTime = System.currentTimeMillis();\n\t\tif(m_map != null)\n\t\t{\n\t\t\t/* TODO: Tell clients to update this char to reflect whether player is fishing or not. */\n\t\t}\n\t}",
"private void myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}",
"public void damaged() {\n this.damageState = DamageState.DAMAGED;\n }"
] | [
"0.7207397",
"0.7202812",
"0.64876384",
"0.64284915",
"0.64160156",
"0.640627",
"0.63818026",
"0.6266404",
"0.6053146",
"0.6042203",
"0.6006367",
"0.5978971",
"0.5967471",
"0.59636664",
"0.58964187",
"0.5873364",
"0.58459795",
"0.5844038",
"0.5842338",
"0.57010883",
"0.56865495",
"0.5682213",
"0.5662938",
"0.56611526",
"0.56393176",
"0.5593758",
"0.5584103",
"0.5577705",
"0.5547529",
"0.54833424",
"0.54828197",
"0.5458079",
"0.5457391",
"0.54394543",
"0.5409288",
"0.5401264",
"0.53978264",
"0.5385549",
"0.5368485",
"0.5361399",
"0.53450483",
"0.5331756",
"0.53294474",
"0.5319066",
"0.5317121",
"0.53052795",
"0.5297832",
"0.5277155",
"0.52695256",
"0.5268775",
"0.52650005",
"0.52618515",
"0.52562654",
"0.52491766",
"0.524603",
"0.52334946",
"0.52153116",
"0.5202073",
"0.51900053",
"0.51895386",
"0.51882607",
"0.5187222",
"0.5178425",
"0.51701283",
"0.5166234",
"0.5156074",
"0.5154212",
"0.5137408",
"0.51371104",
"0.5132038",
"0.5130638",
"0.5129501",
"0.51292855",
"0.51290524",
"0.5127221",
"0.5126737",
"0.5123882",
"0.51172227",
"0.5115625",
"0.5113531",
"0.51130426",
"0.5112712",
"0.51010746",
"0.5099715",
"0.50978",
"0.509699",
"0.50968397",
"0.5093558",
"0.5092898",
"0.50864565",
"0.50851256",
"0.50793153",
"0.5075078",
"0.50721794",
"0.50689024",
"0.50674444",
"0.5058247",
"0.5053746",
"0.50533634",
"0.50459516"
] | 0.6430655 | 3 |
Returns the initial y coordinate of the player before jumping | public short getInitial_y() {
return initial_y;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getPlayerYPos() {\r\n return jumper.getYposition();\r\n }",
"public int jump() {\n if (Ylocation > 475) {\n Ylocation -= Ydir;\n }\n\n return Ylocation;\n }",
"public int getY(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(1)/ AvesAblazeHardware.mmPerInch);\n\t}",
"public static int getStartYCoordinate(){\n\t\tint y = getThymioStartField_Y();\n\t\tif(y == 0){\n \t\t\n \t}else{\n \t\ty *= FIELD_HEIGHT;\n \t}\n\t\treturn y;\n\t}",
"double getStartY();",
"double getPositionY();",
"double getPositionY();",
"double getPositionY();",
"void setPlayerYRelative(int y) {\n }",
"double getYPosition();",
"private int getY() {\n\t\treturn 0;\r\n\t}",
"public Point getXyLocation() {\n return playerxy;\n }",
"@Override\n\tpublic float getY() {\n\t\treturn lilyPosY;\n\t}",
"public int getY() {\n synchronized (this.yLock) {\n return (int) this.movementComposer.getYPosition();\n }\n }",
"public float getY()\n {\n return getBounds().top + positionAnchor.y;\n }",
"public int getSpawnY()\n {\n return spawnY;\n }",
"public final int getY()\n\t{\n\t\treturn pos.y;\n\t}",
"public int getY() {\n\t\t\tint lastRobot = (state[2 * k] + k - 1) % k;\n\t\t\treturn state[lastRobot + k];\n\t\t}",
"@Override\n\tpublic int getY() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int getY() {\n\t\treturn 0;\n\t}",
"public int getSpawnY() {\n\t\treturn spawnY;\n\t}",
"public int yChange(GameState state) {\n return state.getTankLocY() - tankYStart;\n }",
"public int getY() { return loc.y; }",
"@Override\n\tpublic int getPosY() {\n\t\treturn Y_LAND;\n\t}",
"public int getCurrentY() {\n return currentY;\n }",
"public int getLocationY() {\r\n\t\treturn y;\r\n\t}",
"Coordinate getMinY();",
"@Override\n\tpublic int getY() {\n\t\treturn logicY;\n\t}",
"public int getY() {\n\t\treturn 0;\n\t}",
"@Model\n\tprotected double advanceAy() {\n\t\t\n\t\tList<List<List<Object>>> collisions = getCollisions();\n\t\tif ((!noObjectMovementBlocking(collisions.get(3).get(0)) || collisions.get(3).get(1).contains(Feature.ground)\n\t\t\t\t|| (int) getY() <= 0) && !getJustJumped()) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn -10;\n\t\t}\n\t}",
"public int getY(){ return yPosition; }",
"@Override\r\n public int getAbsoluteY()\r\n {\r\n try\r\n {\r\n return pageSwitcher.getAbsoluteY();\r\n }\r\n catch(NullPointerException e)\r\n {\r\n return 0;\r\n }\r\n }",
"private double getStartY() {\n\t\treturn Math.min(y1, y2);\n\t}",
"public float setYMax(){\n\t\tif (game.getDifficulty() == 0)\n\t\t\treturn 72;\n\t\telse if (game.getDifficulty() == 1)\n\t\t\treturn 108;\n\t\telse\n\t\t\treturn 144;\n\t}",
"public int getY() {\n return pos_y;\n }",
"@Override\n public int getMinTileY() {\n return convertYToTileY(getMinY());\n }",
"public Vector deflectY() {\n\t\treturn new Vector(deltaX, -deltaY);\n\t}",
"int getY() {\n return yPos;\n }",
"public int getY()\r\n {\r\n return yLoc;\r\n }",
"public double getStartY()\n {\n return startycoord; \n }",
"double getMapPositionY();",
"int getY();",
"int getY();",
"int getY();",
"int getY();",
"int getY();",
"public int get_Y_Coordinate()\n {\n return currentBallY;\n }",
"public float getY() {\n return pos.y;\n }",
"public int getY() {return y;}",
"public float getRelY() {\n return y + (getReferenceY()-Controller.getMap().getChunkCoords(0)[1]) * Chunk.getGameDepth();\n }",
"private double yPos(double yMetres){\r\n\t\treturn -yMetres*14+canvas.getHeight();\r\n\t}",
"public int getY(){\n return this.position[1];\n }",
"public int getY() {\n return (int) yPos;\n }",
"public int getLocationY( )\n\t{\n\t\treturn locationY;\n\t}",
"public static int getOrigY() {\n return 5;\n }",
"@Test\n\tpublic final void nextPositionUpTest() {\n\t\tplayer.setUp(true);\n\t\tplayer.getNextYPosition();\n\t\tassertTrue(player.isJumping());\n\t}",
"public int getPos_y(){\n\t\treturn pos_y;\n\t}",
"public int getY() { return y; }",
"public int getY() { return y; }",
"public int getY() { return y;}",
"public int getY() { return y;}",
"public int getInitY(){\r\n\t\treturn initY;\r\n\t}",
"public double getStartY() {\n\treturn v1.getY();\n }",
"public float getY(){\n return hitBox.top;\n }",
"public double getyOffset() {\n\n return currentYOffset + yOffset;\n }",
"public double getPositionY() {\n\t\treturn this.tilePositionY;\n\t}",
"public int getY()\r\n {\r\n return myY;\r\n }",
"public double getNewYPosition() {\n return newPosY;\n }",
"public static double getOrigY() {\n return 0.0;\n }",
"public static double getOrigY() {\n return 0.0;\n }",
"public static double getOrigY() {\n return 0.0;\n }",
"public static double getOrigY() {\n return 0.0;\n }",
"public static double getOrigY() {\n return 0.0;\n }",
"int getYPos() {\n if (new Random().nextBoolean()) {\n return CollectTheFruit.height - 35;\n } \n else {\n return CollectTheFruit.height - 200;\n }\n }",
"@Override\n public int getMinY() {\n return this.minY;\n }",
"public Integer getYOffset() {\n\t\tdouble frameHeight = this.pixy.getFrameHeight();\n\t\tdouble blockY = this.getY();\n\n\t\treturn (int) (frameHeight / 2 + blockY);\n\t}",
"public int getY() {\n return positionY;\n }",
"public double getYPosition()\n\t{\n\t\treturn yPosition;\n\t}",
"public int getMovementY() {\r\n return movementY;\r\n }",
"public int getYPosition() {\n\t\treturn this.position.y;\n\t}",
"public final float getPositionY() {\r\n\t\treturn getState(false).getPositionY();\r\n\t}",
"@Override\r\n\tpublic int getY() {\n\t\treturn (int)y;\r\n\t}",
"public int getY() {\n return (int) this.center.getY();\n }",
"public int getYPos();",
"long getY();",
"public double getMaxY() { return getY() + getHeight(); }",
"public int getY() {\n\treturn baseYCoord;\n}",
"@Override\n\tpublic float getY() {\n\t\treturn currnet().getY();\n\t}",
"double getEndY();",
"public double getY() {\n return position.getY();\n }",
"public int getY() {\n return posY;\n }",
"public int setObjYCoord() {\n\t\tint objY = ThreadLocalRandom.current().nextInt(1, getRoomLength() - 1);\r\n\t\treturn objY;\r\n\t}",
"public double getUserFriendlyYPos(){\n return myGrid.getHeight()/ HALF-yPos;\n }",
"public final int getY()\n{\n\treturn _y;\n}",
"public int getCurrentAbilityTargetY() {\n return currentAbilityTargetY;\n }",
"public static int getEndYCoordinate(){\n\tint y = getThymioEndField_Y(); \n\t\t\n\t\tif(y == 0){\n\t\t\n \t}else{\n \t y *= FIELD_HEIGHT;\n \t}\n\t\treturn y;\n\t}",
"public int getY()\n\t{\n\t\treturn mY;\n\t}",
"public int getMinY() {\n return scroller.getMinY();\n }",
"public int getY()\r\n\t{\r\n\t\treturn y;\r\n\t}",
"public double getYOffset()\n {\n return -0.45D;\n }"
] | [
"0.7722281",
"0.75346714",
"0.6879033",
"0.6759988",
"0.67086947",
"0.6699062",
"0.6699062",
"0.6699062",
"0.66833377",
"0.6646508",
"0.6587263",
"0.65187764",
"0.65078104",
"0.6502836",
"0.64986986",
"0.648866",
"0.64882547",
"0.64753425",
"0.64631367",
"0.64631367",
"0.6461146",
"0.64584917",
"0.6434678",
"0.64335257",
"0.6430865",
"0.64129996",
"0.6409101",
"0.639148",
"0.6380051",
"0.6366914",
"0.63552785",
"0.63463885",
"0.63375247",
"0.6334104",
"0.63333255",
"0.63276285",
"0.63227415",
"0.6314476",
"0.6309649",
"0.63088596",
"0.63045305",
"0.6304438",
"0.6304438",
"0.6304438",
"0.6304438",
"0.6304438",
"0.62995934",
"0.62983954",
"0.62970614",
"0.62938476",
"0.62875146",
"0.62831813",
"0.6279322",
"0.6275583",
"0.6272974",
"0.62688553",
"0.62634444",
"0.62600696",
"0.62600696",
"0.6258103",
"0.6258103",
"0.6257888",
"0.6255429",
"0.6242962",
"0.62336135",
"0.62320536",
"0.62238836",
"0.6223038",
"0.6222851",
"0.6222851",
"0.6222851",
"0.6222851",
"0.6222851",
"0.6218241",
"0.6214296",
"0.6211421",
"0.6211141",
"0.62054014",
"0.62048715",
"0.62001944",
"0.61953163",
"0.6191839",
"0.61912477",
"0.61912096",
"0.61909354",
"0.6188867",
"0.6185111",
"0.6177054",
"0.61726624",
"0.61689216",
"0.61680406",
"0.6166383",
"0.6160942",
"0.6158508",
"0.6154233",
"0.61526144",
"0.61522985",
"0.61436343",
"0.6136025",
"0.61351085"
] | 0.65316254 | 11 |
Sets the initial y coordinate of the player before jumping | public void setInitial_y(short initial_y) {
this.initial_y = initial_y;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setPlayerYRelative(int y) {\n }",
"public void resetY() {this.startY = 11.3f;}",
"public void move() {\r\n if (y > HEIGHT)\r\n y = initialY;\r\n y = y + speed;\r\n }",
"public void setY(int value)\n\t{\n\t\tgetWorldPosition().setY(value);\n\t}",
"public void setY(int y){ yPosition = y; }",
"public void jump(){\n if(onGround)\n y_velocity = -0.45f;\n }",
"void setY(int y) {\n position = position.setY(y);\n }",
"@Override\n\tpublic void setY(int y) {\n\t\tyPos = y;\n\t}",
"public void setSpawnY(int y)\n {\n spawnY = y;\n }",
"private void jump(){\n if(getYFromCamera() > -20 && getYFromCamera() < 20){\n getWorld().setCameraLocation(getGlobalX(),getGlobalY() + vSpeed);\n }\n vSpeed = vSpeed - jumpStrength;\n changeJumping(true);\n fall();\n }",
"public void endJump() {\n\t\tsetVy(Math.min(0, getVy()));\n\t}",
"public void moveJump() {\n\t\t// getSpeed().setY(-getClimbPertTick());\n\t\t// setJumpTTL(getJumpTTL() - 1);\n\n\t}",
"public void setY(int y){\n\t\tthis.y_location = y;\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 setYPosition(double y)\n\t{\n\t\tthis.yPosition = y;\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}",
"void setY(int newY) {\n this.yPos = newY;\n }",
"public void moveY() {\n\t\tsetY( getY() + getVy() );\n\t}",
"public void setY(int y) { loc.y = y; }",
"public int jump() {\n if (Ylocation > 475) {\n Ylocation -= Ydir;\n }\n\n return Ylocation;\n }",
"public float setYMax(){\n\t\tif (game.getDifficulty() == 0)\n\t\t\treturn 72;\n\t\telse if (game.getDifficulty() == 1)\n\t\t\treturn 108;\n\t\telse\n\t\t\treturn 144;\n\t}",
"public void setStartY(double y)\n {\n startycoord=y; \n }",
"public void setY(int y) {\n collider.setLocation((int) collider.getX(), y);\n }",
"public void setY(int y){\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"@Override\r\n\tpublic void setPositionY(int y) {\n\t\tif (!(y >= 0))\r\n\t\t\tthrow new PreConditionError(\"Error PreCondition: y >= 0\");\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\tsuper.setPositionY(y);\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\t// post: getPositionY() == y\r\n\t\tif (!(getPositionY() == y))\r\n\t\t\tthrow new PostConditionError(\"Error PostCondition: getPositionY() == y\");\r\n\t}",
"public void setPositionY(float y) {\n\t\tthis.position.set(this.position.x, y, 0);\n\t}",
"public void setY(int y ){\n if(y>0){\n this.y=y;\n }\n \n }",
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"public void setY(int theY)\r\n {\r\n y = theY;\r\n }",
"public double getPlayerYPos() {\r\n return jumper.getYposition();\r\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"@Override\n\tpublic void setY(int y) {\n\t\t\n\t}",
"public void setY(int y) {\n this.y = y;\r\n }",
"public void setFrameY(double aY) { double y = _y + aY - getFrameY(); setY(y); }",
"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 setY(int y)\n {\n this.y = y;\n }",
"public void setY(float y){\n hitBox.offsetTo(hitBox.left,y);\n //this.y=y;\n }",
"public void setSpawnY(int spawnY) \n\t{\n\t\tthis.spawnY = spawnY;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(final int y) {\n\n this.y = y;\n }",
"@Test\n\tpublic final void nextPositionUpTest() {\n\t\tplayer.setUp(true);\n\t\tplayer.getNextYPosition();\n\t\tassertTrue(player.isJumping());\n\t}",
"protected void setYWithinBounds(double y) {\n\t\tif (getWorld() != null && (y < 0 || y >= getWorld().getWorldHeight()))\n\t\t\t\tterminate();\n\t\tsetY(Math.max(y, 0));\n\t}",
"@Override\n\tpublic void setY(int y) {\n\n\t}",
"public void setY(int y)\n\t{\n\t\tthis.y = y;\t\t\t\t\t\t\t\t\t\t\t\t\t// Update point's y-coordinate \n\t}",
"public void jump(){\n if(isOnGround()){\n setDy(0.08f);\n setOnGround(false);\n }\n }",
"public void setY( int y ) {\n\t\t//not checking if y is valid because that depends on the coordinate system\n\t\tthis.y = y;\n\t}",
"public void setY(int yPos){\t\t\n\t\ty = new Integer(yPos);\n\t}",
"public void setY(int value) {\n this.y = value;\n }",
"public void follow() {\n\n\t\t// moves y position\n\t\tif (centerY < StartingClass.MIDDLE_Y - 100) {\n\t\t\tcenterY += MOVEMENT_SPEED;\n\t\t} else {\n\t\t\tisMovingY = false;\n\t\t}\n\t}",
"public void setEndY(double y)\n {\n endycoord=y; \n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setY(int y){\n this.y = y;\n }",
"public void setY(int y){\n this.y = y;\n }",
"@Override\r\n\tpublic void setY(float y) {\n\t\t\r\n\t}",
"public void setY(int y) {\n\t\tthis.Y = y;\n\t}",
"@Override\n public void setY(int y) {\n this.y=y;\n }",
"private void jump() {\r\n\t\tvelocity = new Vector(velocity.getX(), 7.0);\r\n\t}",
"public void setYPosition(int newY) {\n this.yPosition = newY;\n }",
"public void setY(int y) { this.y=y; }",
"@Override\n\tprotected void onJump() {\n\t\tvelocity.setPolar(moveSpeed, GMath.random.nextInt(8) * GMath.QUARTER_PI);\n\n\t\t// Occasionally jump toward the player.\n\t\tif (GMath.random.nextInt(10) == 0) {\n\t\t\tsuper.onJump();\n\t\t\tvelocity.scale(1.7);\n\t\t\tzVelocity *= 1.3;\n\t\t}\n\t}",
"public void setyPos(int yPos) {\r\n this.yPos = yPos;\r\n }",
"void setY(int y) {\n this.y = y;\n }",
"public void resetYVel() {\n this.yVel = 0;\n }",
"@Override\n\tpublic void setY(float y) \n\t{\n\t\t_y = y;\n\t}",
"@Override\n\tpublic void setY(float y) {\n\n\t}",
"public void moveDown() {\n if (ycoor <= Game.heightOfGameBoard - movingSpeed) {\n ycoor = ycoor + movingSpeed;\n }\n\n }",
"public void setY(int newY)\r\n {\r\n yCoord = newY;\r\n }",
"public void setY(long y){\n this.y = y;\n }",
"void setY(float y) {\n _y = y;\n }",
"private void jump() {\n\t\t\n\t\t// resets game\n\t\tif (gameOver) {\n\t\t\tbird = new Rectangle(WIDTH/2-10, HEIGHT/2-10, 20, 20);\n\t\t\tcolumns.clear();\n\t\t\tyMotion = 0;\n\t\t\tscore = 0;\n\t\t\t\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\t\n\t\t\tgameOver = false;\n\t\t}\n\t\t\n\t\t// starts game\n\t\tif (!started) {\n\t\t\tstarted = true;\n\t\t}\n\t\t\n\t\telse if (started && !gameOver) {\n\t\t\tif (yMotion > 0) {\n\t\t\t\tyMotion = 0;\n\t\t\t}\n\t\t\t\n\t\t\tyMotion -= 10;\n\t\t}\n\t\t\n\t}",
"@Override\n public void update(){\n super.update();\n if(getPositionY() < -2.f){\n setAngleXYDeltaTheta(0.0f);\n setAngleXY(0.0f);\n setPositionY(1.0f);\n setDy(0.0f);\n setDx(0.0f);\n setInPlay(true);\n }\n }",
"public void setY(int y) {\r\n this.y = y;\r\n\r\n this.slot = Slot.fromXY(getX(), y);\r\n }",
"public void setY(float y) {\r\n\t\tthis.y = y;\r\n\t}",
"private void setUpPlayerSpeed() \n {\n \tcalculateMovementSpeeds();\n \t\n \tSystem.out.println(\"height : \" + height);\n \tSystem.out.println(\"\\nsetupPlayerSpeed\");\n \tSystem.out.println(\"==============\");\n \tSystem.out.println(\" walkSpeed : \" + walkSpeed);\n \tSystem.out.println(\" maxRunSpeed : \" + maxRunSpeed);\n \tSystem.out.println(\" accelerationRate : \" + accelerationRate);\n \tSystem.out.println(\" maxAccelRate : \" + maxAccelRate);\n \tSystem.out.println(\" initialJumpSpeed : \" + initialJumpSpeed);\n \tSystem.out.println(\" maxJumpSpeed : \" + maxJumpSpeed);\n \tSystem.out.println(\" jumpIncr : \" + jumpIncr);\n \tSystem.out.println(\" maxFallSpeed : \" + maxFallSpeed);\n \t\n \t//System.exit(-1);\n\t}",
"public void setyPosition(int yPosition) {\n\t\tthis.yPosition = yPosition;\n\t}",
"@Test\r\n\tpublic void testSetPositionY(){\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}",
"public void setY(float y)\n {\n getBounds().offsetTo(getBounds().left, y - positionAnchor.y);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }",
"public void updateYLoc();",
"public void setY(double value) {\n origin.setY(value);\n }",
"public void setCurrentYPosition(int y) {\n\t\tthis.currentYPosition = y;\n\t\tthis.currentXPosition = this.floats.leftIntersectionPoint(this.box.getAbsoluteX()\n\t\t\t\t+ this.box.marginLeft + this.box.paddingLeft, this.box.getAbsoluteY() + y\n\t\t\t\t+ this.box.marginTop + this.box.paddingTop, this.currentRowMaxWidth, this.box);\n\t}",
"public void setY(float y) {\n this.y = y;\n }",
"public void setYPos(int y) {\n // from MoveEventHandler\n // convert to real y coord\n // y = yP * (ymaxR - yminr) / (ymaxP - yminP)\n double tmp = config.getMaximumRealY() + (y - config.getMaximumPixelY())*(config.getMaximumRealY() - config.getMinimumRealY())/(config.getMaximumPixelY() - config.getMinimumPixelY());\n ypos.setText(formatter.format(tmp));\n }",
"public void setY(int position) {\r\n\t\tif(position<5 && position>=0) {\r\n\t\t\tthis.ycoord = position;\r\n\t\t}\r\n\t\telse {\r\n\t\t\trandomY();\r\n\t\t}\r\n\t}",
"public void setyPos(int yPos) \n\t{\n\t\tthis.yPos = yPos;\n\t}",
"public void setLocation(int x, int y){\n if(x < 0 || x > 19 || y < 0 || y > 19){\n // The user has tried to move outside the bounds of the world, so\n // we call the die() method which causes the Player to die.\n die();\n } else {\n // The user is trying to move within the bounds of the world. Run\n // the Actor class' own setLocation() method to move the Player.\n super.setLocation(x, y);\n }\n }",
"public void setCenterY(double y) { centerY.set(clamp(y, Y_MIN, Y_MAX)); }",
"public void setVelocityY(double y) {\n\t\tvelocity.setY(y);\n\t}",
"public void setY(float y){\n this.y = y;\n }",
"public void setyPos(int yPos) {\n\t\tthis.yPos = yPos;\n\t}",
"public void setYCoordinate(int newValue)\n {\n y = newValue;\n }",
"@Override\n\tpublic float getY() {\n\t\treturn lilyPosY;\n\t}"
] | [
"0.73083436",
"0.70399725",
"0.69835347",
"0.6956866",
"0.68965375",
"0.68323416",
"0.6807363",
"0.6797008",
"0.6753178",
"0.67398226",
"0.6675412",
"0.6669998",
"0.66595846",
"0.6634662",
"0.6610753",
"0.6609717",
"0.65933657",
"0.6575031",
"0.656443",
"0.65459275",
"0.6510834",
"0.6499829",
"0.649281",
"0.64684755",
"0.6460062",
"0.6460062",
"0.6460062",
"0.6460062",
"0.64526623",
"0.64426136",
"0.6440176",
"0.6437919",
"0.64173937",
"0.6413381",
"0.6399628",
"0.6399628",
"0.6399628",
"0.639844",
"0.6383794",
"0.63739485",
"0.63737804",
"0.6370085",
"0.6369809",
"0.63683665",
"0.6359535",
"0.6359535",
"0.6359535",
"0.6359535",
"0.63531834",
"0.63515216",
"0.63512176",
"0.6345512",
"0.6325741",
"0.63172674",
"0.6307005",
"0.6294911",
"0.62851524",
"0.6284026",
"0.62811625",
"0.6278118",
"0.6278118",
"0.6278118",
"0.6268811",
"0.62621534",
"0.6252608",
"0.62400013",
"0.62362546",
"0.6228942",
"0.6227298",
"0.622622",
"0.6209609",
"0.6204601",
"0.6195863",
"0.6193385",
"0.6188473",
"0.618763",
"0.6175671",
"0.6173847",
"0.6171471",
"0.6148186",
"0.61441475",
"0.61429125",
"0.6128783",
"0.61194783",
"0.611939",
"0.6119336",
"0.6117216",
"0.61075395",
"0.61047566",
"0.61019397",
"0.6100039",
"0.6097855",
"0.6095745",
"0.6095128",
"0.6092955",
"0.60839814",
"0.6077691",
"0.60765564",
"0.6073959",
"0.60725445"
] | 0.68409276 | 5 |
Increases the players energy value by the given value | public void addEnergy(int e){
if(e + energy < 0)
energy = 0;
else if(e + energy > MAX_ENERGY)
energy = MAX_ENERGY;
else
energy += e;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void increaseEnergy(int energy){\r\n\t\tthis.energy = this.energy + energy;\r\n\t}",
"@Override\n public void updateEnergy(int p, Racer player) {\n\n super.updateEnergy(p, player);\n player.setEnergy(player.getEnergy() * 2);\n }",
"public void setEnergy(double energy) { this.energy = energy; }",
"VariableAmount getExtremeSpikeIncrease();",
"void setExtremeSpikeIncrease(VariableAmount increase);",
"public void updateHp(double amount);",
"public void setEnergy (double energy) {\n\t this.energy = energy;\n\t}",
"public Builder setEnergy(int value) {\n \n energy_ = value;\n onChanged();\n return this;\n }",
"public void eat(int newEnergy)\n {\n if(energy+newEnergy > maxEnergy)\n {\n newEnergy = maxEnergy - energy;\n }\n\n energy += newEnergy;\n animalHungry = false;\n //no bo zwierzaczek juz nie jest glodny\n }",
"public void buyFuelGainMultiply() {\n this.fuelGainMultiply++;\n }",
"@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}",
"public void setEnergy(int energy) {\r\n\t\tthis.energy = energy;\r\n\t}",
"Builder extremeSpikeIncrease(VariableAmount increase);",
"public void setEnergy(int energy)\n\t{\n\t\tenergyStored = Math.max(Math.min(energy, currentMaxEnergy), 0);\n\t}",
"@Override\n public void setEngergyLevel(double energy) {\n this.energy = energy;\n }",
"public void increase() {\n balance.multiply(1.001);\n }",
"public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }",
"public void incLevel(int lvl){this.Level=this.XP/(100);}",
"public void setEnergy(double energy) {\n\t\tthis.energy = energy;\n\t}",
"public void buyFuel() {\n this.fuelMod++;\n fuelMax += +750 * fuelMod;\n }",
"public void setEnergy(int energy) {\n\t\tthis.energy = energy;\n\t}",
"public void train() {\r\n\t\texp += 2;\r\n\t\tenergy -= 5;\r\n\t\tSystem.out.println(\"Gained 2 experience.\");\t\r\n\t}",
"public static void increaseEnergy(int statIncreaseAmount) {\n double newEnergy = Sim.getEnergy() + statIncreaseAmount;\n\n if (newEnergy > MAX_PER_STAT) {\n Sim.setEnergy(MAX_PER_STAT);\n } else {\n Sim.setEnergy(newEnergy);\n }\n\n }",
"public void heal(int healAmount){\r\n health+= healAmount;\r\n }",
"public void move() {\n energy -= 0.03;\n if (energy < 0) {\n energy = 0;\n }\n }",
"public void addFuel(double fuelToAdd){\n\n fuelRemaining = fuelRemaining + fuelToAdd;\n }",
"protected void setEnergy(int newEnergy) {\n\t\tenergy = newEnergy;\n\t}",
"public void promote() {\r\n\t\tif (exp >= 20) {\r\n\t\t\tstage +=1;\r\n\t\t\texp = 0;\r\n\t\t\thp *= 2;\r\n\t\t\tenergy *= 2;\r\n\t\t\tattackPoint *= 2;\r\n\t\t\tresistancePoint *= 2;\r\n\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.printf(\"Pokemon has evolved!\\n\");\r\n\t}",
"public static void increaseDifficaulty() {\r\n\t\tif (Enemy._timerTicker > 5)\r\n\t\t\tEnemy._timerTicker -= 2;\r\n\t\tif (Player._timerTicker < 100)\r\n\t\t\tPlayer._timerTicker += 2;\r\n\t}",
"@Override\n public void increaseStrength(int power) {\n this.damageStrength += power;\n }",
"void gainHealth(int points) {\n this.health += points;\n }",
"protected void gainEXP(int gain) {\n this.totalEXP += gain;\n }",
"public void updateEnergy(boolean up){\n\t\tif (up){\n\t\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"EnergyOrb\");\n\t\t\tel.startEffect(EffectEventId.onCustom);\n\t\t\tElement elfade = nifty.getScreen(\"hud\").findElementByName(\"EnergyOrbFade\");\n\t\t\telfade.startEffect(EffectEventId.onCustom,null,\"OrbChange\");\n\t\t}\n\t\telse{\n\t\t\tElement elfade = nifty.getScreen(\"hud\").findElementByName(\"EnergyOrbFade\");\n\t\t\telfade.startEffect(EffectEventId.onCustom,null,\"OrbFade\");\n\t\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"EnergyOrb\");\n\t\t\tel.startEffect(EffectEventId.onCustom);\n\t\t}\n\t}",
"public void raiseScoreOfEveryPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tp.raiseScore(value);\n\t\t}\n\t}",
"public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }",
"private void strengthenPlayer(int player, double value) {\n\t\tif (player == LOCAL) {\n\t\t\tif (locStatBonus + value < 2) {\n\t\t\t\tlocStatBonus += value;\n\t\t\t}\n\t\t} else if (player == OPPONENT) {\n\t\t\tif (oppStatBonus + value < 2) {\n\t\t\t\toppStatBonus += value;\n\t\t\t}\n\t\t}\n\t\tstrengthenPlayerAnimation(player);\n\t}",
"public void updateEnvelope(double value) {\n\t// Get the values of the individual sliders\n\t\tdouble attackValue = (double) attackSlider.getValue();\n\t\tdouble decayValue = (double) decaySlider.getValue();\n\t\tdouble sustainValue = (double) sustainSlider.getValue();\n\t\tdouble releaseValue = (double) releaseSlider.getValue();\n\t\tSystem.out.println(\"Attack value: \" + attackValue);\n\n\t\t// Place the values in a double array\n\t\tdouble[] envelopeData = {\n\t\t\t\tattackValue, 1.0,\n\t\t\t\tdecayValue, 0.6,\n\t\t\t\tsustainValue, 0.6,\n\t\t\t\treleaseValue, 0.0\n\t\t};\n\n\t\t// Update the envelope data of the instrument\n\t\tsynth.getSelectedInstrument().updateEnvelope(envelopeData);\n\t}",
"public static void experience(){\n PlayerStats.currentEXP += (12*AC + 8*totalHP);\n System.out.println(\"You gained \" +(12*AC + 8*totalHP)+ \" experience!\");\n }",
"public void setEnergy(Energy energy) {\n this.energy = energy;\n }",
"public void buyDecreaseDamage() {\n this.decreaseDamage++;\n }",
"private void UpdateAdds() {\n Adds = (Level + CurrentHealth)/10;\n }",
"public void addEnergy(Energy energy) {\n this.getEnergy().setValue(this.getEnergy().getValue() + energy.getValue());\n }",
"public void update(int x)\n {\n xValue += x;\n }",
"public void setHP(int hp) {\r\n\t\tthis.hp += hp;\r\n\t}",
"void setValue(double value);",
"public void increaseVolume()\r\n {\r\n volume++;\r\n }",
"public double getEnergy() { return energy; }",
"void simulationSpeedChange(int value);",
"public int getEnergy(){ return energy; }",
"int getEnergy();",
"@Override\r\n\tprotected void onIncreaseMp(TYPE type, int value, int skillId, int logId)\r\n\t{\n\t}",
"public void leftNeighborRaiseScore(int value) {\n\t\tif(players.indexOf(current)<2) {\n\t\t\tplayers.get(players.size()-players.indexOf(current)-1).raiseScore(value);\n\t\t}\n\t\telse {\n\t\t\tplayers.get(players.indexOf(current)-2).raiseScore(value);\n\t\t}\n\t}",
"public void\nsetShininessElt(float value )\n\n{\n this.coinstate.shininess = value;\n}",
"public void increaseVolume() {\r\n\t\tvolume++;\r\n\t}",
"public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}",
"public void rise(int player,int value)\r\n\t{\r\n\t\tif(playerBet[player]<maxBet)call(player);\r\n\t\tif((playerBet[player]+value)>accountValue[player])System.out.print(\"wyjatek\");\r\n\t\tplayerBet[player]+=value;\r\n\t\taccountValue[player]=accountValue[player]-value;\r\n\t\tmaxBet+=value;\r\n\t\tpool+=value;\r\n\t\t\r\n\t}",
"@Override\n public boolean use(Player p) {\n // Increase energy cap.\n p.setEnergyCap(p.getEnergyCap() + ENERGY_CAP_INCREASE);\n \n if (p.getEnergyCap() > ENERGY_RESTORE + p.getEnergy()) {\n // Replenish energy.\n p.setEnergy(ENERGY_RESTORE + p.getEnergy());\n\n // Otherwise set energy to max of capacity.\n } else {\n p.setEnergy(p.getEnergyCap());\n }\n return true;\n }",
"@Override\n\t\tpublic void calc(Env env)\n\t\t{\n\t\t\tL2PcInstance pc = (L2PcInstance) env.player;\n\t\t\tif (pc != null)\n\t\t\t{\n\t\t\t\tenv.value += pc.getHennaStatINT();\n\t\t\t}\n\t\t}",
"public void increasePrice() {\n //price doubled\n itemToSell.setBuyPrice(itemToSell.getBuyPrice() * 2);\n }",
"@Override\n\t\tpublic void calc(Env env)\n\t\t{\n\t\t\tL2PcInstance pc = (L2PcInstance) env.player;\n\t\t\tif (pc != null)\n\t\t\t{\n\t\t\t\tenv.value += pc.getHennaStatMEN();\n\t\t\t}\n\t\t}",
"private void raiseFoodLevel(int x) {\n if (this.foodLevel + x <= 100) {\n this.foodLevel += x;\n } else {\n this.foodLevel = 100;\n }\n }",
"public void incValue(){\n\t\tif(this.value < 9){\n\t\t\tthis.value++;\n\t\t}\n\t\telse{\n\t\t\tthis.value = 0;\n\t\t}\n\t}",
"public void gainExp(int exp){\r\n\t\tSystem.out.println(this.getName() + \"'s XP: \" + this.getExperiencePoints() + \" ---> \" + (this.getExperiencePoints()+exp));\r\n\t\tthis.experiencePoints += exp;\r\n\t\t\t//parameters 1 == count, 0 is being used as the xp start point to evaluate\r\n\t\t\t//the intervals in the helper method\r\n\t\tif(this.getExperiencePoints() >= calcLevel(1,0)){\r\n\r\n\t\t\tthis.levelUp();\r\n\t\t}\r\n\r\n\t}",
"public double getEnergy(){\n\t\t return energy;\n\t}",
"@Override\n\t\tpublic void calc(Env env)\n\t\t{\n\t\t\tL2PcInstance pc = (L2PcInstance) env.player;\n\t\t\tif (pc != null)\n\t\t\t{\n\t\t\t\tenv.value += pc.getHennaStatDEX();\n\t\t\t}\n\t\t}",
"private void eToPower()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.eToPower ();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}",
"private void promote() {\r\n //promote gives more money\r\n increment();\r\n }",
"public void changeStockVal() {\n double old = _stockVal;\n _stockVal = 0;\n for (Company x : _stocks.keySet()) {\n _stockVal += x.getPrice() * _stocks.get(x);\n }\n _stockValChanged = _stockVal - old;\n\n }",
"void addVelocityValue(int velocityValue);",
"public double accelerate(int mphIncrease){\r\n speed = speed + mphIncrease;\r\n return speed;\r\n }",
"public void increaseScore(int p) {\n score += p;\n //Minden novelesnel megnezzuk, hogy elertuk-e a gyozelem szukseges pandaszamot.\n if(score >= 25 && game.getSelectedMode() == Game.GameMode.FinitPanda){\n //Ha elertuk, szolunk a jateknak hogy vege.\n game.SaveHighScore(score);\n game.gameOver();\n }\n }",
"void givePlayerExp(BPlayer bPlayer, int exp);",
"public void setExperience(int e) {\n\t\texperience += e;\n\t\twhile(experience >= getExperienceToNextLevel()) {\n\t\t\texperience -= getExperienceToNextLevel();\n\t\t\tlevel++;\n\t\t}\n\t\tMAX_LIFE+= level*100;\n\t\tlife = MAX_LIFE;\n\t}",
"public void setValue(double newvalue){\n value = newvalue;\n }",
"public void SZTToEveryOtherPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.raiseScore(value);\n\t\t\t}\n\t\t}\n\t}",
"public void increaseSpeed() {\n\t\t\n\t\tif(this.getSpeed() < this.getMaximumSpeed()) {\n\t\t\tthis.setSpeed(this.getSpeed() + 5);\n\t\t\tSystem.out.println(\"increase speed by 5 \\n\");\n\t\t}else {\n\t\t\tSystem.out.println(\"You already reach at the max speed \" + this.getMaximumSpeed() +\"\\n\");\n\t\t}\n\n\t}",
"public void buyFuelUpgrades()\n {\n if(play_state.getMoney() >= fuel_upgrade_cost) {\n play_state.setMoney(play_state.getMoney() - fuel_upgrade_cost);\n fuel_upgrade_cost += 100;\n play_state.getDriller().addMax_fuel(10);\n }\n }",
"public void updateEntity(){\n\t\t//e++this.power;\n\t\tthis.updateConnections();\n\t\t\t\n\t\t\n\t\tif(!this.worldObj.isRemote){\n\t\tif(this.power<0)this.power = 0;\n\t\t\n\n\t\t//\n\t\t}\n\t\t\n\t}",
"@Override\n public void set(double value)\n {\n final String funcName = \"set\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", value);\n }\n\n if (!TrcUtil.inRange(value, -1.0, 1.0))\n {\n throw new IllegalArgumentException(\"Value must be in the range of -1.0 to 1.0.\");\n }\n\n if (softLowerLimitEnabled && value < 0.0 && getPosition() <= softLowerLimit\n || softUpperLimitEnabled && value > 0.0 && getPosition() >= softUpperLimit)\n {\n value = 0.0;\n }\n\n if (maxVelocity == 0.0)\n {\n currPower = value;\n }\n // else\n // {\n // controlMode = ControlMode.Velocity;\n // value *= maxVelocity;\n // value = TrcUtil.round(value); // Velocity mode is in sensor units/100ms, and sensor units are in integers.\n // }\n motor.set(value);\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", value);\n }\n }",
"public void increaseVolume() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.INCREASE_VOLUME));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.INCREASE_VOLUME) {\n isIncreasingVolume = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }",
"public void accelerate(){\n speed += 5;\n }",
"@Override\n\tpublic void setGear(int newValue) {\n\t\tgear = newValue+2;\n\t}",
"public void increaseExp(int exp){\r\n\t\tthis.exp = this.exp + exp;\r\n\t}",
"public void increasePrice(int percentage);",
"@Override\r\n\tpublic float getEnergyConsumption() {\r\n\t\treturn 2500 - robot.getBatteryLevel();\r\n\t}",
"private double kToEv(double value) {\n\t\treturn Converter.convertWaveVectorToEnergy(value, edgeEnergy);\n\t}",
"public void consumeFuel(double amount);",
"void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }",
"public void SZTFromEveryOtherPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.lowerScore(value);\n\t\t\t\tcurrent.raiseScore(value);\n\t\t\t}\n\t\t}\n\t}",
"public void\t\t\t\t\t\t\tincreaseLevel()\t\t\t\t\t\t\t\t{ this.currentLevel += 1; }",
"@Override\n public double getEnergyLevel() {\n return energy;\n }",
"public void setLow(double value){low = value;}",
"public void stay() {\n energy -= 0.01;\n if (energy < 0) {\n energy = 0;\n }\n }",
"protected abstract void setValue(Entity e,FloatTrait t,float value);",
"public int incrementPower(int count);",
"@Override\n\t\tpublic void calc(Env env)\n\t\t{\n\t\t\tL2PcInstance pc = (L2PcInstance) env.player;\n\t\t\tif (pc != null)\n\t\t\t{\n\t\t\t\tenv.value += pc.getHennaStatWIT();\n\t\t\t}\n\t\t}",
"public abstract void incrementHealth(int hp);",
"public void Increase()\n {\n Increase(1);\n }",
"public void setEnergie(int energie) {\r\n\t\tthis.energie = energie;\r\n\t}",
"private double xSpeedIncrease() \r\n\t{\r\n\t\tthis.x += 45;\r\n\t\treturn this.x;\r\n\t}"
] | [
"0.7408215",
"0.71346873",
"0.6895312",
"0.6791471",
"0.6752839",
"0.6595865",
"0.6591334",
"0.6483862",
"0.641139",
"0.6409345",
"0.6364211",
"0.6338739",
"0.6329947",
"0.63195765",
"0.63043",
"0.6290573",
"0.6289955",
"0.62557155",
"0.62259054",
"0.62084806",
"0.61980736",
"0.6198061",
"0.61722773",
"0.6166182",
"0.6159712",
"0.61528766",
"0.61516774",
"0.61417764",
"0.6141273",
"0.61401504",
"0.613678",
"0.61252993",
"0.611379",
"0.6108997",
"0.61011916",
"0.6095836",
"0.60751307",
"0.6071519",
"0.6069781",
"0.6059205",
"0.60589445",
"0.6057458",
"0.6044616",
"0.6040196",
"0.603938",
"0.6015407",
"0.6001964",
"0.5994383",
"0.5979333",
"0.59733534",
"0.59593385",
"0.5944424",
"0.59030485",
"0.58973783",
"0.58951813",
"0.5880225",
"0.5869545",
"0.5858008",
"0.58491284",
"0.58280283",
"0.58245987",
"0.58135384",
"0.5809929",
"0.58097607",
"0.5805981",
"0.58055",
"0.580128",
"0.57903695",
"0.57889915",
"0.5779308",
"0.5774333",
"0.5769566",
"0.5767764",
"0.5748947",
"0.5745934",
"0.5742188",
"0.5738988",
"0.5736338",
"0.57301414",
"0.57240593",
"0.5720029",
"0.57170326",
"0.5716764",
"0.5694249",
"0.569378",
"0.5692914",
"0.569047",
"0.56887704",
"0.56881607",
"0.56860876",
"0.5673833",
"0.56710637",
"0.56705475",
"0.56689066",
"0.5667749",
"0.5667032",
"0.5665097",
"0.5660208",
"0.5659877",
"0.56585926"
] | 0.69182885 | 2 |
Returns the name of the player | public String getName(){
return this.name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}",
"String getPlayerName();",
"public String getName(){\r\n\t\treturn playerName;\r\n\t}",
"public String getPlayerName() {\n return props.getProperty(\"name\");\n }",
"public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}",
"public String getPlayerName() {\n\t\treturn name;\n\t}",
"public String getPlayerName() {\n return nameLabel.getText().substring(0, nameLabel.getText().indexOf('\\''));\n }",
"public String getPlayerName() {\n return this.playerName;\n }",
"public String getPlayerName(){\n\t\treturn playerName;\n\t}",
"public String getPlayerName() {\n return playerName;\n }",
"public String getPlayerName() {\n return playerName;\n }",
"public String getPlayerName() {\n\n return m_playerName;\n }",
"String getName() {\n return getStringStat(playerName);\n }",
"String getName(){\n\t\treturn playerName;\n\t}",
"@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}",
"public String getPlayerName() {\n\t\treturn playerName;\n\t}",
"public String getName(Player p) {\n\t\treturn name;\n\t}",
"public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n }\n }",
"public String getPlayerName() {\n return name; \n }",
"public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getPlayerName() {\n \treturn playername;\n }",
"@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }",
"public String getName(){\n\t\treturn players.get(0).getName();\n\t}",
"abstract public String getNameFor(Player player);",
"public String getPlayername(Player player) {\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n System.out.println(\"Merci de d'indiquer le nom du joueur \"+player.getColor().toString(false)+\" : \");\n String name = readInput.nextLine();\n return name;\n }",
"private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }",
"private String getPlayerName() {\n Bundle inBundle = getIntent().getExtras();\n String name = inBundle.get(USER_NAME).toString();\n return name;\n }",
"public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }",
"java.lang.String getGameName();",
"java.lang.String getGameName();",
"public com.google.protobuf.ByteString\n getPlayerNameBytes() {\n java.lang.Object ref = playerName_;\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 playerName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private String getPlayerName() {\n EditText name = (EditText) findViewById(R.id.name_edittext_view);\n return name.getText().toString();\n }",
"public String getLoggedPlayerName() {\r\n return ctrlDomain.getLoggedPlayerName();\r\n }",
"public com.google.protobuf.ByteString\n getPlayerNameBytes() {\n java.lang.Object ref = playerName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n playerName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"String getPlayer();",
"public String getDisplayName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getDisplayName ).orElse ( name );\n\t}",
"public String getPlayer() {\r\n return player;\r\n }",
"public String getPlayerListName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getPlayerListName ).orElse ( name );\n\t}",
"public static String getNameOne() {\n\tString name;\n\tname = playerOneName.getText();\n\treturn name;\n\n }",
"private String getPlayerName(int i) {\n\t\tSystem.out.println(\"\\nEnter Player \"+i+\"'s Name:\");\n\t\treturn GetInput.getInstance().aString();\n\t}",
"public String getFullPlayerName(Player otherPlayer) {\n return this.fullPlayerName;\n }",
"String getNewPlayerName();",
"public String toString() {\n\t\treturn \"Player \" + playerNumber + \": \" + playerName;\n\t}",
"String player1GetName(){\n return player1;\n }",
"String getPlayerName() {\r\n EditText editText = (EditText) findViewById(R.id.name_edit_text_view);\r\n return editText.getText().toString();\r\n }",
"public String getPlayerName(UUID id) {\n return playerRegistry.get(id);\n }",
"public String getPlayerName(){\n return this.playerName;\n\n }",
"@Override\r\n\tpublic void SavePlayerName() {\r\n\t\tPlayer player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerName.txt\";\r\n\t\tString playerName = player.getName();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerName);\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\t\r\n\t}",
"public void setPlayerName(String name) {\n \tplayername = name;\n }",
"String player2GetName(){\n return player2;\n }",
"public String getPlayerTitle(Player player)\n \t{\n \t\tif (player == null)\n \t\t\treturn \"\";\n \n \t\tFPlayer me = FPlayers.i.get(player);\n \t\tif (me == null)\n \t\t\treturn \"\";\n \n \t\treturn me.getTitle().trim();\n \t}",
"public String getNewPlayerName() {\n return newPlayerName;\n }",
"public String getPlayerOneUserName() {\n if (gameStatus == null) return \"\";\n if (gameStatus.getPlayerOneUserName() == null) return \"\";\n return gameStatus.getPlayerOneUserName();\n }",
"private void getPlayertName() {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}",
"public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }",
"public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}",
"public String getCurrentPlayer() {\n return currentPlayer;\n }",
"public String getPlayer() {\n return p;\n }",
"private String getPlayerName() {\n\t\tString[] options = {\"OK\"};\n\t\tJPanel namePanel = new JPanel(new GridLayout(0, 1));\n\t\tJLabel lbl = new JLabel(\"Next player, what is your name?\");\n\t\tJTextField txt = new JTextField(10);\n\t\tnamePanel.add(lbl);\n\t\tnamePanel.add(txt);\n\t\t\n\t\t// show dialog box\n\t\tJOptionPane.showOptionDialog(frame, namePanel, \"Player name\",\n\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options , options[0]);\n\t\tString playerName = txt.getText();\n\t\twhile(playerName.length() < 1){\n\t\t\tlbl.setText(\"Name must be at least one character long.\");\n\t\t\tJOptionPane.showOptionDialog(frame, namePanel, \"Player name\",\n\t\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.WARNING_MESSAGE, null, options , options[0]);\n\t\t\tplayerName = txt.getText();\n\t\t}\n\t\treturn playerName;\n\t}",
"public MultiLineText getGameScreenFullPlayerName() {\n if (this.gameScreenFullPlayerName == null) {\n String[] strTemp = { this.fullPlayerName };\n this.gameScreenFullPlayerName = new MultiLineText(strTemp, 10, 10, Color.black, 15.0f, \"Lucida Blackletter\", ImageLibRef.TEXT_PRIORITY, MultiLineText.LEFT_ALIGNMENT);\n }\n\n return this.gameScreenFullPlayerName;\n }",
"String randomPlayer1GetName(){\n return randomPlayer1;\n }",
"public void setPlayerName(String playerName) {\n this.playerName = playerName;\n }",
"public String toString()\n {\n return \"Player's name: \" + playersName + \". Player's current score: \" + currentScore;\n }",
"public String getCurrentNickname() {\n return currentPlayer.getNickName();\n }",
"public String getName() {\n return chatRoom.getName();\n }",
"public String getPlayerName(){\n return player1Score > player2Score ? player1Name : player2Name;\n }",
"@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}",
"public String getName() {\n return (String) getObject(\"username\");\n }",
"public String getName() {\n\t\treturn this.username;\n\t}",
"public String toString() {\n\t\treturn \"player \" + player.id + \"\\n\";\n\t}",
"public String getName() {\r\n\t\treturn username;\r\n\t}",
"@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }",
"public java.lang.String getGameName() {\n java.lang.Object ref = gameName_;\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 gameName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getGameName() {\n java.lang.Object ref = gameName_;\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 gameName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public void setPlayerName(String name) {\n\t\tsuper.setPlayerName(name);\n\t}",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();"
] | [
"0.8804421",
"0.875385",
"0.87389326",
"0.86752605",
"0.86129934",
"0.8601486",
"0.857343",
"0.8497836",
"0.8449493",
"0.84320855",
"0.84320855",
"0.84203905",
"0.84157753",
"0.8413658",
"0.8396076",
"0.8381853",
"0.8368563",
"0.8336539",
"0.83281153",
"0.831601",
"0.825189",
"0.8202271",
"0.8127276",
"0.8073665",
"0.80430293",
"0.795064",
"0.79140365",
"0.7863758",
"0.78186464",
"0.78186464",
"0.7767782",
"0.7720675",
"0.77090037",
"0.7679071",
"0.7636637",
"0.76032925",
"0.75428414",
"0.75425464",
"0.75155723",
"0.7512618",
"0.75112635",
"0.7489172",
"0.73991984",
"0.73955524",
"0.73914796",
"0.7380438",
"0.7372898",
"0.7290906",
"0.72607553",
"0.7200627",
"0.7200578",
"0.719967",
"0.7142999",
"0.71162623",
"0.7101516",
"0.7089354",
"0.70531464",
"0.7039334",
"0.7037073",
"0.7035924",
"0.70220613",
"0.70021725",
"0.6975546",
"0.69542503",
"0.691601",
"0.6888279",
"0.68842685",
"0.684574",
"0.68293625",
"0.68266225",
"0.68130213",
"0.68084925",
"0.6800989",
"0.6800989",
"0.67823875",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946",
"0.67744946"
] | 0.0 | -1 |
Returns the energy value of the player | public int getEnergy(){ return energy; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getEnergy()\n {\n return energy;\n }",
"public int getEnergy() {\n return energy;\n }",
"public double getEnergy() { return energy; }",
"public double getEnergy() {\n\t\treturn energy;\n\t}",
"int getEnergy();",
"protected int getEnergy() {\n\t\treturn energy;\n\t}",
"public int getEnergy() {\n\t\treturn energy;\n\t}",
"public double getEnergy(){\n\t\t return energy;\n\t}",
"@Override\n public double getEnergyLevel() {\n return energy;\n }",
"public double getEnergy() {\n\t\treturn _energy;\n\t}",
"public Energy getEnergy() {\n return energy;\n }",
"@java.lang.Override\n public int getEnergy() {\n return energy_;\n }",
"@java.lang.Override\n public int getEnergy() {\n return energy_;\n }",
"double energy() {\n\n // brightness values\n double brU = 0;\n double brD = 0;\n double brR = 0;\n double brL = 0;\n double brDR = 0;\n double brTR = 0;\n double brDL = 0;\n double brTL = 0;\n if (this.up != null) {\n brU = this.up.brightness;\n }\n if (this.down != null) {\n brD = this.down.brightness;\n }\n\n if (this.right != null) {\n brR = this.right.brightness;\n }\n\n if (this.left != null) {\n brL = this.left.brightness;\n }\n\n if (this.downRight() != null) {\n brDR = this.downRight().brightness;\n }\n\n if (this.downLeft() != null) {\n brDL = this.downLeft().brightness;\n }\n\n if (this.topLeft() != null) {\n brTL = this.topLeft().brightness;\n }\n\n if (this.topRight() != null) {\n brTR = this.topRight().brightness;\n }\n\n\n double vertEnergy = (brTL + brL + brDL) - (brTR + brR + brDR);\n double horizEnergy = (brTL + brU + brTR) - (brDL + brD + brDR);\n\n return Math.sqrt((vertEnergy * vertEnergy) + (horizEnergy * horizEnergy));\n\n }",
"public double getPlayerFullHP();",
"public float getEnergyRate() { return EnergyRate; }",
"public double getEnginePower(){\n return enginePower;\n }",
"public int energy_consumed_GET()\n { return (int)((int) get_bytes(data, 29, 4)); }",
"public double getEnergia() { return energia; }",
"Float getHealth();",
"public int getEnergie() {\r\n\t\treturn energie;\r\n\t}",
"protected double getEnginePower(){\n return enginePower;\n }",
"public double energy(int x, int y) {\n if (!validCoordinates(x, y)) { throw new IndexOutOfBoundsException(\"x or y not in range.\"); }\n if (isBorder(x, y)) { return 1000.0; }\n return Math.sqrt(hzDiff(x, y) + vtDiff(x, y));\n }",
"int getHPValue();",
"public float getHealth(){\n return health.getHealth();\n }",
"@ComputerMethod\n private FloatingLong getEnergyUsage() {\n return energyContainer.getEnergyPerTick();\n }",
"@Override\n public long getEnergy(ItemStack itemStack)\n {\n return NBTUtility.getNBTTagCompound(itemStack).getLong(\"electricity\");\n }",
"@ComputerMethod\n private FloatingLong getEnergyUsage() {\n return getActive() ? energyContainer.getEnergyPerTick() : FloatingLong.ZERO;\n }",
"public int getFitness(){\n\t\treturn getEnergy()*-1; \n\t}",
"Double volume() {\n return execute(\"player.volume\");\n }",
"public int getEnergyTimer()\n\t{\n\t\treturn currentEnergyTimer;\n\t}",
"@Override\r\n\tpublic double getEnergy(Robot robot)\r\n\t{\r\n\t\treturn robot.getEnergy(EnergyUnit.WATTSECOND);\r\n\t}",
"public int getHeroPower() {\n\n return heroPower;\n }",
"@Override\r\n\tpublic float getEnergyConsumption() {\r\n\t\treturn 2500 - robot.getBatteryLevel();\r\n\t}",
"public double energy(int x, int y) {\r\n validate(x, y);\r\n return energy[x][y];\r\n }",
"public int getHealthGain();",
"public double getHp() {\n return hp;\n }",
"public void setEnergy(double energy) { this.energy = energy; }",
"public java.lang.Float getE() {\n return e;\n }",
"public java.lang.Float getE() {\n return e;\n }",
"public double getHealth() {\n return classData.getHealth(level);\n }",
"public int getHp() {\n return hp;\n }",
"public float getHealth()\n {\n return health;\n }",
"public int getDmg(){\r\n return enemyDmg;\r\n }",
"public int getHp() {\r\n return hp;\r\n }",
"public double getCurrentFuel();",
"@Override\n\tpublic int getEnergyStored() {\n\t\treturn 0;\n\t}",
"float getPower();",
"public int getHp() {\n return hp;\n }",
"public int getValue(final Player player) {\r\n\t\treturn board.getValue(player);\r\n\t}",
"public double getHealth() {\r\n\t\treturn health;\r\n\t}",
"int getCurrentHP();",
"@Override\n public double getValue() {\n return healthPackAmount;\n }",
"public int getHP() {\r\n return currHP;\r\n }",
"public byte getHp(){\n return hp;\n }",
"public double energy(int x, int y) {\n if (x < 0 || x >= width() || y < 0 || y >= height()) {\n throw new IllegalArgumentException(\"x, y outside picture boundary\");\n }\n return this.energy[x][y];\n }",
"@Override\n public void updateEnergy(int p, Racer player) {\n\n super.updateEnergy(p, player);\n player.setEnergy(player.getEnergy() * 2);\n }",
"public void setEnergy (double energy) {\n\t this.energy = energy;\n\t}",
"public int getHealth()\r\n {\r\n return health;\r\n }",
"public int getE() {\n return e_;\n }",
"int getHealth();",
"public int getFitness() {\n\t\treturn getEnergy() * -1;\n\t}",
"public static int getHealth()\r\n\t{\r\n\t\treturn health;\r\n\t}",
"public int getHp(){\r\n return hp;\r\n }",
"public int getHealth()\r\n {\r\n return this.health;\r\n }",
"public double getHealth(){\r\n return health;\r\n }",
"public int getE() {\n return e_;\n }",
"public double energy(int x, int y)\n { \n //StdOut.printf(\"x:%d, y:%d\", x, y);\n int w = width() -1, h = height()-1;\n //check boundaries\n if (x < 0 || x > w || y < 0 || y > h)\n throw new java.lang.IndexOutOfBoundsException(\"Energy\");\n // if pixel on boarder:\n else if (x == 0 || x == w || y == 0 || y == h)\n return this.BOARDER_NRG;\n else return innerEnergy(x, y);\n }",
"public int getHealth();",
"public int getHealth() {\n\t\treturn this.Health;\n\t}",
"public int getHealth() {\n return getStat(health);\n }",
"public int getHealth() {\n return this.health;\n }",
"public int getHp() \n\t{\n\t\treturn hp;\n\t}",
"public static double getEnergy(double energy) {\n double newEnergy;\n\n if (energy < 0 )\n newEnergy = -1.0;\n\n if (energy < 40.0)\n newEnergy = -0.33;\n else if (energy >= 40.0 && energy < 80.0)\n newEnergy = 0.33;\n else\n newEnergy = 1.0;\n return newEnergy;\n }",
"public float getHealth() {\n\t\treturn _health;\n\t}",
"public double getVenus()\n {\n double venus = earthWeight * 0.9;\n return venus;\n }",
"public Integer getHealth();",
"public int getEvd() {\n return evd;\n }",
"public int getCurrentHealth() {\r\n return currentHealth;\r\n }",
"public double energy(int x, int y) {\n if(x < 0 || x >= width() || y < 0 || y >= height()) {\n throw new IndexOutOfBoundsException();\n }\n if(x == 0 || x == width() - 1 || y == 0 || y == height() - 1) {\n return 1000;\n }\n\n int deltaX = del_energyCal(x + 1, y, x - 1, y);\n int deltaY = del_energyCal(x - 1, y, x - 1, y);\n \n double energy = Math.sqrt(deltaX + deltaY);\n return energy;\n }",
"public static byte getPlayerVolume(Player player) {\n\t\tByte byteObj = plugin.playerVolume.get(player.getName());\n\t\tif (byteObj == null) {\n\t\t\tbyteObj = 100;\n\t\t\tplugin.playerVolume.put(player.getName(), byteObj);\n\t\t}\n\t\treturn byteObj;\n\t}",
"public float getAddHealth()\n {\n return addHealth;\n }",
"public short getSiegeWeaponDamage();",
"public double energy(int x, int y) {\n if (x < 0 || x >= width())\n throw new java.lang.IllegalArgumentException(\"x is out of range\");\n if (y < 0 || y >= height())\n throw new java.lang.IllegalArgumentException(\"y is out of range\");\n if (atXBorder(x) || atYBorder(y))\n return 1000;\n double dX = deltaX(x, y);\n double dY = deltaY(x, y);\n return Math.sqrt(dX + dY);\n }",
"public int getHealth() {\n\t\treturn currentHealth;\n\t}",
"public int getEquippedWeaponDamage() {\n return 0;\n }",
"public double getHealth() { return health; }",
"int getHealth() {\n return health;\n }",
"public int getHPValue() {\n return hPValue_;\n }",
"public int getCurrentHealth() {\n return currentHealth;\n }",
"public double estimatedEnergyPerPanel() {\n\t\tif (estimatedEnergyPerPanel < 0) {\n\t\t\treturn estimatedEnergyPerPanel;\n\t\t}\n\t\t// if est. EnergyPerPanel hasn't been found yet, we find it here...\n\t\tdouble wattToKW = .001;\n\t\testimatedEnergyPerPanel = systemCap * wattToKW;\n\t\t// the returned estimated energy will factor in the powerTolerance,\n\t\t// which typically equates to percent loss on the panel\n\t\treturn estimatedEnergyPerPanel -= estimatedEnergyPerPanel\n\t\t\t\t* (.01 * powerTolerance);\n\t}",
"public int getHp() {\n\t\treturn this.hp;\n\t}",
"public int getValue() {\r\n return lives;\r\n }",
"public int getPlayermoney() {\n\t\treturn playermoney;\n\t}",
"public int getHP()\n\t{\n\t\treturn iHP;\n\t\t\n\t}",
"int getDieValue() throws HaltException {\n printStream.print(\"\\n\\nChoose the value of the die (value goes from 1 to 6)\");\n return takeInput(1,6);\n }",
"public static Action attackEP(final int energy) {\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 DestructibleActor) {\n if(a.getHealth() * 10 + a.getEnergy() >= energy) {\n ((DestructibleActor) b).damage((int) (Math.pow(energy + 4, .5) - 2), a);\n\n a.energy -= getCost();\n }\n }\n }\n }\n\n @Override\n public int getCost() {\n return energy;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return energy;\n }\n\n @Override\n public String toString() {\n return \"AttackEP(\" + energy + \")\";\n }\n };\n }",
"public int power() {\n int tot = 0;\n for (Equipment e : equipments) {\n tot += e.power();\n }\n\n return tot;\n }",
"@Override\r\n public int getSpecialValue() {\n int num = this.getCombatLevel();\r\n num += this.levelChangeAgainstCultistPlayer;\r\n \r\n return num;\r\n }",
"public static int getEnemyLives(){\n return 1 + currentLvl * 2;\n\n }"
] | [
"0.75455433",
"0.7523258",
"0.74903387",
"0.7396932",
"0.73682845",
"0.7345549",
"0.73443776",
"0.7296895",
"0.72731876",
"0.7268924",
"0.7265415",
"0.72168046",
"0.72105336",
"0.68754554",
"0.67598367",
"0.6583299",
"0.6583124",
"0.6574731",
"0.6539274",
"0.64759755",
"0.6465685",
"0.6441192",
"0.64129966",
"0.6407385",
"0.63569134",
"0.6324099",
"0.6317814",
"0.6306765",
"0.6271442",
"0.6253608",
"0.6241551",
"0.6229564",
"0.6210547",
"0.62086993",
"0.6182054",
"0.61764824",
"0.61759424",
"0.61730605",
"0.61699116",
"0.6132694",
"0.61155033",
"0.6093307",
"0.6089992",
"0.608082",
"0.60709554",
"0.60628843",
"0.6057079",
"0.6049635",
"0.60419124",
"0.6023108",
"0.6020208",
"0.60165274",
"0.6016371",
"0.60123795",
"0.6009552",
"0.59969133",
"0.5992862",
"0.5983517",
"0.5975367",
"0.59723836",
"0.59698653",
"0.59687346",
"0.59620535",
"0.59602445",
"0.59570044",
"0.594973",
"0.5948819",
"0.5947932",
"0.5944575",
"0.5943259",
"0.59362817",
"0.59318364",
"0.5929438",
"0.5924489",
"0.5918107",
"0.59105724",
"0.59071153",
"0.5906533",
"0.5901038",
"0.5894534",
"0.5873857",
"0.5873518",
"0.5860541",
"0.5852182",
"0.5848221",
"0.58478165",
"0.58433384",
"0.58421224",
"0.5833154",
"0.5826773",
"0.58137405",
"0.58122814",
"0.58050793",
"0.5804506",
"0.5799249",
"0.5798642",
"0.57966065",
"0.5795069",
"0.57813364",
"0.5780125"
] | 0.7160086 | 13 |
Returns the weapon entry tracker list | public LinkedList<Byte> getWeaponEntry(){
return this.weaponEntryTracker;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Vector<EntityWeapon> getWeaponList();",
"private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/candlestick3.png\"), new Coordinate(2,3), \"Candlestick\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/knife1.png\"), new Coordinate(12,3), \"Knife\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/leadpipe1.png\"), new Coordinate(20,3), \"LeadPipe\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/rope1.png\"), new Coordinate(20,10), \"Rope\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/spanner1.png\"), new Coordinate(20,16), \"Wrench\"));\r\n\t\treturn weaps;\r\n\t}",
"java.util.List<pb4client.AchievementInfo> \n getAchieveInfoList();",
"public ArrayList<Pair<Byte, Short>> getWeapons() {\n return weapons;\n }",
"public ArrayList<Weapon> getWeaponList() {\n return new ArrayList<>(weaponList);\n }",
"public List<Entity> getPassengers() {\n/* 667 */ return Lists.newArrayList(Lists.transform((getHandle()).passengers, new Function<Entity, Entity>()\n/* */ {\n/* */ public Entity apply(Entity input) {\n/* 670 */ return input.getBukkitEntity();\n/* */ }\n/* */ }));\n/* */ }",
"public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }",
"public List<IWeapon> getWeaponsInventory(){\n return weaponsInventory;\n }",
"public List<String> getHotels() {\n\t\t// FILL IN CODE\n\t\tlock.lockRead();\n\t\ttry{\n\t\t\tList<String> hotelIds = new ArrayList<>();\n\t\t\tif(hotelIds != null){\n\t\t\t\thotelIds = new ArrayList<String>(hotelMap.keySet());\n\t\t\t}\n\t\t\treturn hotelIds;\n\t\t}\n\t\tfinally{\n\t\t\tlock.unlockRead();\n\t\t}\n\t}",
"public Weapon[] getWeapons(){\n\t\tSystem.out.println(\"Creating Weapons...\");\n\t\tfor(int i=0; i<boardWeapons.length; i++){\n\t\t\tSystem.out.println(boardWeapons[i].getName());\n\t\t}\n\t\treturn boardWeapons;\n\t}",
"public HashMap<String, List<String>> getItemMap() {\r\n\r\n\t\thelmet_abilities.add(Game_constants.INTELLIGENCE);\r\n\t\thelmet_abilities.add(Game_constants.WISDOM);\r\n\t\thelmet_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tarmor_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tshield_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tring_abilities.add(Game_constants.ARMOR_CLASS);\r\n\t\tring_abilities.add(Game_constants.STRENGTH);\r\n\t\tring_abilities.add(Game_constants.CONSTITUTION);\r\n\t\tring_abilities.add(Game_constants.WISDOM);\r\n\t\tring_abilities.add(Game_constants.CHARISMA);\r\n\r\n\t\tbelt_abilities.add(Game_constants.CONSTITUTION);\r\n\t\tbelt_abilities.add(Game_constants.STRENGTH);\r\n\r\n\t\tboots_abilities.add(Game_constants.ARMOR_CLASS);\r\n\t\tboots_abilities.add(Game_constants.DEXTERITY);\r\n\r\n\t\tweapon_abilities.add(Game_constants.ATTACK_BONUS);\r\n\t\tweapon_abilities.add(Game_constants.DAMAGE_BONUS);\r\n\r\n\t\titem_map.put(Game_constants.HELMET, helmet_abilities);\r\n\t\titem_map.put(Game_constants.ARMOR, armor_abilities);\r\n\t\titem_map.put(Game_constants.SHIELD, shield_abilities);\r\n\t\titem_map.put(Game_constants.RING, ring_abilities);\r\n\t\titem_map.put(Game_constants.BELT, belt_abilities);\r\n\t\titem_map.put(Game_constants.BOOTS, boots_abilities);\r\n\t\titem_map.put(Game_constants.WEAPON_MELEE, weapon_abilities);\r\n\t\titem_map.put(Game_constants.WEAPON_RANGE, weapon_abilities);\r\n\r\n\t\treturn item_map;\r\n\r\n\t}",
"public List<CardWeapon> getWeapons() {\n return weapons;\n }",
"public ArrayList<WeaponClient> getWeapons() {\n return weapons;\n }",
"public ArrayList<Weapon> getWeapons() {\n return weapons;\n }",
"public List<InventoryEntry> getInventoryEntries();",
"public List<String> getWeaponCardList() {\n return weaponCardList;\n }",
"public List<Integer> getPurchasedWeapons() {\r\n\t\treturn collectionManager.getPurchasedWeapons();\r\n\t}",
"java.util.List<WorldUps.UGoPickup> \n getPickupsList();",
"public ArtilleryTracker() {\n weapons = new Hashtable<Mounted, Vector<ArtilleryModifier>>();\n }",
"public int getWeapons() {\n return weapons;\n }",
"public ArrayList<Flight> legs()\n {\n \t return this.mLegs;\n }",
"public List<Entry> getAllLiterature() {\n List<Entry> allLiterature = new ArrayList<>();\n for (Entry l : litRegister) {\n allLiterature.add(l);\n }\n return allLiterature;\n }",
"public ArrayList<GenericHunt> getCurrentHunts(){\n SQLiteDatabase db = this.getReadableDatabase();\n ArrayList<GenericHunt> hunts = new ArrayList<GenericHunt>();\n Cursor cursor = db.rawQuery(AppConstants.SELECT_ALL_HUNTS, null);\n\n if(cursor.moveToFirst()){\n do {\n GenericHunt hunt = new GenericHunt();\n hunt.setQuery(cursor.getString(cursor.getColumnIndex(AppConstants.QUERYNAME)));\n hunt.setPriceMin(cursor.getDouble(cursor.getColumnIndex(AppConstants.PRICEMIN)));\n hunt.setPriceMax(cursor.getDouble(cursor.getColumnIndex(AppConstants.PRICEMAX)));\n //TODO - Store lists in db as JSON objects\n String webs = cursor.getString(cursor.getColumnIndex(AppConstants.WEBSITESTRING));\n hunt.setWebsite(webs);\n String locs = cursor.getString(cursor.getColumnIndex(AppConstants.COUNTRIESTRING));\n hunt.setLocation(locs);\n hunt.setSearchType(cursor.getInt(cursor.getColumnIndex(AppConstants.SEARCHTYPE)) != 0);\n hunt.setHuntFrequency(cursor.getLong(cursor.getColumnIndex(AppConstants.HUNTFREQUENCY)));\n hunt.setNotificationType(cursor.getInt(cursor.getColumnIndex(AppConstants.NOTIFICATIONTYPE)) != 0);\n hunt.setHuntConnectionType(cursor.getInt(cursor.getColumnIndex(AppConstants.HUNTCONNECTIONTYPE)) != 0);\n //String huntKey = cursor.getString(cursor.getColumnIndex(AppConstants.LISTINGKEY));\n //TODO - Call sql using FK here to get all listings in Listings table with same FK. Set to listings arraylist\n\n hunts.add(hunt);\n }\n while (cursor.moveToNext());\n }\n cursor.close();\n return hunts;\n }",
"public int weaponCount(){\n\t\treturn weaponList.size();\n\t}",
"@Override\n public JSONObject listOfTools(long renterId) {\n listOfTools = toolDb.getToolsByRenterId(renterId);\n System.out.println(listOfTools);\n return null;\n }",
"public ArrayList<Gun> getGuns() {\n\t\tArrayList<Gun> guns = new ArrayList<Gun>(); \n\t\tfor (Item item : inventory) {\n\t\t\tif (item.asGun() != null) {\n\t\t\t\t guns.add(item.asGun());\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\treturn guns;\n\t }",
"public ArrayList<Bullet> getBulletsFired(){\n return this.bulletsFired;\n }",
"public List < Entity > getPassengers ( ) {\n\t\treturn extract ( handle -> handle.getPassengers ( ) );\n\t}",
"public static Data<Weapon> weaponList(){\n\t\tData<Weapon> res = new Data<Weapon>();\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée bâtarde\",Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,35,3), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hache d’armes\",Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,10,3), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new Munition(\"Bolas\",TypeDamage.C,\"_\",5,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Gourdin\",Type.CAC_1M,TypeDamage.C, TypeMaterial.WOOD,0,1.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc long composite\", new Munition(\"Flèche\",0.075),TypeDamage.P,TypeMaterial.WOOD,100,1.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc court composite\", new Munition(\"Flèche\",0.075),TypeDamage.P,TypeMaterial.WOOD,75,1), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Dague\", Type.CAC_LIGHT ,TypeDamage.P_T,TypeMaterial.STEEL,2,0.5), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new Munition(\"Fléchette\", TypeDamage.P, \"_\",0.5,0.25), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hache d’armes naine\", Type.CAC_1M ,TypeDamage.T, TypeMaterial.STEEL,15,3), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Cimeterre à deux mains\", Type.CAC_2M,TypeDamage.T, TypeMaterial.STEEL,75,4), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Gantelet\", Type.CAC_LIGHT, TypeDamage.C, TypeMaterial.STEEL,2,0.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Coutille\", Type.CAC_2M, TypeDamage.T, TypeMaterial.STEEL,8,5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Grande hache\", Type.CAC_2M,TypeDamage.T,TypeMaterial.STEEL,20,6), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Massue\",Type.CAC_2M ,TypeDamage.C, TypeMaterial.WOOD,5,4), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée à deux mains\", Type.CAC_2M, TypeDamage.T, TypeMaterial.STEEL,50,4), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hallebarde\", Type.CAC_2M ,TypeDamage.P_T, TypeMaterial.STEEL,10,6), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hachette\", Type.CAC_LIGHT ,TypeDamage.T, TypeMaterial.STEEL,6,1.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arbalète lourde\", new Munition(\"Carreau\",0.05),TypeDamage.P, TypeMaterial.STEEL,50,4), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Fléau d’armes lourd\", Type.CAC_2M,TypeDamage.C, TypeMaterial.STEEL,15,5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Masse d’armes lourde\", Type.CAC_1M,TypeDamage.C, TypeMaterial.STEEL,12,4), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Lance d’arçon\", Type.CAC_2M, TypeDamage.P, TypeMaterial.STEEL,10,5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arbalète légère\", new Munition(\"Carreau\",0.05),TypeDamage.P, TypeMaterial.STEEL,35,2), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Fléau d’armes léger\", Type.CAC_1M, TypeDamage.C, TypeMaterial.STEEL,8,2.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Marteau léger\", Type.CAC_LIGHT ,TypeDamage.C, TypeMaterial.STEEL,1,2), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Masse d’armes légère\", Type.CAC_LIGHT,TypeDamage.C, TypeMaterial.STEEL,5,2), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Pic de guerre léger\", Type.CAC_LIGHT ,TypeDamage.P, TypeMaterial.STEEL,4,1.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc long\", new Munition(\"Flèche\",0.075),TypeDamage.P, TypeMaterial.WOOD,75,1.5), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Pique\", Type.CAC_2M,TypeDamage.P, TypeMaterial.WOOD,5,4.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée longue\", Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,15,2), 7));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Morgenstern\", Type.CAC_1M, TypeDamage.C_P,TypeMaterial.STEEL,8,3), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Nunchaku\", Type.CAC_LIGHT, TypeDamage.C, TypeMaterial.WOOD,2,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Bâton\", Type.CAC_2M, TypeDamage.C, TypeMaterial.WOOD,0,2), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Rapière\", Type.CAC_1M, TypeDamage.P ,TypeMaterial.STEEL,20,1), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Sai\", Type.CAC_LIGHT, TypeDamage.C_P ,TypeMaterial.STEEL,1,0.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Matraque\", Type.CAC_LIGHT, TypeDamage.C ,TypeMaterial.WOOD,1,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Cimeterre\", Type.CAC_1M, TypeDamage.T ,TypeMaterial.STEEL,15,2), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Faux\", Type.CAC_2M, TypeDamage.C_P ,TypeMaterial.STEEL,18,5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc court\", new Munition(\"Flèche\",0.075),TypeDamage.P, TypeMaterial.WOOD,30,1), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epieu\", Type.CAC_1M, TypeDamage.P ,TypeMaterial.STEEL,1,1.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée courte\", Type.CAC_1M, TypeDamage.P ,TypeMaterial.STEEL,10,1), 5));\n\t\tres.add(new Tuple<Weapon, Integer>(new Munition(\"Shuriken\",TypeDamage.P,\"_\",1,0.25), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Serpe\", Type.CAC_LIGHT, TypeDamage.T ,TypeMaterial.STEEL,6,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Fronde\", new Munition(\"Bille\",0.25),TypeDamage.C,null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Lance\", Type.CAC_2M, TypeDamage.P, TypeMaterial.STEEL,2,3), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Trident\", Type.CAC_1M,TypeDamage.P, TypeMaterial.STEEL,15,2), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Marteau de guerre\", Type.CAC_1M,TypeDamage.C, TypeMaterial.STEEL,12,2.5), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Fouet\", Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,1,1), 1));\n\t\t//Cas des armes a choisir manuellement.\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Autre arme de corps à corps légère\", Type.CAC_LIGHT, TypeDamage.NOTHING, null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Autre arme de corps à corps à une main\", Type.CAC_1M, TypeDamage.NOTHING, null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Autre arme de corps à corps à deux mains\", Type.CAC_2M, TypeDamage.NOTHING, null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Autre arme à distance\", new Munition(\"Autre munition\",0), TypeDamage.NOTHING,null,0,0), 2));\n\t\t\n\t\treturn res;\n\t}",
"java.util.List<proto.Achievement> \n getAchievementsList();",
"java.util.List<com.google.devtools.kythe.proto.Analysis.FileInfo> \n getEntryList();",
"public List<LeagueTableEntry> getTableEntries() {\n\t\treturn entries;\n\t}",
"java.util.List<WorldUps.UGoDeliver> \n getDeliveriesList();",
"java.util.List<com.lvl6.proto.QuestProto.FullQuestProto> \n getNewlyAvailableQuestsList();",
"@Override\n\t\tpublic List<? extends MyHashMap.Entry<K, V>> getEntries() {\n\t\t\treturn e;\n\t\t}",
"java.util.List<com.message.EquipmentProto.PlayerEquipmentMsg> \n getListPlayerEquipmentsList();",
"public Set<String> getEntriesName(){\n return _entries.keySet(); \n }",
"private ArrayList<HashMap<String, String>> getList(){\n return alertList;\n }",
"private List<itemInfo> getNewEntries() {\n\n final List<itemInfo> entries = new ArrayList<itemInfo>();\n return entries;\n }",
"java.util.List<com.rpg.framework.database.Protocol.Monster> \n getMonstersList();",
"java.util.List<com.rpg.framework.database.Protocol.Monster> \n getMonstersList();",
"ArrayList<HabitEvent> getHabitEvents();",
"public List<Tour> getHotTours() {\n return tourRepository.findHotTours();\n }",
"java.util.List<WorldUps.UInitTruck> \n getTrucksList();",
"@Override\n public NavigableMap<LocalDateTime, List<Gadget>> getGadgetListWithKeys() {\n return Collections.unmodifiableNavigableMap(orders);\n }",
"public static ArrayList<Ticket> getTickets() {\r\n\t\treturn ticketsBar;\r\n\t}",
"List<TrackerPayload> getBuffer();",
"public static ArrayList<Player> getWinners(){return winners;}",
"ArrayList<Habit> getHabits();",
"public java.util.List<com.google.devtools.kythe.proto.Analysis.FileInfo.Builder> \n getEntryBuilderList() {\n return getEntryFieldBuilder().getBuilderList();\n }",
"public static List<CommandHistoryEntry> getTypicalEntries() {\n return new ArrayList<>(Arrays.asList(HELP, HISTORY_ALL, HELP, HISTORY_FIVE, HISTORY_FIVE));\n }",
"@Override\r\n\tpublic List<String> getHITS()\r\n\t{\r\n\r\n\t\tlogger.info(\"Getting HITS...\");\r\n\t\tHITS<Entity, EntityGraphEdge> ranker = new HITS<Entity, EntityGraphEdge>(\r\n\t\t\t\tdirectedGraph);\r\n\t\tlogger.info(\"Ranker was created.\");\r\n\t\tlogger.info(\"Evaluating...\");\r\n\t\tranker.evaluate();\r\n\r\n\t\tlogger.info(\"Got HITS.\");\r\n\t\tCollection<Entity> vertices = directedGraph.getVertices();\r\n\t\tList<String> rankingList = new ArrayList<String>();\r\n\t\tFormat formatter = new DecimalFormat(\"%7.6f\");\r\n\r\n\t\tfor (Entity vertex : vertices) {\r\n\t\t\trankingList.add(\"hub=\"\r\n\t\t\t\t\t+ formatter.format(ranker.getVertexScore(vertex).hub)\r\n\t\t\t\t\t+ \" authority=\"\r\n\t\t\t\t\t+ formatter.format(ranker.getVertexScore(vertex).authority)\r\n\t\t\t\t\t+ \" \" + vertex);\r\n\t\t\t// logger.info(\"HITS ranking for \" + vertex.getVertexEntity() +\r\n\t\t\t// \" : \" + ranker.getRankScore(vertex));\r\n\t\t}\r\n\r\n\t\tCollections.sort(rankingList);\r\n\t\tCollections.reverse(rankingList);\r\n\t\t// logger.info(\"Sorted PageRankings: \" + rankingList);\r\n\t\t// ranker.printRankings(false, true);\r\n\r\n\t\treturn rankingList;\r\n\t}",
"public List<Enemy> getEnemies();",
"public java.util.List<com.google.devtools.kythe.proto.Analysis.FileInfo> getEntryList() {\n return entry_;\n }",
"public LinkedList<MapEntry<String, Integer>> entrySet(){\r\n return this.list;\r\n }",
"public List<Engineer> getListFromDB(){\n\t\treturn engineerList;\n\t}",
"public Tracker getTracker() {\n return tracker;\n }",
"java.util.List<WorldUps.UTruck> \n getTruckstatusList();",
"Tracker getFeatureEngagementTracker();",
"@Override\r\n\tpublic Vector getEntries() throws NotesApiException {\n\t\treturn null;\r\n\t}",
"public List<ReportType> getEntries(){\n\t\tList<ReportType> reportTypes = new ArrayList<>(warningList);\n\t\treportTypes.addAll(errorList);\n\t\treturn reportTypes;\n\t}",
"java.util.List<com.rpg.framework.database.Protocol.Quest> \n getQuestList();",
"TrackerListResolution getTrackerListResolution(final Integer id);",
"public Vector<String> getAllLaunchersIds() {\n\t\tVector<String> visibleIds = new Vector<>();\n\n\t\tfor (EnemyLauncher el : enemyLauncherArr) {\n\t\t\tif (el.isAlive()) {\n\t\t\t\tvisibleIds.add(el.getLauncherId());\n\t\t\t}\n\t\t}\n\n\t\tif (visibleIds.size() == 0)\n\t\t\treturn null;\n\n\t\treturn visibleIds;\n\t}",
"public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }",
"public BuffList buffs();",
"public ArrayList<Tile> getPlayerHand(){\n return playerHand;\n }",
"public List<Gadget> getGadgetList() {\n List<Gadget> gadgets = new ArrayList<>();\n orders.entrySet().stream().forEach((s) -> s.getValue().forEach((s1) -> gadgets.add(s1)));\n return gadgets;\n }",
"ArrayList<Ability> getAbilities() throws RemoteException;",
"public Entry[] getEntries()\n\t{\n\t\treturn entries;\n\t}",
"TrackerListStatus getTrackerListStatus(final Integer id);",
"public WeaponInterface getWeaponTab() {\r\n return player.getExtension(WeaponInterface.class);\r\n }",
"private static void getFighterCoordinateList()\n\t\tthrows IOException\n\t{\n\t\tgetUnitsCoordinateDict();\n\t\tfighter_coordinate_list = unit_coordinate_dict.get(\"Fighter\");\n\t}",
"java.util.List<com.rpg.framework.database.Protocol.MonsterState> \n getDataList();",
"public List<Attack> getAttacks()\n\t{\n\t\treturn attacks;\n\t}",
"public void addPreferedWeapon() {\n\t\tfor(int i = 0; i < killers.size(); i++) {\n\t\t\t\n\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\n\t\t\tfor(String key : killers.get(i).getWeapons().keySet()) {\n\t\t\t\tlist.add(killers.get(i).getWeapons().get(key) + \";\" + key);\n\t\t\t}\n\t\t\t\n\t\t\tComparator<String> comp = (s1, s2) -> {\n\t\t\t\treturn s1.compareTo(s2);\n\t\t\t};\n\t\t\t\n\t\t\tCollections.sort(list, Collections.reverseOrder(comp));\n\t\t\tList<String> list2 = new ArrayList<>();\n\t\t\t\n\t\t\tif(!list.isEmpty()) {\n\t\t\t\tint control = extractNumberFromText(list.get(0));\n\t\t\t\t\n\t\t\t\tlist.forEach(s -> {\n\t\t\t\t\tif(extractNumberFromText(s) == control)\n\t\t\t\t\t\tlist2.add(s);\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tkillers.get(i).setWeaponMoreUsed(list2);\n\t\t}\n\t}",
"private HashMap<String, Weapon> readWeapons() {\n JSONObject weaponsData = getAssetJson(\"weapons.json\").getJSONObject(\"weapons\");\n HashMap<String, Weapon> weapons = new HashMap<>();\n\n for(String categoryName : weaponsData.keySet()) {\n Weapon.CATEGORY category = Weapon.CATEGORY.fromName(categoryName);\n JSONObject categoryWeaponsData = weaponsData.getJSONObject(categoryName);\n final String categoryPath = Weapon.BASE_PATH + categoryName + \"/\";\n\n for(String weaponId : categoryWeaponsData.keySet()) {\n JSONObject weaponData = categoryWeaponsData.getJSONObject(weaponId);\n\n weapons.put(\n weaponId,\n new Weapon(\n weaponId,\n weaponData.getString(NAME_KEY),\n category,\n weaponData.getInt(\"cost\"),\n resourceHandler.getImageResource(categoryPath + weaponId + \".png\")\n )\n );\n }\n }\n\n return weapons;\n }",
"public ArrayList<Entry> getEntries() {\n return entries;\n }",
"public Object getEntries() {\n\t\t\treturn null;\n\t\t}",
"private void getEntries() {\r\n\r\n\t\tif(displayEntries.size() > 0){\r\n\t\t\tfor (int i = 0; i<displayEntries.size(); i++){\r\n\t\t\t\tNameSurferEntry entries = displayEntries.get(i);\r\n\t\t\t\tdrawRankGraph(entries,i);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public List<Tile> getOwnedTiles() {\n return new ArrayList<Tile>(ownedTiles);\n }",
"public List<Projectile> getFiredProjectiles()\n {\n return new ArrayList<Projectile>(firedArrows);\n }",
"@Override\n\tpublic List<Affectation> trackEquipmentByAff(int idEquip) {\n\t\treturn dao.trackEquipmentByAff(idEquip);\n\t}",
"public java.util.List<WorldUps.UGoPickup> getPickupsList() {\n return pickups_;\n }",
"TrackerListOs getTrackerListOs(final Integer id);",
"ArrayList<Tile> getTilesPlayerOne() throws RemoteException;",
"java.util.List<Pokemon.Payload> \n getPayloadList();",
"List<SpawnType> getSpawnTypes();",
"@Override\n public String getEntLS() {\n return \"Enemies\";\n }",
"public List<Treasure> giveInventory() {\r\n return treasures;\r\n }",
"java.util.List<message.Figure.FigureData.FigureLevelTable> \n getLevelTableListList();",
"@Override\n\tpublic List<Tempolyee> doGetUnderlings(Tempolyee item) {\n\t\tString level = Tempolyee.getNextLevel(item.getGroup());\n\t\tString hql = \"from Tempolyee where district = ? and group = ?\";\n\t\treturn empdao.select(hql, new Object[] { item.getDistrict(), level });\n\n\t}",
"private ArrayList<JSONObject> loadCurrentTrackingObjects() {\n ArrayList<JSONObject> currentTrackingObjects = new ArrayList<JSONObject>();\n\n SharedPreferences prefs = context.getSharedPreferences(TRACKING_EVENTS_STORAGE, Context.MODE_PRIVATE);\n if (prefs.getAll().isEmpty()) {\n return null;\n }\n\n TreeMap<String, ?> keys = new TreeMap<String, Object>(prefs.getAll());\n for (Map.Entry<String, ?> entry : keys.entrySet()) {\n String data[] = ((String)entry.getValue()).split(\";\");\n currentTrackingObjects.add(buildTrackingItemObject(data[0], data[1], data[2], Long.parseLong(data[3])));\n }\n\n return currentTrackingObjects;\n }",
"public HabitList getHabit_list() {\n return this.habit_list;\n }",
"List<Runnable> getItemListeners();",
"@Override\n public ArrayList<Entity> getEntities() {\n ArrayList<Entity> enemies = new ArrayList<>();\n\n // Fire Dragon (Near Starting Area)\n enemies.add(new Enemy(\"Dracoflame\", 31, 32) {\n @Override\n public void doAction() {\n //Globals.SBG.enterState(Globals.STATES.get(\"CHALLENGE\"));\n }\n });\n\n // Evil Tree (Far Right)\n enemies.add(new Enemy(\"Trevil\", 90, 40) {\n @Override\n public void doAction() {\n //Globals.SBG.enterState(Globals.STATES.get(\"CHALLENGE\"));\n }\n });\n\n // Evil Mushroom (Bottom Left)\n enemies.add(new Enemy(\"Mycovolence\", 72, 80) {\n @Override\n public void doAction() {\n //Globals.SBG.enterState(Globals.STATES.get(\"CHALLENGE\"));\n }\n });\n\n // Ship\n enemies.add(new Enemy(\"SailingShip\", 11, 76) {\n @Override\n public void doAction() {\n //Globals.SBG.enterState(Globals.STATES.get(\"CHALLENGE\"));\n }\n });\n\n return enemies;\n }",
"public java.util.List<com.google.devtools.kythe.proto.Analysis.FileInfo> getEntryList() {\n if (entryBuilder_ == null) {\n return java.util.Collections.unmodifiableList(entry_);\n } else {\n return entryBuilder_.getMessageList();\n }\n }",
"public ArrayList<Enemy> getDefeated() {\n return defeated;\n }",
"public HashMap<Integer, Sprite> getVillagers() {\n\t\tfor (int i = 0; i < player.getPartyMembers().size(); i++) {\n\t\t\tint h = player.getPartyMembers().get(i).hashCode();\n\t\t\tsprites.remove(h);\n\t\t}\n\t\tupdateSpriteList();\n\t\treturn sprites;\n\t}",
"public ArrayList<AttackObject> getAttacks() {\n return attacks;\n }"
] | [
"0.63146985",
"0.5881597",
"0.58690715",
"0.58273333",
"0.579003",
"0.5767179",
"0.57567614",
"0.5717267",
"0.56674117",
"0.5654588",
"0.5654171",
"0.5643158",
"0.56050956",
"0.55837166",
"0.5565178",
"0.5510716",
"0.5496435",
"0.5494807",
"0.5486252",
"0.54337996",
"0.5382259",
"0.53555393",
"0.53544396",
"0.5352761",
"0.5344932",
"0.53361017",
"0.53346103",
"0.53063077",
"0.530271",
"0.52998835",
"0.5293017",
"0.52759445",
"0.5275541",
"0.52636635",
"0.526011",
"0.5235072",
"0.52138853",
"0.52129036",
"0.5209975",
"0.5199029",
"0.5198631",
"0.5191799",
"0.5186437",
"0.51810527",
"0.5165179",
"0.5159598",
"0.5150783",
"0.5131999",
"0.5113871",
"0.5112051",
"0.5108834",
"0.5106459",
"0.51025766",
"0.51018393",
"0.51010436",
"0.51003045",
"0.50981325",
"0.509054",
"0.5089685",
"0.5084305",
"0.5083378",
"0.50794834",
"0.5079101",
"0.5071181",
"0.5070225",
"0.50587887",
"0.50572914",
"0.504741",
"0.50315654",
"0.5029376",
"0.50257427",
"0.50251824",
"0.50236297",
"0.5018833",
"0.5006273",
"0.50038123",
"0.49967867",
"0.499443",
"0.4991104",
"0.49896675",
"0.49890873",
"0.49872598",
"0.4984914",
"0.49773484",
"0.49767715",
"0.49743629",
"0.49735928",
"0.49718812",
"0.49664044",
"0.49650493",
"0.49643672",
"0.49494848",
"0.49454606",
"0.49453482",
"0.49444357",
"0.49435258",
"0.49430996",
"0.49379423",
"0.49366584",
"0.4934582"
] | 0.71061265 | 0 |
Returns the current state of the player | public String toString(){
String s = "id: " + Byte.toString(id) + " ";
s+= "name: "+name+ " ";
s+= "hp: " + Byte.toString(hp) + " ";
s+= "xPos: " + Short.toString(xPos)+" ";
s+= "yPos: " + Short.toString(yPos)+"\n";
for (Pair<Byte,Short> pair : weapons){
s+= "weaponId: " + Byte.toString(pair.getKey()) + " " + "ammo: " + Short.toString(pair.getValue())+'\n';
}
s+= "Bullets fired:"+'\n';
for(Bullet b : bulletsFired){
s+= b.toString()+'\n';
}
s+= "Weapons tracked:"+'\n';
for(Byte b : weaponEntryTracker){
s+= Byte.toString(b)+'\n';
}
s+= "initial y: " +Short.toString(initial_y)+'\n';
s+= "current weapon: " + Byte.toString(currentWeapon.getKey()) + " ammo: " + Short.toString(currentWeapon.getValue())+'\n';
s+= "shooting direction: " +Short.toString(shootingDirection)+'\n';
return s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Player getState() {\n\t\treturn state;\n\t}",
"public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }",
"public PlayerState getPlayerState() {\r\n return playerState;\r\n }",
"PlayerState getPlayerState() {\n return playerState;\n }",
"public PlayerState getPlayerState() {\n return this.playerState;\n }",
"public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}",
"public GameState GetState(){\n\t\treturn this.state;\n\t}",
"public GameState getState() {\n\t\treturn state;\n\t}",
"@PlayerState\n public abstract int getPlayerState();",
"public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}",
"public byte getState(){\n\t\t/*\n\t\tOFFLINE((byte)0),\n ONLINE((byte)1),\n SAVING((byte)2);\n\t\t */\n\t\t//getWorld().getcWorld().update(this);\n\t\treturn state;\n\t}",
"public int getCurrentState() {\n return myState;\n }",
"public GameState getGameState();",
"public GameObjectState getState() {\r\n\t\treturn state;\r\n\t}",
"public String getCurrentState() {\n\t\treturn currentState;\n\t}",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"int getState();",
"public PlaybackStateCompat getPlaybackState() {\n }",
"public S getCurrentState();",
"public GameState getGameState() {\n return this.state;\n }",
"public String toString() {\r\n\t\treturn gameState;\r\n\t}",
"public PlaybackStateCompat getPlaybackState() {\n }",
"Player getCurrentPlayer();",
"Player getCurrentPlayer();",
"public int getCurrentPlayer() {\n return player;\n }",
"public String getCurrentPlayer() {\n return currentPlayer;\n }",
"PowerState getState();",
"public PlayerState getEnemy()\n {\n if(this.turnOfPlayer == playerBlack)\n {\n return playerWhite;\n }\n return playerBlack;\n }",
"public GameState getGameState() {\n return this.gameState;\n }",
"Player currentPlayer();",
"public int activePlayer() {\n return this.activePlayer;\n }",
"String getState();",
"String getState();",
"String getState();",
"public String getState( )\r\n {\r\n if (isEating)\r\n return \"Eating\"; // Exit method w/ current state\r\n\r\n if (isSleeping)\r\n return \"Sleeping\";\r\n\r\n return \"Error in State\";\r\n }",
"public String getStateOfPlayer(PlayerController playerController)\n {\n // This function is used to print the state of the player\n String str = \"\";\n str += \"Player ID:\"+playerController.getPlayerId()+\" Points-> \"+playerController.getPoints()+\" Total_Fouls_Count-> \"+ playerController.getTotalFoulsCount()+ \" Recent_Unsuccessful_Attempts_Count -> \"+ playerController.getRecentUnsuccessfulAttemptsCount();\n return str;\n }",
"String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }",
"public int getCurrentPlayer(){\n return this.currentPlayer;\n }",
"interface GameState {\n String WAITING_FOR_SECOND_PLAYER = \"WAITING_FOR_SECOND_PLAYER\";\n String TURN_HARE = \"TURN_HARE\";\n String TURN_HOUND = \"TURN_HOUND\";\n String WIN_HARE_BY_ESCAPE = \"WIN_HARE_BY_ESCAPE\";\n String WIN_HARE_BY_STALLING = \"WIN_HARE_BY_STALLING\";\n String WIN_HOUND = \"WIN_HOUND\";\n }",
"public int getActivePlayer() {\n return activePlayer;\n }",
"public CoreState getCurrentStatus() {\n return doStuffStrategy.determineCurrentStatus(this, 3000);\r\n }",
"public State getCurrentState() {\n \t\treturn currentState;\n \t}",
"public int getCurrentPlayer() {\n\t\treturn player;\n\t}",
"public int getState();",
"public int getState();",
"public int getState();",
"public int getState();",
"public String state() {\n\treturn state(points, temperature, currentStateEnergy);\n }",
"State getState();",
"State getState();",
"State getState();",
"State getState();",
"public GameState getGameState(){\n return this.gameState;\n }",
"public Player getCurrentPlayer()\n\t{\n\t\treturn current;\n\t}",
"@Override\n public GameState getGameState() {\n return this.gameState;\n }",
"public GameStatus getStatus() {\n\t\treturn status;\n\t}",
"public State getState();",
"public State getState();",
"@Override\n public BattleState getBattleState() {\n return state;\n }",
"public boolean isCurrentPlayer() {\n return playerStatus.isActive;\n }",
"public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}",
"public int getStateOfMovement(){ return stateOfMovement; }",
"public @Nullable PlaybackState getPlaybackState() {\n try {\n return mSessionBinder.getPlaybackState();\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling getPlaybackState.\", e);\n return null;\n }\n }",
"public Player getCurrentPlayer() {\n return currentPlayer;\n }",
"public Player getCurrentPlayer() {\n return currentPlayer;\n }",
"Object getState();",
"public Player getCurrentPlayer(){\n return this.currentPlayer;\n }",
"public byte getState() {\n return myState;\n }",
"public State getCurrentState() {\n\t\treturn currentState;\n\t}",
"public State getCurrentState() {\n\t\treturn currentState;\n\t}",
"public int getCurrentPlayerIndex(){\r\n return currentPlayerIndex;\r\n }",
"public void displayCurrentState(State game);",
"public int getState()\r\n\t{\r\n\t\treturn currentstate;\r\n\t}",
"public TurtleState getCurrentState() {\n\t\treturn states.peek();\n\t}",
"@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}",
"java.lang.String getState();",
"public String getLocalState()\n {\n return localState;\n }",
"public State getMyCurrentState () {\n return myCurrentState;\n }",
"public int getState() {return state;}",
"public int getState() {return state;}",
"public char getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}",
"GameState getGameState() {\n return gameState;\n }",
"public String getCurrentState() {\n PPPoED.Type lastReceivedPkt = PPPoED.Type.getTypeByValue(this.packetCode);\n switch (lastReceivedPkt) {\n case PADI:\n return PppoeAgentEvent.Type.START.name();\n case PADR:\n case PADO:\n return PppoeAgentEvent.Type.NEGOTIATION.name();\n case PADS:\n return PppoeAgentEvent.Type.SESSION_ESTABLISHED.name();\n case PADT:\n // This case might never happen (entry is being removed on PADT messages).\n return PppoeAgentEvent.Type.TERMINATE.name();\n default:\n return PppoeAgentEvent.Type.UNKNOWN.name();\n }\n }",
"public AeBpelState getState();",
"public Player getActivePlayer() {\r\n return activePlayer;\r\n }",
"@Override\n public String getState() {\n\n if(this.state == null){\n\n this.state = TestDatabase.getInstance().getClientField(token, id, \"state\");\n }\n\n return state;\n }",
"public String getGameStatus() {\n return gameStatus;\n }",
"public State getCurrentState() {\n return currentState;\n }",
"public StateName getCurrentState() {\n for (Map.Entry<StateName, StateI> entry : availableStates.entrySet()) {\n if (entry.getValue().equals(curState)) {\n return entry.getKey();\n }\n }\n return null;\n }",
"public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }",
"public Player currentPlayer() {\n\t\treturn (currentPlayer);\n\t}",
"public State getState()\n\t{\n\t\treturn getState(conferenceInfo);\n\t}",
"public S getState() {\n return currentState;\n }",
"public KetchLeader.State getState() {\n\t\treturn state;\n\t}",
"public static States getState() {\r\n\t\treturn currentState;\r\n\t}",
"public Player getActivePlayer() {\n return activePlayer;\n }",
"public String getState() {\n\t\treturn state.toString();\n\t}"
] | [
"0.839302",
"0.8231771",
"0.8215764",
"0.80978733",
"0.8060585",
"0.793714",
"0.7443073",
"0.72387475",
"0.707327",
"0.7049288",
"0.7000623",
"0.6961289",
"0.6926758",
"0.6862818",
"0.6832052",
"0.682592",
"0.682592",
"0.682592",
"0.682592",
"0.682592",
"0.682592",
"0.68257105",
"0.68167937",
"0.6813918",
"0.6796207",
"0.6787456",
"0.6777094",
"0.6777094",
"0.6751957",
"0.6708357",
"0.6708189",
"0.6707924",
"0.6689151",
"0.66751057",
"0.66747504",
"0.6662007",
"0.6662007",
"0.6662007",
"0.6657161",
"0.6647241",
"0.6642626",
"0.66342646",
"0.6627346",
"0.66236615",
"0.6622048",
"0.66131026",
"0.6607035",
"0.6605636",
"0.6605636",
"0.6605636",
"0.6605636",
"0.65933347",
"0.65912986",
"0.65912986",
"0.65912986",
"0.65912986",
"0.65908414",
"0.6557859",
"0.6555784",
"0.654337",
"0.6542384",
"0.6542384",
"0.65221566",
"0.6514022",
"0.65139204",
"0.65131426",
"0.65126884",
"0.6505092",
"0.6505092",
"0.6504753",
"0.648381",
"0.64801115",
"0.64610535",
"0.64610535",
"0.64609456",
"0.64595354",
"0.6450221",
"0.6449874",
"0.64339536",
"0.6432622",
"0.6431529",
"0.64254284",
"0.6424085",
"0.6424085",
"0.6417956",
"0.64061993",
"0.64056367",
"0.6403866",
"0.6395141",
"0.6391939",
"0.6389969",
"0.63896734",
"0.6384892",
"0.63818455",
"0.6368423",
"0.6365796",
"0.6364931",
"0.6361042",
"0.6348723",
"0.6339612",
"0.633152"
] | 0.0 | -1 |
Sets the list of bullets the player has fired to a new list | public void setBulletsFired(ArrayList<Bullet> bullets) {
if(!bulletsFired.isEmpty()) {
//System.out.println(bullets.get(0).getxPos() != bulletsFired.get(0).getxPos());
this.bulletsFired = bullets;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}",
"public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }",
"public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}",
"private void multiBulletFire() {\n\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 20, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) - 10, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 50, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t}",
"public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }",
"private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }",
"public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }",
"private void quickFireBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Pink\"));\n\t}",
"@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }",
"public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }",
"public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }",
"public void setBullet(Bullet bullet) {\r\n\t\tthis.bullet = bullet;\r\n\t}",
"public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}",
"private void speedBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Yellow\"));\n\n\t\tfor (int i = 0; i < bulletArrayList.size(); i++) {\n\t\t\tbulletArrayList.get(i).setSpeed(5);\n\t\t}\n\t}",
"public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}",
"public ArrayList<Bullet> getBulletsFired(){\n return this.bulletsFired;\n }",
"public ArrayList<Bullet> getNewBullets()\r\n\t{\r\n\t\tArrayList<Bullet> fire = new ArrayList<Bullet>();\r\n\t\tfor (Bullet bullet : bullets)\r\n\t\t{\r\n\t\t\tif (bullet instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\tfire.add(new AvatarBullet((AvatarBullet) bullet));\r\n\t\t\t}\r\n\t\t\telse if (bullet instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tfire.add(new EnemyBullet((EnemyBullet) bullet));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fire;\r\n\t}",
"public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }",
"public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }",
"public void setBullet(Bullet _bul) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n bul = _bul;\n }",
"public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }",
"void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }",
"public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }",
"public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }",
"public List<AProjectile> getBullets() {\n return bullets;\n }",
"public void fireBullet(int direction , int posX, int posY ){\n if ( clockBullet.getElapsedTime().asMilliseconds() > 100 ){\n int lowestbulletNo = 10;\n for( int i = 9; i > 0; i-- ){\n if ( bulletSpace.get(i).isEnabled() == false){\n lowestbulletNo = i;//find the first bullet in the gun barrol\n }\n }\n\n if ( lowestbulletNo < 10 ){\n bulletSpace.get(lowestbulletNo).setDirection(direction);\n bulletSpace.get(lowestbulletNo).setDistance(0);\n bulletSpace.get(lowestbulletNo).setPosX(posX - map.getX()) ;\n bulletSpace.get(lowestbulletNo).setPosY(posY - map.getY()) ;\n bulletSpace.get(lowestbulletNo).enabled(true);\n bulletSpace.get(lowestbulletNo).setRotation(direction+1);\n }\n }\n clockBullet.restart();\n }",
"public void moveBullets() {\n bController.increment();\n }",
"public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }",
"private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}",
"public void setBullet (boolean flag) {\n\t\tbody.setBullet(flag);\n\t}",
"public void onBulletHit(BulletHitEvent event) {\n RobotReference hitRobot;\n hitRobot = robots.get(event.getName());\n\n if (hitRobot.isTeammate()) {\n setTurnRight(90);\n setAhead(400);\n setChargerTarget();\n }\n }",
"public void shoot(int bulletLeft) {\n float xValue = canon.getX();\n float yValue = canon.getY();\n bullets.get(bulletLeft).setVisibility(View.VISIBLE);\n shootingMotion(bullets.get(bulletLeft), xValue, yValue);\n\n }",
"public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}",
"public void fire() {\n\n\t\t// A player cannot continually fire, there is a delay between each bullet.\n\t\tif (isAbleToFire) {\n\n\t\t\taudio.playMusic(\"Audio/Fire.wav\");\n\n\t\t\tif (multiBulletIsActive) {\n\n\t\t\t\tmultiBulletFire();\n\n\t\t\t} else if (speedBulletIsActive) {\n\n\t\t\t\tspeedBulletFire();\n\n\t\t\t} else if (quickFireBulletIsActive) {\n\n\t\t\t\tquickFireBulletFire();\n\n\t\t\t} else {\n\n\t\t\t\t// Single fire.\n\t\t\t\t// Adjust bullet position to be fired from the center of the player.\n\t\t\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition,\n\t\t\t\t\t\tbulletWidth, bulletHeight, \"Red\"));\n\t\t\t}\n\n\t\t\t// Stop the player from being able to fire for 'ticksBetweemFire' amount.\n\t\t\tticksToNextFire = currentTickCount + ticksBetweenFire;\n\t\t}\n\t}",
"private void clearBullet()\n {\n if(playerBullets.size() > 0)\n {\n for(int i = 0; i < playerBullets.size(); ++i)\n {\n int x = playerBullets.get(i).getRectangle().centerX(), y = playerBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n playerBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n if(enemyBullets.size() > 0)\n {\n for(int i = 0; i < enemyBullets.size(); ++i)\n {\n int x = enemyBullets.get(i).getRectangle().centerX(), y = enemyBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n enemyBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n }",
"@Override\n\tpublic void onCreateBulletEvent() {\n\t\tcreateBullet();\n\t}",
"@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprivate void drawListEntity(ArrayList list) {\n\t\tArrayList listRemove = new ArrayList();\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tEntity ent = (Entity) list.get(i);\n\t\t\t\n\t\t\tdrawEntity(ent);\n\t\t\t\n\t\t\t// if the entity is still in the screen, update its position\n\t\t\tif (ent.continueDrawing()) {\n\t\t\t\tif (ent instanceof Bullet) {\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"enemy_bullet\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 8);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"laser\")) {\n\t\t\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"boss_bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Enemy) {\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"green_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 5);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"red_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 3);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"boss\") && bossExplosionNum == 0) {\n\t\t\t\t\t\tif (ent.getX() <= 0)\n\t\t\t\t\t\t\tbossMovement = 3;\n\t\t\t\t\t\tif (ent.getX() >= displayWidth - ((Enemy) ent).getSprite().getWidth())\n\t\t\t\t\t\t\tbossMovement = -3;\n\t\t\t\t\t\tif (ent.getY() <= 30)\n\t\t\t\t\t\t\tent.setY(ent.getY() + 1);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tent.setX(ent.getX() + bossMovement);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Explosion) {\n\t\t\t\t\tif (((Explosion) ent).getName().equals(\"player_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX());\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY());\n\t\t\t\t\t} else if (((Explosion) ent).getName().equals(\"enemy_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX() - 5);\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY() - 5);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Powerup) {\n\t\t\t\t\tent.setY(ent.getY() + 4);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// else if the entity is outside of the screen, remove it\n\t\t\telse {\n\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\n\t\t\t\t// handles the boss explosions\n\t\t\t\thandleBossExplosions(list, listRemove, i);\n\t\t\t}\n\t\t\t\n\t\t\t// if the player is dead, notify the player of death\n\t\t\tif (stopDrawingPlayer || gameWon) {\n\t\t\t\tnotifyGameOver();\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < listRemove.size(); i++) {\n\t\t\tlist.remove(listRemove.get(i));\n\t\t}\n\t\tlistRemove.clear();\n\t}",
"protected ArrayList<Bullet> getBullets()\r\n\t{\r\n\t\treturn bullets;\r\n\t}",
"public void fire() {\n \tAlienMissile.Slope slps[] = {AlienMissile.Slope.ShallowLeft, \n AlienMissile.Slope.Down,\n AlienMissile.Slope.ShallowRight};\n for (AlienMissile.Slope i : slps) {\n AlienMissile m = new AlienMissile(this, i);\n m.setBounce(true, health/5);\n list.add(m);\n }\n }",
"@Override\n public void update(GameContainer gc, StateBasedGame stateBasedGame, int delta) throws SlickException {\n timeSinceStart += delta;\n rtimeSinceStart += delta;\n Input input = gc.getInput();\n int mouseX = input.getMouseX();\n int mouseY = input.getMouseY();\n\n\n basicbulletSheet.rotate(90f);\n basicbulletSheet.setCenterOfRotation(16, 16);\n\n // Move this bullet\n for (int i = 0; i < bulletList.size(); i++) {\n bullet = bulletList.get(i);\n bullet.move();\n }\n\n //Add this tower to the this towerList\n if (Tower.isBasicPlaced()) {\n basicTowers.add(new BasicTower());\n System.out.println(basicTowers);\n Tower.setBasicPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isBomberPlaced()) {\n bomberTowers.add(new BomberTower());\n System.out.println(bomberTowers);\n Tower.setBomberPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isSniperPlaced()) {\n sniperTowers.add(new SniperTower());\n System.out.println(sniperTowers);\n Tower.setSniperPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isQuickPlaced()) {\n quickTowers.add(new QuickTower());\n System.out.println(quickTowers);\n Tower.setQuickPlaced(false);\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BasicTower basicTower1 : basicTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > basicTower1.rcoolDown + basicTower1.rlastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n basicTower1.basicClicked.setRotation((float) getTargetAngle(basicTower1.towerX,\n basicTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n basicTower1.basicClicked.setCenterOfRotation(32, 32);\n basicTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > basicTower1.coolDown + basicTower1.lastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n addNewBullet2(basicTower1.towerX, basicTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n basicTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BomberTower bomberTower1 : bomberTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > bomberTower1.rcoolDown + bomberTower1.rlastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n bomberTower1.bomberClicked.setRotation((float) getTargetAngle(bomberTower1.bombertowerX,\n bomberTower1.bombertowerY, enemy.getStartPosX(), enemy.getStartPosY()));\n bomberTower1.bomberClicked.setCenterOfRotation(32, 32);\n bomberTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > bomberTower1.coolDown + bomberTower1.lastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n addNewBullet2(bomberTower1.bombertowerX, bomberTower1.bombertowerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n bomberTower1.lastShot = timeSinceStart;\n }\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (SniperTower sniperTower1 : sniperTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > sniperTower1.rcoolDown + sniperTower1.rlastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n sniperTower1.sniperClicked.setRotation((float) getTargetAngle(sniperTower1.towerX,\n sniperTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n sniperTower1.sniperClicked.setCenterOfRotation(32, 32);\n sniperTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n if (timeSinceStart > sniperTower1.coolDown + sniperTower1.lastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n addNewBullet2(sniperTower1.towerX, sniperTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 50);\n sniperTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (QuickTower quickTower1 : quickTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > quickTower1.rcoolDown + quickTower1.rlastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n quickTower1.quickClicked.setRotation((float) getTargetAngle(quickTower1.towerX,\n quickTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n quickTower1.quickClicked.setCenterOfRotation(32, 32);\n quickTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n\n if (timeSinceStart > quickTower1.coolDown + quickTower1.lastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n radiusVisited = true;\n addNewBullet2(quickTower1.towerX, quickTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 5);\n quickTower1.lastShot = timeSinceStart;\n }\n }\n\n }\n }\n\n //A spawn is in progress\n if (spawninProgress) {\n timePassedEnemy += delta;\n if (timePassedEnemy > 800) {\n enemies.add(new Enemy());\n enemySpawns++;\n timePassedEnemy = 0;\n }\n }\n //When enough enemies has spawned, stop the spawninProgress\n if (enemySpawns == enemyCounter) {\n spawninProgress = false;\n //hasbeenDead = false;\n enemySpawns = 0;\n enemyCounter++;\n }\n\n //When no more enemies on maps\n if (enemies.size() == 0) {\n waveinProgress = false;\n startWaveCount = 0;\n }\n\n //Start a new level when there's no more enemies on the map\n if (loadMap.MAP[mouseY / w][mouseX / w] == 16) {\n if (input.isMousePressed(0) && startWaveCount == 0 && !waveinProgress) {\n startWaveCount++;\n if (startWaveCount == 1 && enemies.size() == 0 && !waveinProgress) {\n waveinProgress = true;\n gc.resume();\n spawninProgress = true;\n currentLevel++;\n }\n }\n }\n\n //For each new level, increase the HP of each enemy\n if (currentLevel < currentLevel + 1 && !waveinProgress) {\n for (Enemy enemyHP : enemies) {\n if (enemyHP.getStartPosX() <= 0 && enemyHP.getHP() < enemyHP.startHP + currentLevel) {\n enemyHP.setHP(enemyHP.getHP() + currentLevel);\n }\n }\n }\n\n\n //For each enemies, if enemies has finished their way, decrease player HP\n //and set them inactive\n for (Enemy enemyList : enemies) {\n if (enemyList.counter >= enemyList.path.getLength() - 1) {\n player.decreaseLife();\n bulletCount = 0;\n enemyList.isActive = false;\n }\n\n //If enemies' hp is zero, set them inactive and remove from the list\n if (enemyList.getHP() <= 0) {\n enemyList.isActive = false;\n bulletCount = 0;\n player.addCredits(20);\n }\n enemyList.update(gc, stateBasedGame, delta);\n }\n for (int i = 0; i < enemies.size(); i++) {\n if (!enemies.get(i).isActive) {\n enemies.remove(enemies.get(i));\n }\n }\n\n //For all objects, update\n for (GameObject obj : objects)\n try {\n obj.update(gc, stateBasedGame, delta);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //Go to Menu\n if (gc.getInput().isKeyPressed(Input.KEY_ESCAPE)) {\n gc.getInput().clearKeyPressedRecord();\n stateBasedGame.enterState(2);\n }\n\n\n }",
"@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}",
"public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }",
"private void update() {\n\t\t// checks to see if the w key is down\n\t\tif (wKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() - 8));\n\t\t}\n\t\t// checks to see if the a key is down\n\t\tif (aKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() - 8));\n\t\t}\n\t\t// checks to see if the s key is down\n\t\tif (sKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() + 8));\n\t\t}\n\t\t// checks to see if the d key is down\n\t\tif (dKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() + 8));\n\t\t}\n\t\t\n\t\t// checks to make sure the player is within the bounds\n\t\tcheckBounds();\n\t\t\n\t\t// checks to see if the left mouse button is clicked\n\t\tif (mouseDown) {\n\t\t\t// if doubleshot is activated\n\t\t\tif (doubleShot && bulletDelta > doubleShotShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the first bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\t// adds the second bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tlastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET2_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET2_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble doubleshotXChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble doubleshotYChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble doubleshotMagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\tdoubleshotXChange = xChange / doubleshotMagnitude * 20;\n\t\t\t\tdoubleshotYChange = yChange / doubleshotMagnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) doubleshotXChange);\n\t\t\t\tlastBullet.setYChange((int) doubleshotYChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a bullet is shot and the time since the last bullet is at least shootingSpeed\n\t\t\telse if (bulletShot && bulletDelta > bulletShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a laser is shot\n\t\t\telse if (laserShot) {\n\t\t\t\tif (Delta.getTime() % 6 == 0) {\n\t\t\t\t\t// plays the laser shooting sound\n\t\t\t\t\tsound.get(\"laserEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// adds the laser\n\t\t\t\tbullet.add(new Bullet(this, \"laser\", 0, 0, 20));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the laser\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getHeight() + BULLET_Y_OFFSET);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Checks to see if the time since the last enemy is greater than the enemy interval\n\t\tif (!bossSpawned && enemyDelta > generateEnemyInterval()) {\n\t\t\tdouble enemyGenerate = randomGenerator.nextDouble();\n\t\t\tif (enemyGenerate >= 0.3 || Delta.getDelta(\"beginning\") <= 10000)\n\t\t\t\tenemy.add(new Enemy(this, \"green_box\", 0, 0, 300, Delta.getDelta(\"beginning\"), 300));\n\t\t\telse if (enemyGenerate < 0.3)\n\t\t\t\tenemy.add(new Enemy(this, \"red_box\", 0, 0, 400, Delta.getDelta(\"beginning\"), 400));\n\t\t\tEnemy lastEnemy = enemy.get(enemy.size() - 1);\n\t\t\t\n\t\t\tlastEnemy.setX(lastEnemy.generateEnemyX());\n\t\t\tlastEnemy.setY(-lastEnemy.getSprite().getHeight());\n\t\t\tDelta.setLastEnemy(Delta.getTime());\n\t\t}\n\t\t\n\t\tif (bossExplosionNum == 0) {\n\t\t\t// Checks to see if enemy bullets should be generated\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tif (enemy.get(i).getName().equals(\"red_box\") && enemy.get(i).getTimeSinceLastBullet() >= 700) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"enemy_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (enemy.get(i).getName().equals(\"boss\") && enemy.get(i).getTimeSinceLastBullet() >= 1000) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\tdouble xChange = player.getX() - lastEnemyBullet.getX();\n\t\t\t\t\tdouble yChange = player.getY() - lastEnemyBullet.getY();\n\t\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() - 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() - 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() + 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() + 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// spawns the boss if 60 seconds has passed\n\t\tif (Delta.getDelta(\"beginning\") >= 60000 && !bossSpawned) {\n\t\t\tbossSpawned = true;\n\t\t\tenemy.add(new Enemy(this, \"boss\", 0, 0, 10000, Delta.getDelta(\"beginning\"), 500));\n\t\t\t\n\t\t\tEnemy boss = enemy.get(enemy.size() - 1);\n\t\t\tboss.setX(displayWidth / 2 - boss.getSprite().getWidth() / 2);\n\t\t\tboss.setY(-boss.getSprite().getHeight());\n\t\t}\n\t\t\n\t\t// checks for collisions\n\t\tif (bossExplosionNum == 0) {\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tEntity entity1 = enemy.get(i);\n\t\t\t\t\n\t\t\t\t// if a bullet collides with an enemy\n\t\t\t\tfor (int j = 0; j < bullet.size(); j++) {\n\t\t\t\t\tEntity entity2 = bullet.get(j);\n\t\t\t\t\t\n\t\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tEntity entity2 = player;\n\t\t\t\t\n\t\t\t\t// if the player collides with an enemy\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tEntity entity1 = player;\n\t\t\t// if an enemy bullet collides with the player\n\t\t\tfor (int i = 0; i < enemy_bullet.size(); i++) {\n\t\t\t\tEntity entity2 = enemy_bullet.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if a powerup collides with the player\n\t\t\tfor (int i = 0; i < powerup.size(); i++) {\n\t\t\t\tEntity entity2 = powerup.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if the player has defeated the boss\n\t\tif (gameWon && bossSpawned) {\n\t\t\t// draw Congratulations\n\t\t\tString congrats = \"Congratulations! You were able to vanquish\";\n\t\t\tString congrats2 = \"all of your evil thoughts and achieve nirvana!\";\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats) / 2, displayHeight / 2\n\t\t\t\t\t- congratsFont.getHeight(congrats) / 2 - 50, congrats);\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats2) / 2, displayHeight\n\t\t\t\t\t/ 2 - congratsFont.getHeight(congrats2) / 2 - 15, congrats2);\n\t\t\t\n\t\t\t// draw the score\n\t\t\tscoreFont.drawString(displayWidth / 2 - scoreFont.getWidth(\"Score: \" + totalCash) / 2, displayHeight\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Game Over!\")\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Score: \" + totalCash)\n\t\t\t\t\t/ 2 + 10 - 50, \"Score: \" + totalCash);\n\t\t}\n\t}",
"void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}",
"private void killBullet() {\r\n this.dead = true;\r\n }",
"public void enemyShoot()\r\n\t{\r\n\t\tfor (Enemy enemies : enemy)\r\n\t\t{\r\n\t\t\tif (enemies.getHasFired())\r\n\t\t\t{\r\n\t\t\t\tBullet enemyPew = enemies.shoot();\r\n\t\t\t\tif (enemyPew != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.add(enemyPew);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void move()\r\n\t{\r\n\t\tfor (int a = 0; a < bullets.size(); a++)\r\n\t\t{\r\n\t\t\tBullet bullet = bullets.get(a);\r\n\t\t\tif (!bullet.move())\r\n\t\t\t{\r\n\t\t\t\tbullets.remove(a);\r\n\t\t\t\ta--;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n public int fire() {\r\n if (this.getBulletsCount() == 0) {\r\n return 0;\r\n }\r\n this.setBulletsCount(this.getBulletsCount() - 10);\r\n return 10;\r\n }",
"@Override\r\n\tpublic void update() {\n\t\tAlly.update();\r\n\t\tEnemy.update();\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tif(GroundList.get(i).kill) {\r\n\t\t\t\tGroundList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BarelList.size(); i++) {\r\n\t\t\tif(BarelList.get(i).kill) {\r\n\t\t\t\tBarelList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tif(WoodList.get(i).kill) {\r\n\t\t\t\tWoodList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tif(FireBallList.get(i).kill) {\r\n\t\t\t\tFireBallList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tif(BulletList.get(i).kill) {\r\n\t\t\t\tBulletList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tGroundList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0 ; i < BarelList.size(); i++) {\r\n\t\t\tBarelList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tBulletList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tFireBallList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tWoodList.get(i).update();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(GamePanel.updateTimes%60 == 0) {\r\n\t\t\tEnemy.PushEntity(2, new Vector2f(width*1/2, height/4),enemy);\r\n\t\t}\r\n\t\tfor(int i = 0; i < AllyDeadList.size(); i++) {\r\n\t\t\tAlly.entityList.remove(AllyDeadList.get(i)-i);\r\n\t\t}\r\n\t\tfor(int i = 0; i < EnemyDeadList.size(); i++) {\r\n\t\t\tEnemy.entityList.remove(EnemyDeadList.get(i)-i);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAllyDeadList.clear();\r\n\t\tEnemyDeadList.clear();\r\n\t\tfor(int i = 0; i < Ally.entityList.size(); i++) {\r\n\t\t\tif(Ally.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tAllyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < Enemy.entityList.size(); i++) {\r\n\t\t\tif(Enemy.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tEnemyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setD_PlayerList(ArrayList<Player> p_PlayerList) {\n d_PlayerList = p_PlayerList;\n }",
"public void shoot()\n {\n\n if(reload<=0)//if the tower has reloaded\n {\n int randomizer=Greenfoot.getRandomNumber(20)-10; \n MinigunBullet bullet = new MinigunBullet(this.getRotation()+randomizer, damage,this);\n getWorld().addObject(bullet, getX(), getY());\n bullet.move(30);\n reload=3;\n }\n else//reload\n {\n reload--;\n }\n\n }",
"public void cleanUpBullets() {\n for (int i = 0; i < this.bullets.size(); i++) {\n if (!this.bullets.get(i).visible) {\n this.bullets.remove(i);\n }\n }\n }",
"public void avatarShoot()\r\n\t{\r\n\t\tBullet avatarPew = avatar.shoot();\r\n\t\tif (avatarPew!= null)\r\n\t\t{\r\n\t\t\tbullets.add(avatarPew);\r\n\t\t}\r\n\t}",
"public void reUpdateTargetList(CopyOnWriteArrayList<Balloon> newList) {\r\n\t\tballoons = newList;\r\n\t}",
"@Override\n\tpublic void update() {\n\t\tif(isMove) {\n\t\t\tspriteMoveToPoint(player, (int) mouseX, (int) mouseY);\n\t\t}\n\t\t\n\t\t//bullet\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\tspriteMoveToPoint(bullet, bullet.getX(), bullet.getY() - bullet.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\t\tif(bullet.getY() < 10) {\n\t\t\t\t\tremoveBullet(bullet);\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t//enemy\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tspriteMoveToPoint(enemy, enemy.getX(), enemy.getY() + enemy.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tif(enemy.getY() > layerheight) {\n\t\t\t\tremoveEnemy(enemy);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tEnemy enemy = enemyList.get(i);\n\t\t\tfor(int j = 0; j < bulletList.size(); j++) {\n\t\t\t\tBullet bullet = bulletList.get(j);\n\t\t\t\tcollisionCheckForBulletAndEnemy(enemy, bullet);\n\t\t\t}\n\t\t}\n\t}",
"public void init(){\n hp = DEFAULT_MAX_HEALTH;\n bulletsFired = new ArrayList<>();\n initial_y = -1;\n\n //Sets the byte to identify the state of movement\n //For animation purposes in the renderer\n //0 = stationary\n //1 = jumping\n //2 = moving left\n //3 = jumping left\n //4 = right\n //5 = Jumping right\n //6 = crouching\n //8 = crouching left\n //10 = crouching right\n stateOfMovement = 0;\n }",
"private void fire(GameEngine gameEngine) {\n Bullet bullet1 = gameEngine.getBulletEnemy();\n if (bullet1 == null) {\n return;\n }\n bullet1.init(this, positionX + imageWidth/2, positionY, 0);\n gameEngine.addGameObject(bullet1);\n gameEngine.playSound(1);\n }",
"public void setBulletintype(Integer bulletintype) {\n this.bulletintype = bulletintype;\n }",
"public void tick() {\n boolean shouldHaltAfterTick = false;\n\n List<Pair<Movement, Bullet>> movements = new ArrayList<>();\n\n //Bullets on nodes\n Map<Coordinate, Bullet> capturedBullets = new HashMap<>(bullets);\n capturedBullets.keySet().retainAll(nodes.keySet());\n\n //Bullets not on nodes\n Map<Coordinate, Bullet> freeBullets = new HashMap<>(bullets);\n freeBullets.keySet().removeAll(capturedBullets.keySet());\n\n //Generate movements for free bullets\n for (Map.Entry<Coordinate, Bullet> entry : freeBullets.entrySet()) {\n Bullet bullet = entry.getValue();\n Coordinate coord = entry.getKey();\n Coordinate newCoord = entry.getKey().plus(bullet.getDirection()).wrap(width, height);\n movements.add(new Pair<>(new Movement(coord, newCoord), bullet));\n }\n\n //Update captured bullets\n for (Map.Entry<Coordinate, Bullet> entry : capturedBullets.entrySet()) {\n Coordinate coordinate = entry.getKey();\n INode node = nodes.get(coordinate);\n\n // special case\n if (node instanceof NodeHalt)\n shouldHaltAfterTick = true;\n\n //TODO this brings great shame onto my family\n Direction bulletDirection = entry.getValue().getDirection();\n Direction dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.antiClockwise();\n }\n Bullet bullet = new Bullet(bulletDirection, entry.getValue().getValue());\n\n Map<Direction, BigInteger> bulletParams = node.run(bullet);\n\n for (Map.Entry<Direction, BigInteger> newBulletEntry : bulletParams.entrySet()) {\n //TODO this too\n bulletDirection = newBulletEntry.getKey();\n dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.clockwise();\n }\n\n Bullet newBullet = new Bullet(bulletDirection, newBulletEntry.getValue());\n Coordinate newCoordinate = coordinate.plus(newBullet.getDirection()).wrap(width, height);\n Movement movement = new Movement(coordinate, newCoordinate);\n movements.add(new Pair<>(movement, newBullet));\n }\n }\n\n //Remove swapping bullets\n List<Movement> read = new ArrayList<>();\n Set<Coordinate> toDelete = new HashSet<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate from = movement.getFrom();\n Coordinate to = movement.getTo();\n boolean foundSwaps = read.stream().anyMatch(other -> from.equals(other.getTo()) && to.equals(other.getFrom()));\n if (foundSwaps) {\n toDelete.add(from);\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getFrom()) || toDelete.contains(pair.getKey().getTo()));\n\n //Remove bullets that end in the same place\n read.clear();\n toDelete.clear();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate to = movement.getTo();\n boolean foundSameFinal = read.stream().anyMatch(other -> to.equals(other.getTo()));\n if (foundSameFinal) {\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getTo()));\n\n //Move bullets\n Map<Coordinate, Bullet> newBullets = new HashMap<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Bullet bullet = pair.getValue();\n newBullets.put(movement.getTo(), bullet);\n }\n\n bullets.clear();\n bullets.putAll(newBullets);\n\n if (shouldHaltAfterTick)\n halt();\n }",
"@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}",
"public void update(float delta) {\n rangeTimer++;//update bullet distance\n //delete bullet if hit collison or met ranged\n if (rangeTimer == RANGE) {\n bullet.setShoot(false);\n rangeTimer = 0;\n } else {\n //update bullet timings\n bullet.updateTimer(delta);\n //make bullet go to p x y - follows player to increase difficulty\n if (this.bullet.x < playerX + 1.5) {\n this.bullet.x += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.x >playerX + 1.5) {\n this.bullet.x -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y < playerY + 0.5) {\n this.bullet.y += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y > playerY + 1.5) {\n this.bullet.y -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n }\n }",
"public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }",
"public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Paramos tudo o que estamos fazendo.\n\t\tstop();\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\n\t\t// Giramos a arma na direção do disparo\n\t\tdouble turnGunAmt = Utils.normalRelativeAngleDegrees(e.getBearing() + getHeading() - getGunHeading());\n\t\tturnGunRight(turnGunAmt);\n\n\t\tscan(); // Escaneamos para verificar a ocorrência de um inimigo na direção\n\t\tback(400); // Recuamos\n\t}",
"protected void newPlayerList() {\n int len = getPlayerCount();\n mPlayerStartList = new PlayerStart[ len ];\n for(int i = 0; i < len; i++) {\n mPlayerStartList[i] = new PlayerStart( 0.f, 0.f );\n }\n }",
"protected void cleanBullets() {\n Set<Bullet> recyclable = new HashSet<Bullet>();\n for (Bullet bullet : this.bullets) {\n bullet.update();\n if (bullet.getPositionY() < SEPARATION_LINE_HEIGHT\n || bullet.getPositionY() > this.height)\n recyclable.add(bullet);\n }\n this.bullets.removeAll(recyclable);\n //BulletPool.recycle(recyclable);\n }",
"public void emptyBullets() {\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n bossBullets.remove(i);\n }\n }",
"void fire() {\r\n // firing a shot takes energy\r\n if (!expendEnergy(BULLET_ENERGY))\r\n return;\r\n\r\n //create a bullet object so it doesn't hit the ship that's firing it\r\n double xV = getXVel() + BULLET_SPEED * (Math.cos(orientation));\r\n double yV = getYVel() + BULLET_SPEED * (Math.sin(orientation));\r\n\r\n // create the actual bullet\r\n new Bullet(\r\n getGame(),\r\n (getXPos() + ((getSize()/2 + 2) * (Math.cos(orientation))) + xV),\r\n (getYPos() + ((getSize()/2 + 2) * (Math.sin(orientation))) + yV),\r\n xV,\r\n yV);\r\n }",
"public StockEvent setShowBullet(Boolean showBullet) {\n this.showBullet = showBullet;\n return this;\n }",
"private void ShootListener() {\n shoot.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (presenter.canShoot()) {\n shoot(presenter.getBullet());\n presenter.checkLastBullet();\n }\n\n }\n });\n }",
"public void shoot(float direction) {\n\t\tif(pause != 0) return;\n\t\tbullets.add(new Bullet(player.getPosition(),direction));\n\t\tpause = cooldown;\n\t}",
"private void placeBullet(double x, double y) {\r\n\t\tb = new Bullet(x, y);\r\n\t\taddParticipant(b);\r\n\t\tb.setVelocity(BULLET_SPEED, ship.getRotation());\r\n\t\tnew ParticipantCountdownTimer(b, \"expire\", BULLET_DURATION);\r\n\t}",
"public void placeAlienBullet() {\r\n\t\tif (alien != null) {\r\n\t\t\t// If the alien is large fires a bullet in a random direction\r\n\t\t\tif (alien.getSize() == 1 && ship != null) {\r\n\r\n\t\t\t\t// Create the alien bullet\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\r\n\t\t\t\t// give the alien bullet a random direction and the bullet speed velocity,\r\n\t\t\t\t// then add as participant\r\n\t\t\t\tdouble r = (2 * Math.PI) * RANDOM.nextDouble();\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, r);\r\n\t\t\t\taddParticipant(ab);\r\n\r\n\t\t\t\t// Sets the alien bullet to expire when it reaches the bullet duration time\r\n\t\t\t\t// limit\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\r\n\t\t\t// If the alien is small fires a bullet aimed directly at the ship\r\n\t\t\tif (alien.getSize() == 0 && ship != null) {\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\t\t\t\tab.setSpeed(BULLET_SPEED);\r\n\r\n\t\t\t\t// Aims the alien bullet directly at the ship\r\n\t\t\t\tdouble A = ship.getY() - alien.getY();\r\n\t\t\t\tdouble B = ship.getX() - alien.getX();\r\n\t\t\t\tdouble angle = Math.atan2(A, B);\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, angle);\r\n\r\n\t\t\t\t// Add the alien bullet as a participant and then set it to expire when it\r\n\t\t\t\t// reaches the bullet duration time limit\r\n\t\t\t\taddParticipant(ab);\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"private void moveBullet() {\r\n\t\tif(bullet != null) {\r\n\t\t\tbullet.move(bulletVelocity, 0);\r\n\t\t}\r\n\t}",
"@Override\n public void onPlayListEdited(PlayList playList) {\n }",
"public AvoidBullets(AIPlayer player) {\r\n\t\tsuper(player);\r\n\t}",
"public void mousePressed(MouseEvent e){\n\t\t\t t.bullets.add(new Bullet(t.theta, t.lx, t.ly));\t\n\t\t}",
"@Override\n public Bullet getBullet() {\n return new EnemyGunBullet1();\n }",
"public void update() {\r\n super.update();\r\n life -= 1;\r\n if(life <= 0) {\r\n killBullet();\r\n }\r\n }",
"public M_Bullet shoot() {\n Point leftCorner = this.getLocation();\n // get the center of the character\n int x = leftCorner.x;\n int y = leftCorner.y;\n Point dim = this.getDimensions();\n int h = dim.y;\n int w = dim.x;\n h = h / 2;\n w = w / 2;\n Point center = new Point(x + w, y + h);\n // get the velocity for the bullet\n Point vel = new Point(this.getDirection() * 3, 0);\n // set the enemy's shot cooldown to its shot interval.\n setShotCooldown(getShotInterval());\n // return the new bullet\n return new M_Bullet(center, this.getStrength(), vel, true);\n }",
"public Bullet(int bulletsDamage, @NotNull String bulletsType, Coordinate centerPointCoordinate, double angle, TankTroubleMap tankTroubleMap, boolean isUserTank, int tankIndex) {\n this.isUserTank = isUserTank;\n this.tankIndex = tankIndex;\n this.centerPointCoordinate = centerPointCoordinate;\n updateArrayListCoordinates();\n bulletsBlasted = false;\n damage = bulletsDamage;\n this.tankTroubleMap = tankTroubleMap;\n if (bulletsType.equals(\"NORMAL\")) {\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/normal.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (bulletsType.equals(\"LASER\")) { // ba else nazadam yevakht khastim emtiazi ezafe konim ye golule\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/laser.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.angle = angle;\n\n fireTime = LocalDateTime.now();\n Thread thread = new Thread(() -> {\n try {\n Thread.sleep(4000);\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n\n }",
"public BulletController(Bullet bullet) {\n this.bullet = bullet;\n rangeTimer = 0;\n }",
"public void updateSpellList(SpellList sList){\n\t\tspellList=sList;\n\t\trequestInputFocus();\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 }",
"@Before\r\n\tpublic void setList() {\r\n\t\tthis.list = new DoubleList();\r\n\t\tfor (int i = 0; i < 15; i++) {\r\n\t\t\tlist.add(new Munitions(i, i + 1, \"iron\"));\r\n\t\t}\r\n\t}",
"public void shoot(GraphicsContext graphicsContext) {\n TankBullet bullet = new TankBullet(new FixedCoordinates(getCoordinates().getX() + 17, getCoordinates().getY() + 100), gameEnded, graphicsContext);\n bullet.draw(graphicsContext);\n CoordinatesCache.getInstance().getEnemyBullets().add(bullet);\n }",
"@Override\n public void setBuffs (ArrayList<Buff> buffs) {\n this.buffs = buffs;\n }",
"@Override\n\tpublic void onAddToLocalList(Player player) {\n\t\tsuper.onAddToLocalList(player);\n\n\t\tif (phase == AbyssalSirePhase.SLEEPING || phase == AbyssalSirePhase.AWAKE) {\n\t\t\tgetEventHandler().addEvent(this, new CycleEvent<Entity>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void execute(CycleEventContainer<Entity> container) {\n\t\t\t\t\tcontainer.stop();\n\n\t\t\t\t\tif (phase == AbyssalSirePhase.SLEEPING) {\n\t\t\t\t\t\tsetIdleAnimation(4527);\n\t\t\t\t\t} else if (phase == AbyssalSirePhase.AWAKE) {\n\t\t\t\t\t\tsetIdleAnimation(4529);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void stop() {\n\n\t\t\t\t}\n\t\t\t}, 2);\n\t\t}\n\t}",
"public void updateList(long t) {\n\t\tfor (int i = 0; i < ballList.size(); i++) {\n\t\t\tballList.get(i).move(t);\n\t\t\t//System.out.printf(\"ball %d at %d %d\\n\", i, ballList.get(i).getX(), ballList.get(i).getY());\n\t\t}\n\t}",
"public boolean IsBullet()\r\n {\r\n return this.isBullet;\r\n }",
"public void update() {\n if (player.getPlaying()) { //if player alive\n bg.update(); //update background\n player.update(); //update player\n //player collision detection, if player hits any baddies or their bullets is playing sets to false\n for (int i = 0; i < gargants.size(); i++) {\n if (collision(gargants.get(i), player)) {\n //gargants.remove(i);\n player.setPlaying(false);\n\n }\n for (int j = 0; j < demons.size(); j++) {\n if (collision(demons.get(j), player)) {\n //demons.remove(j);\n player.setPlaying(false);\n\n }\n for (int k = 0; k < dragons.size(); k++) {\n if (collision(dragons.get(k), player)) {\n //dragons.remove(k);\n player.setPlaying(false);\n\n }\n for (int l = 0; l < demonShots.size(); l++) {\n if (collision(demonShots.get(l), player)) {\n //demonShots.remove(l);\n player.setPlaying(false);\n\n }\n\n }\n }\n }\n }\n\n for (int i = 0; i < bullets.size(); i++) { //for each bullet\n bullets.get(i).update(); //update them\n if (bullets.get(i).getX() > WIDTH + 10) {\n bullets.remove(i); //if off screen delete\n }\n }\n\n for (int i = 0; i < demonShots.size(); i++) { // for each demon bullet\n demonShots.get(i).update(); //update them\n if (demonShots.get(i).getX() < -100) {\n demonShots.remove(i); //if off screen delete\n }\n }\n\n long gargantElapseTime = (System.nanoTime() - gargantStartTime) / 1000000;\n if (gargantElapseTime > (1200 - player.getScore() / 3)) { //as score increases, more will spawn\n gargants.add(new Gargant(BitmapFactory.decodeResource(getResources(), R.drawable.gargant), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 64, 64, 8));\n if (gargants.size() >= 13) { //limit amount of this enemy to 13\n gargants.remove(gargants.size() - 1);\n }\n gargantStartTime = System.nanoTime();\n }\n for (int i = 0; i < gargants.size(); i++) { // for each gargant\n gargants.get(i).update(); //update them\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(gargants.get(i), bullets.get(j))) {\n //when shot remove enemy and bullet\n gargants.remove(i);\n bullets.remove(j);\n player.addScore(10); //10 score for these guys\n break;\n }\n }\n if (gargants.get(i).getX() < -100) {\n gargants.remove(i); //if off screen remove\n }\n }\n\n if (level >= 3) { //only spawn demon above level 3\n long demonElapseTime = (System.nanoTime() - demonStartTime) / 1000000;\n if (demonElapseTime > (12000 - player.getScore() / 3)) { //as score increases, more will spawn\n demons.add(new Demon(BitmapFactory.decodeResource(getResources(), R.drawable.demon), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 64, 64, 8));\n if (demons.size() >= 10) { //limit amount of this enemy to 10\n demons.remove(demons.size() - 1);\n }\n demonStartTime = System.nanoTime();\n }\n for (int i = 0; i < demons.size(); i++) { //for each demon\n demons.get(i).update(); //update them\n int n = rand.nextInt(1001); //random int between 1 and 1000\n if (n > 980) { //if random int > 980 shoot demon bullet\n demonShots.add(new HellFire(BitmapFactory.decodeResource(getResources(), R.drawable.hellfire_0), demons.get(i).getX(), demons.get(i).getY(), 64, 64));\n }\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(demons.get(i), bullets.get(j))) {\n demonHitCount++; //each hit with bullet increases hitcount\n bullets.remove(j);\n if (demonHitCount >= 10) { //when hit more than 10 times it dies\n demonHitCount = 0;\n demons.remove(i);\n bullets.remove(j);\n player.addScore(100); //100 score for these big bois\n }\n }\n }\n if (demons.get(i).getX() < -100) {\n demons.remove(i); //if off screen delete\n }\n }\n }\n\n\n if (level >= 2) { //only spawn dragon above level 3\n long dragonElapseTime = (System.nanoTime() - dragonStartTime) / 1000000;\n if (dragonElapseTime > (6000 - player.getScore() / 3)) { //as score increases, more will spawn\n dragons.add(new Dragon(BitmapFactory.decodeResource(getResources(), R.drawable.dragon), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 128, 128, 8));\n if (dragons.size() >= 5) { //dragons limitted to only 5\n dragons.remove(dragons.size() - 1);\n }\n dragonStartTime = System.nanoTime();\n }\n for (int i = 0; i < dragons.size(); i++) {\n dragons.get(i).update();\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(dragons.get(i), bullets.get(j))) {\n dragonHitCount++; //if hit increase hitcount\n bullets.remove(j);\n if (dragonHitCount >= 4) { //when hit 4 times it dies\n dragonHitCount = 0;\n dragons.remove(i);\n bullets.remove(j);\n player.addScore(25); //25 score for dragons\n }\n break;\n }\n }\n if (dragons.get(i).getX() < -100) {\n dragons.remove(i); //when off screen remove\n }\n }\n }\n }\n }",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tshootBullet(arg0);\r\n\t\t\t}",
"public void addVillagers(ArrayList<Sprite> removedVillagers) {\n\t\tfor (int i = 0; i < removedVillagers.size(); i++) {\n\t\t\tSprite as = removedVillagers.get(i);\n\t\t\tif (as instanceof Villager) {\n\t\t\t\tVillager v = (Villager) as;\n\t\t\t\t// v.setStartToPos(v.getPos());\n\t\t\t\t// v.reset();\n\t\t\t\tsprites.put(v.hashCode(), v);\n\t\t\t\t// executeTrigger(v);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < player.getPartyMembers().size(); i++) {\n\t\t\tSprite as = player.getPartyMembers().get(i);\n\t\t\tsprites.put(as.hashCode(), as);\n\t\t}\n\t\tupdateSpriteList();\n\t}",
"@Override\r\n public void init(GameContainer gc) throws SlickException {\r\n\r\n \tbulletsToRemove = new ArrayList<Body>();\r\n \tbulletsToAdd = new ArrayList<Float[]>();\r\n \tbulletList = new ArrayList<Bullet>();\r\n \t\r\n \t//Set camera coordinates and size.\r\n viewport = new Rectangle(0, 0, 1024, 600);\r\n \r\n //Load our map. (Made in a program called TILED)\r\n map1 = new TiledMap(\"data/2.tmx\");\r\n \r\n \r\n //Create our World, enter a gravity (100 default, bullets have a gravity variable of this*0.05)\r\n Vec2 gravity = new Vec2(0, 100);\r\n world = new World(gravity);\r\n \r\n //Create 2 players.\r\n //Player 1\r\n player1 = new Player(5, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player1.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n //Player 2\r\n player2 = new Player(15, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player2.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n hpbar = new Image(\"data/healthbar.png\");\r\n \r\n //If we want multiplayer, connect to the server.\r\n if(multiplayer) {\r\n \t//Connecting to someone\r\n \tisHosting = false;\r\n \tmyPlayer = player2;\r\n \thisPlayer = player1;\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Connected to server\";\r\n }\r\n else {\r\n \t//Connecting to ourselfs\r\n \tisHosting = true;\r\n \tmyPlayer = player1;\r\n \thisPlayer = player2;\r\n \tnew BFServer(true);\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Local server online\";\r\n }\r\n \r\n //Set player2's friction to only about half of ours, this will reduce \"lag\" and simulate running better.\r\n FixtureDef fd = hisPlayer.getFixture();\r\n fd.friction = 2;\r\n hisPlayer.getBody().createFixture(fd);\r\n \r\n //Get collision layer from map\r\n int collisionLayerIndex = map1.getLayerIndex(\"collision\");\r\n\r\n //Create our collision blocks in the physics engine.\r\n for(int row=0; row<map1.getWidth(); row++) {\r\n \tfor(int col=0; col<map1.getHeight(); col++) {\r\n \t\tif(map1.getTileId(row, col, collisionLayerIndex)==1) {\r\n \t\t\tBodyDef groundBodyDef = new BodyDef();\r\n \t\t\tgroundBodyDef.position.set(row*2, col*2);\r\n \t\t\tBody groundBody = world.createBody(groundBodyDef);\r\n \t\t\tPolygonShape groundBox = new PolygonShape();\r\n \t\t\tgroundBox.setAsBox(1, 1, new Vec2(1, 1), 0);\r\n \t\t\tgroundBody.createFixture(groundBox, 0);\r\n \t\t}\r\n \t}\r\n }\r\n \r\n\r\n //Setup physics world\r\n timeStep = 1.0f/60.0f;\r\n velocityIterations = 6;\r\n positionIterations = 2;\r\n \r\n //Add a new collision listener to our world.\r\n world.setContactListener(new BFContactListener());\r\n \r\n //Add Keylistener to our GameContainer.\r\n gc.getInput().addKeyListener(keylistener);\r\n \r\n //Physics debug draw. (DEPRECATED. I'm using JBox2d-2.3.0 SNAPSHOT, this debugdraw hasn't been updated for it yet)\r\n \r\n //Slick2dDebugDraw sDD = new Slick2dDebugDraw(gc.getGraphics(), gc);\r\n //sDD.setFlags(0x0001); //Setting the debug draw flags, draw polygons, no joints.\r\n //world.setDebugDraw(sDD);\r\n }",
"public static void addBullet(float x, float y, float xspeed, float yspeed) {\r\n \tFloat[] t = new Float[4];\r\n \tt[0] = x;\r\n \tt[1] = y;\r\n \tt[2] = xspeed;\r\n \tt[3] = yspeed;\r\n \tbulletsToAdd.add(t);\r\n }",
"public void update()\n {\n done = false;\n if(data.size()==0)\n {\n data.add('0');\n data.add('0');\n data.add('0');\n data.add('0');\n data.add('0');\n }\n\n boolean isPressed = shot;\n\n keyUP = data.get(0) == '1';\n keyDOWN = data.get(1) == '1';\n keyLEFT = data.get(2) == '1';\n keyRIGHT = data.get(3) == '1';\n shot = data.get(4) == '1';\n\n if(!shot && isPressed)\n {\n if (canShot)\n {\n status.setShot(true);\n if (getBulletType ().equals (\"Laser\"))\n {\n bullets.add (new LaserBulletMulti (getCanonStartX (), getCanonStartY (),\n getDegree (), System.currentTimeMillis (), walls, tanks,canonPower,this.code,kills));\n setBulletType (\"Normal\");\n } else\n {\n bullets.add (new BulletMulti (getCanonStartX (), getCanonStartY (),\n getDegree (), System.currentTimeMillis (), walls, tanks,canonPower,this.code,kills));\n }\n\n canShot = false;\n shot = true;\n new Thread (new Runnable () {\n @Override\n public void run () {\n try {\n Thread.sleep (100);\n shot = false;\n } catch (InterruptedException e) {\n e.printStackTrace ();\n }\n }\n }).start ();\n new Thread (new Runnable () {\n @Override\n public void run () {\n try {\n Thread.sleep (500);\n canShot = true;\n } catch (InterruptedException e) {\n e.printStackTrace ();\n }\n }\n }).start ();\n }\n }\n\n int forX = (int) (6 * Math.cos (Math.toRadians (this.getDegree ())));\n int forY = (int) (6 * Math.sin (Math.toRadians (this.getDegree ())));\n\n if(keyUP && canMove(forX , forY) && isEmpty(forX,forY,1))\n {\n this.addLocX(forX);\n this.addLocY(forY);\n }\n if(keyDOWN && canMove(-1*forX , -1*forY) && isEmpty(forX,forY,-1))\n {\n this.addLocX(-1*forX);\n this.addLocY(-1*forY);\n }\n\n checkPrize();\n\n if(keyRIGHT && !keyLEFT)\n this.increaseDegree();\n\n if(!keyRIGHT && keyLEFT)\n this.decreaseDegree();\n\n\n this.setLocX(Math.max(this.getLocX(), 0));\n this.setLocX(Math.min(this.getLocX(), GameFrameMulti.GAME_WIDTH - 30));\n this.setLocY(Math.max(this.getLocY(), 0));\n this.setLocY(Math.min(this.getLocY(), GameFrameMulti.GAME_HEIGHT - 30));\n done = true;\n }",
"private void shootMove() {\n for (int i = 0; i < fires.size(); i++) {\n //子弹往上移动\n fires.get(i).move();\n //注意这里remove需要放在下面\n if (fires.get(i).y < -1000) {\n fires.remove(fires.get(i));\n }\n }\n\n }",
"public void update(float dt) {\n\t\tIterator<Bullet> iter = bullets.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tBullet b = iter.next();\n\t\t\t\n\t\t\tb.update(dt);\n\t\t\tif(b.getY() > 480 - bullet_size_h) iter.remove();\n\t\t}\n\t}",
"public BulletAddedEvent(Bullet b)\r\n {\r\n bull = b;\r\n }",
"public void addBullet(Bullet bullet) {\n\t\tif(bulletList.size() < GameParameters.getInstance().maxBulletAllowed) {\n//\t\t\tsynchronized (bulletList) {\n\t\t\t\tbulletList.add(bullet);\n//\t\t\t}\n\t\t}\n\n\t\t// Log.e(null, \"size of bulletList: \" + bulletList.size());\n\t}"
] | [
"0.7314514",
"0.73011893",
"0.7095746",
"0.7068389",
"0.7017956",
"0.70089376",
"0.6722573",
"0.6714708",
"0.6676434",
"0.66594297",
"0.6625457",
"0.65867317",
"0.6546839",
"0.64326304",
"0.64260817",
"0.6379523",
"0.63538074",
"0.62845963",
"0.62782705",
"0.6253134",
"0.6244017",
"0.6234632",
"0.61984503",
"0.6188393",
"0.61813605",
"0.61230195",
"0.6118254",
"0.61157656",
"0.60997325",
"0.6096354",
"0.6092955",
"0.60924524",
"0.60747254",
"0.60687244",
"0.6066763",
"0.6056366",
"0.6044471",
"0.6042112",
"0.60253936",
"0.602253",
"0.6014475",
"0.59888786",
"0.597815",
"0.5976452",
"0.594259",
"0.59082335",
"0.58988696",
"0.58525324",
"0.58508635",
"0.5846156",
"0.5812592",
"0.5790485",
"0.5757348",
"0.5752539",
"0.5742621",
"0.57423276",
"0.5724232",
"0.5708763",
"0.5706139",
"0.5705599",
"0.5700171",
"0.56771743",
"0.5676969",
"0.5670409",
"0.566871",
"0.56673986",
"0.5657474",
"0.565321",
"0.56372124",
"0.5629739",
"0.56294113",
"0.5627272",
"0.5617366",
"0.56106806",
"0.56049865",
"0.55940914",
"0.5588014",
"0.55574244",
"0.5548451",
"0.5546544",
"0.55377734",
"0.5531571",
"0.5528926",
"0.5520751",
"0.551539",
"0.55007136",
"0.54962397",
"0.54866856",
"0.548588",
"0.54730546",
"0.5461194",
"0.5430066",
"0.5422117",
"0.5421563",
"0.5418915",
"0.5415516",
"0.54094553",
"0.54082245",
"0.5407265",
"0.5393336"
] | 0.7407921 | 0 |
returns the ready status of the player | public String getStatus() {
return ready ? "ready" : "not ready";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkRemotePlayerReady(){\n String data = getJSON(hostUrl + \"retrieve_remote_ready.php?matchId=\" + matchId\n + \"&player=\" + oppositePlayer, 2000);\n\n System.out.println(\"Ready: \" + data);\n\n // Get first character, as, for some reason, it returns one extra character.\n int ready = Integer.parseInt(data.substring(0, 1));\n\n if (ready == 1){\n remotePlayerReady = true;\n }\n\n }",
"@Override\n public synchronized void isReady(String username, boolean ready) throws RemoteException {\n Player p = getPlayer(username);\n if (p != null) {\n p.setReady(ready);\n System.out.println(username + (ready ? \" no\" : \"\") + \" esta listo!\");\n }\n }",
"public boolean isReady();",
"public boolean isReady();",
"boolean isReady();",
"boolean isReady();",
"boolean isReady();",
"boolean hasPlayready();",
"boolean notifyWhenReady(int playerNr);",
"public boolean getReady() {\r\n\t\treturn ready;\r\n\t}",
"public boolean isReady() {\n return isReady;\n }",
"public int readyCount()\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor(Player player: this.players)\r\n\t\t{\r\n\t\t\tif(player != null)\r\n\t\t\t{\r\n\t\t\t\tif(player.isReady())\r\n\t\t\t\t{\r\n\t\t\t\t\t++count;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"public boolean isReady() {\n\t\treturn state == State.READY;\n\t}",
"public boolean isReady() {\n return ready;\n }",
"public boolean getIsReady() {\n return localIsReady;\n }",
"public boolean isReady()\r\n {\r\n return _isReady;\r\n }",
"public boolean ready();",
"private void getPlayerStatusFromServer()\r\n\t{\r\n\t\ttry {\r\n\t\t\t// Create data input stream\r\n\t\t\tDataInputStream playerStatusInputFromServer = new DataInputStream(\r\n\t\t\t\t\tsocket.getInputStream());\r\n\t\t\tisPlayerAlive = playerStatusInputFromServer.readBoolean();\r\n\t\t\thasPlayerWon = playerStatusInputFromServer.readBoolean();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public int readyCount ()\n\t{\n\t\tint count =0;\n\t\tIterator<Player> it = iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tPlayer p = it.next();\n\t\t\tif(p.available())\n\t\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}",
"@Override\n\tpublic void playerReady(String playerID, boolean isReady) {\n\t\t//printMessage(\"ph.playerReady: \"+playerID+\" is ready\");\n\t\t//moeten wij niets met doen\n\t}",
"public boolean isReady() {\n return mIsReady;\n }",
"com.google.cloud.video.livestream.v1.Encryption.Playready getPlayready();",
"public boolean hasPlayready() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"void isReady();",
"void isReady();",
"@SuppressWarnings(\"WeakerAccess\")\n public ReadyState getReadyState() {\n return mReadyState;\n }",
"@java.lang.Override\n public com.google.cloud.video.livestream.v1.Encryption.Playready getPlayready() {\n return playready_ == null\n ? com.google.cloud.video.livestream.v1.Encryption.Playready.getDefaultInstance()\n : playready_;\n }",
"public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}",
"@java.lang.Override\n public boolean hasPlayready() {\n return playready_ != null;\n }",
"public Boolean getPlayerAwaitingAuthy () {\n\t\treturn this.playerAwaitingAuthy;\n\t}",
"public boolean isReady(){\n return !result.equals(\"\");\n }",
"public boolean allPlayersReady() {\n // Si un jugador esta offline, lo ignora\n for (Player p : players) {\n if (p.isOnline() && !p.isReady())\n return false;\n }\n return true;\n }",
"private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}",
"@Override\n\tpublic boolean isReady() {\n\t\treturn (this.baseTime == this.timeRemaining);\n\t}",
"@Override\n\tpublic boolean ready() {\n\t\treturn this.ok;\n\t}",
"public boolean poll()\n {\n if (this.mediaPlayer == null)\n {\n return false;\n }\n\n return mediaPlayer.getStatus().equals(MediaPlayer.Status.PLAYING);\n }",
"private boolean readyPlayer() {\n switch (this.state) {\n case MEDIA_NONE:\n if (this.player == null) {\n //TODO: Agregar buffer (this, audiobuffer, decoderbuffer).\n this.player = new MultiPlayer(this);\n this.setState(STATE.MEDIA_STARTING);\n return true;\n }\n case MEDIA_LOADING:\n //cordova js is not aware of MEDIA_LOADING, so we send MEDIA_STARTING instead\n LOG.d(LOG_TAG, \"StreamPlayer Loading: startPlaying() called during media preparation: \" + STATE.MEDIA_STARTING.ordinal());\n return false;\n case MEDIA_STARTING:\n case MEDIA_RUNNING:\n case MEDIA_PAUSED:\n case MEDIA_STOPPED:\n return true;\n default:\n LOG.d(LOG_TAG, \"StreamPlayer Error: startPlaying() called during invalid state: \" + this.state);\n sendErrorStatus(MEDIA_ERR_ABORTED);\n }\n return false;\n }",
"public boolean getReadyToRun();",
"public boolean ready() {\n pos = new Pos(\"200001\", \"0123456789\", \"75621477\");\n //todo card = read CardData;\n saveStatus = \"1\";\n NetworkServer.getInstance().connect();\n return true;\n }",
"public boolean isOnline() {\n \t\treturn (type == PLAYER_ONLINE);\n \t}",
"public boolean ready ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"ready\", true);\n $in = _invoke ($out);\n boolean $result = $in.read_boolean ();\n return $result;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n return ready ( );\n } finally {\n _releaseReply ($in);\n }\n }",
"public com.google.cloud.video.livestream.v1.Encryption.Playready getPlayready() {\n if (playreadyBuilder_ == null) {\n return playready_ == null\n ? com.google.cloud.video.livestream.v1.Encryption.Playready.getDefaultInstance()\n : playready_;\n } else {\n return playreadyBuilder_.getMessage();\n }\n }",
"public void ready(int playerNo) {\r\n\t\tthis.playersReady++;\r\n\r\n\t\t// Tell all of the players in the lobby that somebody has become ready\r\n\t\tthis.queueMessage(\"% \" + playerNo + \" READY\");\r\n\r\n\t\t// Do a 15 second timer to wait for more people to join\r\n\t\tif (this.playersReady != 0 && this.playersReady == this.players.size()) {\r\n\t\t\tthis.startReadyTimer(true);\r\n\t\t}\r\n\t}",
"public boolean allPlayersReady() {\r\n for (Player player : players) {\r\n if (!player.isReady()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"@Override\n public boolean isReady() {\n return isFinished();\n }",
"public Boolean isAvailable()\n\t{\n\t\treturn presence != null && presence.equals(AVAILABLE);\n\t}",
"boolean isAvailable( long millis );",
"public boolean isOnline()\n\t{\n\t\treturn PlayerManager.getPlayer(name)!=null;\n\t}",
"@java.lang.Override\n public com.google.cloud.video.livestream.v1.Encryption.PlayreadyOrBuilder\n getPlayreadyOrBuilder() {\n return playready_ == null\n ? com.google.cloud.video.livestream.v1.Encryption.Playready.getDefaultInstance()\n : playready_;\n }",
"@Override\n public int checkStatus(){\n return InputOutputController.STATUS_READY;\n }",
"private boolean allReady() {\n PlayerModel[] playersInLobby = this.lobbyModel.getPlayersInLobby();\n if (playersInLobby.length <= 1)\n return false;\n for (PlayerModel pl : playersInLobby) {\n if (!pl.isReady() && !(pl instanceof ClientPlayerModel))\n return false;\n }\n return true;\n }",
"Boolean isAvailable();",
"public void setReady() {\n this.isReady = true;\n }",
"Boolean isPlaying() {\n return execute(\"player.playing\");\n }",
"@Override\r\n\tpublic boolean isReady() {\n\t\treturn !finish;\r\n\t}",
"@Override\n public boolean isReady() {\n return (running && !opening) || packetQueue.size() > 0;\n }",
"public boolean isReady() throws java.io.IOException {\n\n return br.ready();\n }",
"public boolean isAvailable() {\n return available;\n }",
"public Integer getIsAvailable() {\r\n\t\treturn isAvailable;\r\n\t}",
"public boolean isAvailable() {\r\n\treturn available;\r\n }",
"boolean isAvailable();",
"boolean isAvailable();",
"boolean isAvailable();",
"boolean isAvailable();",
"public boolean isAvailable() {\r\n return isavailable;\r\n }",
"@Override\n\tpublic boolean playerWon() {\n\t\treturn lastPlayerWin;\n\t}",
"public boolean ready() {\n diff = eventTime - System.currentTimeMillis(); //Step 4,5\n return System.currentTimeMillis() >= eventTime;\n }",
"@Override\n public boolean isReady() {\n return true;\n }",
"public boolean isAvailable()\n {\n return available;\n }",
"@Override\n public boolean handlePlayerStatusUpdate(PlayerState playerState) {\n return true;\n }",
"public Boolean isReady()\n {\n return (sensorModules != null && !sensorModules.isEmpty());\n }",
"@Override\n public boolean isReady() {\n return true;\n }",
"public @NonNull CompletableFuture<?> ready() {\n return this.readyFuture;\n }",
"public void setReady() {\n\t\tthis.state = State.READY;\n\t}",
"public Boolean waitingUser(){\n\t\tif (currentPlayer == 0){\n\t\t\tSystem.out.println(\"You are the first player, changing waitingUser to true\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isAvailable() {\n return available;\n }",
"public abstract void ready();",
"public void setReady() {\n\t\tstate = State.READY;\n\t}",
"public com.google.cloud.video.livestream.v1.Encryption.PlayreadyOrBuilder\n getPlayreadyOrBuilder() {\n if (playreadyBuilder_ != null) {\n return playreadyBuilder_.getMessageOrBuilder();\n } else {\n return playready_ == null\n ? com.google.cloud.video.livestream.v1.Encryption.Playready.getDefaultInstance()\n : playready_;\n }\n }",
"boolean isAvailable() {\r\n\t\treturn available;\r\n\t}",
"boolean isGameComplete();",
"public boolean isAvailable() {\n return available;\n }",
"public boolean isAvailable() {\n return available;\n }",
"private boolean isNextReady()\n {\n return __m_NextReady;\n }",
"PlayerState getPlayerState() {\n return playerState;\n }",
"public boolean isAvailable() {\r\n\t\treturn available;\r\n\t}",
"public boolean isAvailable() {\n lock.readLock().lock();\n try {\n return available;\n } finally {\n lock.readLock().unlock();\n }\n }",
"@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}",
"@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}",
"@Override\n public boolean isAvailable() {\n return room.isAvailable();\n }",
"@Override\r\n\t\t\tpublic boolean isReady() {\n\t\t\t\treturn false;\r\n\t\t\t}",
"@Override\n public boolean isReady() {\n return !isDone;\n }",
"public PlayerState getPlayerState() {\r\n return playerState;\r\n }",
"boolean isPlayable();",
"public boolean ready() {\n try {\n return in.available() > 0;\n } catch (IOException x) {\n return false;\n }\n }",
"@Override\n\tpublic boolean isReady() {\n\t\treturn false;\n\t}",
"public boolean isOtherPlayerReady(int[] details)throws RemoteException{\n if(details[1] == 0){\n return sd.getGames().get(details[0]).getPlayers()[1].isReady();\n } return sd.getGames().get(details[0]).getPlayers()[0].isReady();\n }",
"public boolean isCurrentPlayer() {\n return playerStatus.isActive;\n }",
"protected boolean isAvailable() {\r\n\t\treturn true;\r\n\t}",
"public boolean isOnline ( ) {\n\t\treturn getBukkitPlayerOptional ( ).isPresent ( );\n\t}"
] | [
"0.7777028",
"0.73835117",
"0.7251595",
"0.7251595",
"0.72469693",
"0.72469693",
"0.72469693",
"0.72405744",
"0.7232229",
"0.7188222",
"0.701899",
"0.7007982",
"0.7001933",
"0.6981615",
"0.6975739",
"0.69394016",
"0.69307727",
"0.6886278",
"0.687719",
"0.68702596",
"0.6860004",
"0.68546814",
"0.675758",
"0.6704597",
"0.6704597",
"0.6685574",
"0.6675638",
"0.66712147",
"0.664599",
"0.66216964",
"0.658568",
"0.65704024",
"0.65570354",
"0.65453255",
"0.65260494",
"0.6509297",
"0.6471966",
"0.6464411",
"0.6426674",
"0.64229876",
"0.64145076",
"0.6402654",
"0.64003253",
"0.637432",
"0.63635087",
"0.635867",
"0.63302356",
"0.6305614",
"0.6303983",
"0.62783015",
"0.6276244",
"0.62675995",
"0.62594986",
"0.62588394",
"0.6252932",
"0.6252755",
"0.6243126",
"0.62430966",
"0.62049216",
"0.6193196",
"0.61906046",
"0.61906046",
"0.61906046",
"0.61906046",
"0.61864454",
"0.6175315",
"0.6169743",
"0.6169308",
"0.6165551",
"0.61532414",
"0.6152609",
"0.6147365",
"0.6146472",
"0.6129585",
"0.61287355",
"0.6121659",
"0.61201686",
"0.61146283",
"0.6108403",
"0.6105468",
"0.61022395",
"0.6094774",
"0.6094774",
"0.60910714",
"0.6089884",
"0.6070041",
"0.6066421",
"0.60579574",
"0.60579574",
"0.6035305",
"0.60300094",
"0.60273045",
"0.6017466",
"0.59966016",
"0.5982025",
"0.59794205",
"0.59693366",
"0.59634316",
"0.59535134",
"0.59459126"
] | 0.69703555 | 15 |
Created by Administrator on 2017/11/14. | public interface UserOrderContract {
interface Model {
}
interface View extends BaseOrderContract.View {
/**
* 数据获取成功
*
* @param dataBeans
*/
void onGetListDataSuccess(List<UserOrderBean.DataBean> dataBeans);
/**
* 数据获取失败
*
* @param msg 提示信息
*/
void onGetListDataFailed(String msg);
}
interface Presenter extends BaseOrderContract.Presenter{
void getListDataFromNet(String uid, String index, String item);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@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 tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\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}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void create () {\n\n\t}",
"@Override\n\tprotected void getExras() {\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}",
"public void mo38117a() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"public void mo4359a() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private TMCourse() {\n\t}",
"public contrustor(){\r\n\t}",
"Petunia() {\r\n\t\t}",
"public void create() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"public Pitonyak_09_02() {\r\n }",
"@Override\n protected void initialize() \n {\n \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 }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void create() {\n\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void create() {\n\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }",
"public void mo55254a() {\n }",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}",
"public void mo6081a() {\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n public void func_104112_b() {\n \n }",
"private UsineJoueur() {}",
"@Override\n void init() {\n }",
"protected Doodler() {\n\t}",
"public void verarbeite() {\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private void init() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n public void init() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void mo12930a() {\n }",
"private void getStatus() {\n\t\t\n\t}",
"private Singletion3() {}",
"private static void oneUserExample()\t{\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"private MApi() {}",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public static void created() {\n\t\t// TODO\n\t}",
"@Override\n\tpublic void einkaufen() {\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 protected void startUp() {\n }",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"protected void onFirstUse() {}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void initialize() {\n \n }"
] | [
"0.626697",
"0.60767996",
"0.58441424",
"0.5842022",
"0.5812405",
"0.57734215",
"0.57637656",
"0.57396454",
"0.56949025",
"0.56949025",
"0.56936073",
"0.5683786",
"0.5679852",
"0.5678133",
"0.5674515",
"0.56714344",
"0.56699324",
"0.56699324",
"0.5660867",
"0.56582",
"0.5633077",
"0.5630657",
"0.5628014",
"0.5627315",
"0.5618654",
"0.5613016",
"0.55918384",
"0.5579558",
"0.55784327",
"0.55772036",
"0.5569285",
"0.55675864",
"0.55660135",
"0.5561019",
"0.55578226",
"0.5545334",
"0.5544903",
"0.5544903",
"0.5544903",
"0.5544903",
"0.5544903",
"0.5544903",
"0.5544903",
"0.55381685",
"0.5522635",
"0.55000925",
"0.54997796",
"0.5495588",
"0.54954976",
"0.5490552",
"0.5490552",
"0.5490552",
"0.5490552",
"0.5490552",
"0.5490552",
"0.54810435",
"0.54706156",
"0.5467468",
"0.5462568",
"0.5457682",
"0.5444611",
"0.5433629",
"0.54301924",
"0.54259413",
"0.54252243",
"0.54216486",
"0.5393303",
"0.5381165",
"0.5376554",
"0.5370128",
"0.5370046",
"0.5361157",
"0.5358629",
"0.5358629",
"0.53558755",
"0.535175",
"0.5351366",
"0.5343045",
"0.5339923",
"0.53394544",
"0.53384346",
"0.5335712",
"0.53356314",
"0.5317929",
"0.5316833",
"0.5316725",
"0.53123933",
"0.5310229",
"0.53091395",
"0.53091174",
"0.53091174",
"0.53091174",
"0.53091174",
"0.53091174",
"0.53037935",
"0.53036934",
"0.52995807",
"0.52972794",
"0.5296402",
"0.5296402",
"0.5294518"
] | 0.0 | -1 |
get system current setting language. zh_CN, zh_TW etc. | public static Locale systemSettingLanguage() {
// define return result
Locale _ret = Locale.ENGLISH;
// get default locale
Locale _defaultLocale = Locale.getDefault();
// check language and country
if (Locale.CHINESE.toString().equalsIgnoreCase(
_defaultLocale.getLanguage())) {
if ("CN".equalsIgnoreCase(_defaultLocale.getCountry())) {
_ret = Locale.SIMPLIFIED_CHINESE;
} else {
_ret = Locale.TRADITIONAL_CHINESE;
}
}
return _ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getSystemLanguage() {\n String language;\n if (System.getProperty(COUNTRY) == null) {\n language = System.getProperty(LANGUAGE);\n } else {\n language = System.getProperty(LANGUAGE) + \"-\"\n + System.getProperty(COUNTRY).toLowerCase(Locale.ENGLISH);\n }\n return language;\n }",
"public String getCurrentLanguage() {\n return getStringData(Key.APP_CURRENT_LANGUAGE + \"\", \"zh\");\n }",
"public static String getlanguage(Context ctx) {\n\t\treturn getSharedPreferences(ctx).getString(language, \"\");\n\t}",
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"String getLang();",
"public static String getCurrentLanguage() {\n\t\tif ( currentLanguage == null || currentLanguage.isEmpty() ) {\r\n\t\t\tcurrentLanguage = Locale.getDefault().getLanguage();\r\n\t\t}\r\n\t\treturn currentLanguage;\r\n\t}",
"public String getLanguage();",
"public static String getLanguage() {\n return language;\n }",
"public static String getAppLanguage() {\n return Locale.getDefault().getLanguage().toLowerCase().substring(0, 2);\n }",
"public static String getSavedLanguage(Context context) {\r\n\t\treturn getPreferences(context).getString(\"app-language\", null);\r\n\t}",
"public String getPrimaryLanguage(){\n return sharedPreferences.getString(PRIMARY_LANGUAGE, \"LANG_NOT_FOUND\");\n }",
"public static SupportedLanguage getLang() {\n\t\tif (SINGLETON == null) {\n\t\t\tSINGLETON = new I18nHelper();\n\t\t}\n\t\treturn SINGLETON.getAndroidLang();\n\t}",
"private static String getCurrentLanguageCode() {\n return Locale.getDefault().getLanguage();\n }",
"public String getPreferredLanguage()\n {\n if (lsData == null)\n return null;\n else\n return lsData.language;\n }",
"String getCurrentLocaleString();",
"public String getLang() {\n return lang;\n }",
"public String getLanguage() {\n return languageProperty.get();\n }",
"public String getLocale()\n {\n return (m_taskVector == null || m_taskVector.size() == 0) ?\n DEFAULT_LOCALE :\n taskAt(0).getSourceLanguage();\n }",
"public java.lang.String getLanguage()\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(LANGUAGE$14);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public java.lang.String getLanguage()\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(LANGUAGE$14);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"CLanguage getClanguage();",
"public String getLang() {\n return (String)getAttributeInternal(LANG);\n }",
"public String getSecondaryLanguage(){\n return sharedPreferences.getString(SECONDARY_LANGUAGE, \"LANG_NOT_FOUND\");\n }",
"public String getLanguage()\r\n\t{\r\n\t\treturn (String) queryParams.get(AUTH_LANGUAGE);\r\n\t}",
"public String getUserLocale() {\n return sessionData.getUserLocale();\n }",
"protected String getLang(SharedPreferences prefs, Resources res) {\n Intent intent = getIntent();\n if (intent != null) {\n String lang = intent.getStringExtra(RecognizerIntent.EXTRA_LANGUAGE);\n if (lang != null) {\n return lang;\n }\n }\n return PreferenceUtils.getPrefString(prefs, res, R.string.keyLanguage, R.string.defaultLanguage);\n }",
"public static String getLocale(Player player)\n {\n Object ep = null;\n try\n {\n ep = getMethod(\"getHandle\", player.getClass()).invoke(player, (Object[]) null);\n }\n catch (IllegalAccessException | IllegalArgumentException| InvocationTargetException e)\n {\n e.printStackTrace();\n }\n Field f = null;\n try\n {\n f = ep.getClass().getDeclaredField(\"locale\");\n }\n catch (NoSuchFieldException | SecurityException e)\n {\n e.printStackTrace();\n }\n f.setAccessible(true);\n String language = null;\n try\n {\n language = (String) f.get(ep);\n }\n catch (IllegalArgumentException | IllegalAccessException e)\n {\n e.printStackTrace();\n }\n return language;\n }",
"public String getUserLangage() {\n return sessionData.getUserLanguage();\n }",
"private Locale getPreferredLocale() {\n return mActivity.getResources().getConfiguration().getLocales().get(0);\n }",
"public String getLanguage()\n {\n return mLanguage;\n }",
"@objid (\"8b3ba8b8-4d09-4d8e-9064-983191cc6b26\")\n @Override\n public String getLanguage() {\n String language = Platform.getNL();\n if (language.contains(\"_\")) {\n return Platform.getNL().substring(0, language.lastIndexOf(\"_\"));\n }\n return Platform.getNL();\n }",
"private Locale getLocale() {\n Locale selectedLocale = (Locale) Sessions.getCurrent().getAttribute(Attributes.PREFERRED_LOCALE);\n if (selectedLocale != null) {\n return selectedLocale;\n }\n Locale defaultLocale = ((HttpServletRequest) Executions.getCurrent().getNativeRequest()).getLocale();\n Sessions.getCurrent().setAttribute(org.zkoss.web.Attributes.PREFERRED_LOCALE, defaultLocale);\n return defaultLocale;\n }",
"public String getLocale ( ) {\n\t\treturn extract ( handle -> getLocale ( ) );\n\t}",
"public String getLanguage()\n\t{\n\t\treturn language;\n\t}",
"java.lang.String getLocale();",
"public java.lang.String getLanguage() {\n return language;\n }",
"public java.lang.String getLanguage() {\n return language;\n }",
"private static Locale getUserPreferredLocale() {\n\t\tfinal ResourceLoader rl = new ResourceLoader();\n\t\treturn rl.getLocale();\n\t}",
"private Locale getBotLocale( HttpServletRequest request )\r\n {\r\n String strLanguage = request.getParameter( PARAMETER_LANGUAGE );\r\n\r\n if ( strLanguage != null )\r\n {\r\n return new Locale( strLanguage );\r\n }\r\n\r\n return LocaleService.getDefault( );\r\n }",
"private Locale getLocale(PageContext pageContext) {\n HttpSession session = pageContext.getSession();\n Locale ret = null;\n // See if a Locale has been set up for Struts\n if (session != null) {\n ret = (Locale) session.getAttribute(Globals.LOCALE_KEY);\n }\n\n // If we've found nothing so far, use client browser's Locale\n if (ret == null) {\n ret = pageContext.getRequest().getLocale();\n }\n return ret;\n }",
"public String getLanguage() {\r\n return language;\r\n }",
"public java.lang.String getDefaultLanguage() {\n return defaultLanguage;\n }",
"public String getLanguage() {\n return language;\n }",
"public String getLanguage() {\n return language;\n }",
"public String getLanguageMenuText() {\r\n\t\treturn \"语言\";\r\n\t}",
"public Locale getCurrentLocale() {\r\n\t\t// NOTE: should be written in some properties file\r\n\t\tLocale defaultLocale = getLocale();\r\n\t\tLocale locale = getUsersLocale();\r\n\t\t\r\n\t\tif (locale == null) {\r\n\t\t\treturn defaultLocale;\r\n\t\t}\r\n\t\treturn locale;\r\n\t}",
"public String getLanguage() {\n return _language;\n }",
"public java.lang.String getLang()\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(LANG$28);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String returnLanguage() {\n\t\treturn this.registration_language.getAttribute(\"value\");\r\n\t}",
"Optional<Locale> getLanguage();",
"String getLocalization();",
"public static Locale getLocale() {\n return localeInfo.get();\n }",
"public Language getLanguage() {\r\n\t\t\treturn lang;\r\n\t\t}",
"public Locale getLocaleL() {\n\t\treturn panelVirtualKeyboard.getLocaleL();\n\t}",
"public String getLanguage() {\n\t\tif (language == null)\n\t\t throw new IllegalStateException(\"Should be impossible; missing build.language in test.properties!\");\n\t\treturn language.toLowerCase(Locale.US);\n\t}",
"public String getLanguage() {\n return this.language;\n }",
"public String getServerLocale(){\n return this.serverLocale;\n }",
"private void loadLocale() {\n\t\tSharedPreferences sharedpreferences = this.getSharedPreferences(\"CommonPrefs\", Context.MODE_PRIVATE);\n\t\tString lang = sharedpreferences.getString(\"Language\", \"en\");\n\t\tSystem.out.println(\"Default lang: \"+lang);\n\t\tif(lang.equalsIgnoreCase(\"ar\"))\n\t\t{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"ar\";\n\t\t}\n\t\telse{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"en\";\n\t\t}\n\t}",
"public String getLanguage() {\n\t\treturn this.language;\n\t}",
"public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }",
"public String getLanguage() {\n\t\treturn language;\n\t}",
"public String getLanguage() {\n\t\treturn language;\n\t}",
"@Nullable\n public final String getLanguage() {\n return this.language;\n }",
"com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();",
"@Override\r\n\t\tpublic String getLang()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }",
"@AutoEscape\n\tpublic String getLanguage();",
"public String getLanguageValue(Locale locale) {\n\n\t\tString language = locale.getDisplayLanguage(this.locale);\n\t\t\n\t\tif(language.length() > 0) {\n\t\t\tlanguage = language.substring(0, 1).toUpperCase(this.locale) + language.substring(1);\n\t\t}\n\t\t\n\t\tString country = locale.getDisplayCountry(); \n\t\t\n\t\tif(country.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayCountry(this.locale); \n\t\t}\n\t\t\n\t\tString variant = locale.getDisplayVariant(); \n\n\t\tif(variant.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayVariant(this.locale); \n\t\t}\n\t\t\n\t\tif(locale == fallbackLocale) {\n\t\t\tlanguage = language + \" (fallback)\";\n\t\t}\n\t\t\n\t\treturn language;\n\t}",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"public String[] getLanguage() {\n return mSelf.getLanguage();\n }",
"public Object language() {\n return this.language;\n }",
"public java.util.Locale getLocale() {\n MenuContainer parent = MenuComponent.this.getParent();\n if (parent instanceof Component)\n return ((Component)parent).getLocale();\n else\n return java.util.Locale.getDefault();\n }",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"public Locale preferredLanguage() {\n return this.preferredLanguage;\n }",
"public java.lang.String getLanguage() {\n java.lang.Object ref = language_;\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 language_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public AVT getLang()\n {\n return m_lang_avt;\n }",
"public String getLocale() {\n return (String)getAttributeInternal(LOCALE);\n }",
"public String getLocale() {\n return (String)getAttributeInternal(LOCALE);\n }",
"public static String getKeyboardLocale()\n {\n final InputMethodManager imm = (InputMethodManager) MwmApplication.get().getSystemService(Context.INPUT_METHOD_SERVICE);\n if (imm != null)\n {\n final InputMethodSubtype ims = imm.getCurrentInputMethodSubtype();\n if (ims != null)\n return ims.getLocale();\n }\n\n return getDefaultLocale();\n }",
"@java.lang.Override\n public java.lang.String getLanguage() {\n java.lang.Object ref = language_;\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 language_ = s;\n }\n return s;\n }\n }",
"private SupportedLanguage getAndroidLang() {\n\t\treturn this.androidLang;\n\t}",
"public static void initialSystemLocale(Context context)\n {\n LogpieSystemSetting setting = LogpieSystemSetting.getInstance(context);\n if (setting.getSystemSetting(KEY_LANGUAGE) == null)\n {\n String mLanguage = Locale.getDefault().getLanguage();\n if (mLanguage.equals(Locale.CHINA) || mLanguage.equals(Locale.CHINESE))\n {\n setting.setSystemSetting(KEY_LANGUAGE, CHINESE);\n }\n else\n {\n setting.setSystemSetting(KEY_LANGUAGE, ENGLISH);\n }\n }\n }",
"@Override\n public String getLang() {\n if (request != null) {\n return GuideUtils.getAcceptLang(request);\n } else {\n return FormContainer.super.getLang();\n }\n }",
"public Language getLanguage()\n\t{\n\t\treturn m_language;\n\t}",
"public Language getLanguage() {\n return this.language;\n }",
"public Locale getUserPreferedLanguage(HttpServletRequest request) {\n String lang = (String) request.getAttribute(EXPLICIT_LOCALE_KEY);\n if (lang != null && ! \"\".equals(lang)) {\n return request.getLocale();\n } else {\n return new Locale(lang);\n }\n }",
"private String getLanguageFromTokenizer(StreamTokenizer st)\n\t\t\tthrows IOException {\n\t\tst.nextToken();\n\t\t// if not defined -> define default language of server...\n\t\tif (st.sval == null || st.sval.equals(\"\"))\n\t\t\treturn Locale.getDefault().getLanguage();\n\t\t// else return language string\n\t\treturn st.sval;\n\t}",
"public java.lang.String getLanguageLocaleKey() {\n return languageLocaleKey;\n }",
"public String getLanguage() {\n Object ref = language_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n language_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getTargetLanguage()\n\t{\n\t\treturn targetLanguage;\n\t}",
"@Override\n public String getLanguage() {\n Object ref = language_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n language_ = s;\n return s;\n }\n }",
"String getLocalizedString(Locale locale);",
"public String getLanguageName() {\r\n return languageName;\r\n }",
"public String getLocale() {\n return this.locale;\n }",
"public Locale getLocale() {\r\n return Locale.getDefault();\r\n }",
"protected String getCurrentLocaleName() {\n return LocaleInfo.getCurrentLocale().getLocaleName();\n }"
] | [
"0.8088205",
"0.80278593",
"0.7643848",
"0.76180035",
"0.76180035",
"0.75533193",
"0.75533193",
"0.75533193",
"0.7455723",
"0.74516726",
"0.7314016",
"0.7304287",
"0.72865963",
"0.7268784",
"0.72179604",
"0.7110397",
"0.7088461",
"0.70660067",
"0.704864",
"0.6969596",
"0.69649017",
"0.6940184",
"0.690072",
"0.690072",
"0.68990326",
"0.6886119",
"0.68840945",
"0.68539727",
"0.6849529",
"0.68345404",
"0.6821503",
"0.6820516",
"0.6798092",
"0.6789699",
"0.677643",
"0.67712355",
"0.6767283",
"0.6757773",
"0.67506206",
"0.6747165",
"0.6747165",
"0.6746785",
"0.6745375",
"0.67293483",
"0.6724909",
"0.67170644",
"0.6696298",
"0.6696298",
"0.66854864",
"0.6684736",
"0.6683685",
"0.6675596",
"0.6675407",
"0.6659885",
"0.665515",
"0.6636846",
"0.66294867",
"0.6604927",
"0.6583992",
"0.6574572",
"0.65724665",
"0.6555019",
"0.6552433",
"0.65429103",
"0.65335816",
"0.65335816",
"0.6521949",
"0.6506089",
"0.650421",
"0.6496749",
"0.64758337",
"0.64531696",
"0.64499307",
"0.64302963",
"0.64248264",
"0.6405539",
"0.64005685",
"0.63947934",
"0.63842905",
"0.63812274",
"0.63481593",
"0.63481593",
"0.63458073",
"0.63339126",
"0.6330781",
"0.63231665",
"0.62998277",
"0.62848544",
"0.62744784",
"0.6263452",
"0.6262823",
"0.6260976",
"0.6260773",
"0.6256472",
"0.6247263",
"0.62443",
"0.6239448",
"0.62363666",
"0.6220463",
"0.6212633"
] | 0.8189694 | 0 |
get device id. IMEI(15bits) for GSM or WCDMA, MEID(14bits) for CDMA | public static String deviceId() {
// return device id
return getTelephonyManager().getDeviceId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDeviceId() {\n String info = \"\";\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n if (null == info && null != mContext) {\n info = getIMEI();\n }\n if (null == info) {\n info = \"\";\n }\n } catch (Exception e) {\n System.out.println(\"in or out strean exception\");\n }\n return info;\n }",
"Integer getDeviceId();",
"public String imei() {\n\t\t TelephonyManager telephonyManager = (TelephonyManager) activity\n\t\t .getSystemService(Context.TELEPHONY_SERVICE);\n\t\t return telephonyManager.getDeviceId();\n\t\t}",
"private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }",
"java.lang.String getDeviceId();",
"UUID getDeviceId();",
"private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }",
"@SuppressLint(\"HardwareIds\")\n public static String getDeviceImei(Context ctx) {\n try {\n TelephonyManager telephonyManager = (TelephonyManager) ctx.getSystemService(Context.TELEPHONY_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ctx.checkSelfPermission(Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {\n String android_id = Settings.Secure.getString(ctx.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n Log.e(\"\", \"\" + \"permissionDenied\");\n return android_id;\n }\n }\n\n String deviceUniqueIdentifier = null;\n if (null != telephonyManager) {\n if (Build.VERSION.SDK_INT >= 26) {\n deviceUniqueIdentifier = telephonyManager.getImei();\n } else {\n deviceUniqueIdentifier = telephonyManager.getDeviceId();\n }\n }\n if (null == deviceUniqueIdentifier || 0 == deviceUniqueIdentifier.length()) {\n deviceUniqueIdentifier = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n }\n return deviceUniqueIdentifier;\n\n } catch (Exception e) {\n e.printStackTrace();\n return \"\";\n }\n }",
"public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }",
"private String getDeviceId(Context context){\n TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n //\n ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);\n String tmDevice = tm.getDeviceId();\n\n String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n String serial = null;\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) serial = Build.SERIAL;\n\n if(tmDevice != null) return \"01\" + tmDevice;\n if(androidId != null) return \"02\" + androidId;\n if(serial != null) return \"03\" + serial;\n\n return null;\n }",
"org.hl7.fhir.String getDeviceIdentifier();",
"public final String getDeviceId(){\n return peripheralDeviceId;\n }",
"public String getDeviceId() {\n String deviceId = ((TelephonyManager) LoginActivity.this.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();\n if (deviceId != null && !deviceId.equalsIgnoreCase(\"null\")) {\n // System.out.println(\"imei number :: \" + deviceId);\n return deviceId;\n }\n\n deviceId = android.os.Build.SERIAL;\n // System.out.println(\"serial id :: \" + deviceId);\n return deviceId;\n\n }",
"private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }",
"public String getDeviceUDID() {\r\n\t\tTelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\treturn telephonyManager.getDeviceId();\r\n\t}",
"public void get_IMEI(){\n TelephonyManager mngr = (TelephonyManager) getSystemService(this.TELEPHONY_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mngr.getDeviceId();\n }",
"public String getDeviceId() {\n\t\tString id;\n\t\tid = options.getProperty(\"id\");\n\t\tif(id == null) {\n\t\t\tid = options.getProperty(\"Device-ID\");\n\t\t}\n\t\treturn trimedValue(id);\n\t}",
"DeviceId deviceId();",
"DeviceId deviceId();",
"public String getImei() {\n //NOTE \"imei\" is the \"Device ID\" since it represents the IMEI in GSM and the MEID in CDMA\n // return mPhone.getPhoneName().equals(\"CDMA\") ? mPhone.getMeid() : mPhone.getDeviceId();\n return \"\";\n }",
"public final int getDevice()\n\t{\n\t\treturn address & 0xFF;\n\t}",
"public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }",
"public static String getUniqueDeviceID(Context context) {\n\t\tString identifier = null;\n\t\tTelephonyManager tm = (TelephonyManager) context\n\t\t\t\t.getSystemService(Context.TELEPHONY_SERVICE);\n\t\tif (tm != null)\n\t\t\tidentifier = tm.getDeviceId();\n\t\tif (identifier == null || identifier.length() == 0)\n\t\t\tidentifier = Secure.getString(context.getContentResolver(),\n\t\t\t\t\tSecure.ANDROID_ID);\n\t\t// identifier = identifier + new Random().nextInt(1000);\n\t\treturn identifier;\n\t}",
"@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }",
"private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }",
"@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }",
"public String getUniqueID(Context ctx)\n {\n String m_szDevIDShort = \"\";\n String m_szAndroidID = \"\";\n String m_szWLANMAC = \"\";\n\n try {\n m_szDevIDShort = \"35\" + // we make this look like a valid IMEI\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n m_szAndroidID = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n WifiManager wm = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);\n m_szWLANMAC = wm.getConnectionInfo().getMacAddress();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n String m_szLongID = m_szWLANMAC + m_szDevIDShort + m_szAndroidID;\n\n MessageDigest m = null;\n try {\n m = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n m.update(m_szLongID.getBytes(), 0, m_szLongID.length());\n byte p_md5Data[] = m.digest();\n\n //noinspection RedundantStringConstructorCall\n String m_szUniqueID = new String();\n for (int i = 0; i < p_md5Data.length; i++) {\n int b = (0xFF & p_md5Data[i]);\n // if it is a single digit, make sure it have 0 in front (proper\n // padding)\n if (b <= 0xF)\n m_szUniqueID += \"0\";\n // add number to string\n m_szUniqueID += Integer.toHexString(b);\n }\n\n return m_szUniqueID;\n }",
"public static String getPhoneIMEI(Context context) {\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n return telephonyManager.getDeviceId();\n }",
"@Override\n public String getDeviceId() {\n return this.strDevId;\n }",
"public final int getDeviceID() {\n return device.getDeviceID();\n }",
"public static String m567a(Context context) {\r\n if (context == null) {\r\n return null;\r\n }\r\n try {\r\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(\"phone\");\r\n return telephonyManager != null ? telephonyManager.getDeviceId() : null;\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }",
"public String getTextDeviceIdentifier() {\r\n\t\tString DeviceIdentifier = safeGetText(addVehiclesHeader.replace(\"Add Vehicle\", \"Please Enter Device IMEI Number\"), SHORTWAIT);\r\n\t\treturn DeviceIdentifier;\r\n\t}",
"@NonNull\n private String getDeviceId() {\n String ANDROID_ID = Settings.Secure.getString(cordova.getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);\n return md5(ANDROID_ID).toUpperCase();\n }",
"public String getDeviceid() {\n return deviceid;\n }",
"public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}",
"public static String m21416s(Context context) {\n if (TextUtils.isEmpty(f16894e)) {\n try {\n f16894e = ((TelephonyManager) context.getSystemService(\"phone\")).getDeviceId();\n } catch (Exception e) {\n C5205o.m21464a((Throwable) e);\n }\n }\n return f16894e;\n }",
"@Override\n public int getDeviceId() {\n return 0;\n }",
"public static String getDeviceId(Context context) {\n return getDevice(context).getId();\n }",
"public java.lang.String getDeviceId() {\n java.lang.Object ref = deviceId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n deviceId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public static FlexID testDeviceID() {\n byte[] identity = {\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0\n };\n\n return new FlexID(identity, FlexIDType.DEVICE, new AttrValuePairs(), null);\n }",
"public java.lang.String getDeviceId() {\n java.lang.Object ref = deviceId_;\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 deviceId_ = s;\n }\n return s;\n }\n }",
"public final String getVendorId(){\n return peripheralVendorId;\n }",
"private static String pseudoUniqueId() {\n\t\t// decimal\n\t\tfinal Integer DECIMAL = 10;\n\n\t\t// return the android device some common info(board, brand, CPU type +\n\t\t// ABI convention, device, display, host, id, manufacturer, model,\n\t\t// product, tags, type and user) combined string\n\t\treturn new StringBuilder().append(Build.BOARD.length() % DECIMAL)\n\t\t\t\t.append(Build.BRAND.length() % DECIMAL)\n\t\t\t\t.append(Build.CPU_ABI.length() % DECIMAL)\n\t\t\t\t.append(Build.DEVICE.length() % DECIMAL)\n\t\t\t\t.append(Build.DISPLAY.length() % DECIMAL)\n\t\t\t\t.append(Build.HOST.length() % DECIMAL)\n\t\t\t\t.append(Build.ID.length() % DECIMAL)\n\t\t\t\t.append(Build.MANUFACTURER.length() % DECIMAL)\n\t\t\t\t.append(Build.MODEL.length() % DECIMAL)\n\t\t\t\t.append(Build.PRODUCT.length() % DECIMAL)\n\t\t\t\t.append(Build.TAGS.length() % DECIMAL)\n\t\t\t\t.append(Build.TYPE.length() % DECIMAL)\n\t\t\t\t.append(Build.USER.length() % DECIMAL).toString();\n\t}",
"com.google.protobuf.ByteString\n getDeviceIdBytes();",
"public Integer getDeviceId() {\n return deviceId;\n }",
"public Integer getDeviceId() {\n return deviceId;\n }",
"private String getAdmobDeviceId()\n\t{\n\t\tString android_id = Settings.Secure.getString(activity.getContentResolver(), Settings.Secure.ANDROID_ID);\n\t\tString deviceId = md5(android_id).toUpperCase(Locale.US);\n\t\treturn deviceId;\n\t}",
"io.dstore.values.IntegerValue getNodeCharacteristicId();",
"io.dstore.values.IntegerValue getNodeCharacteristicId();",
"public String getDeviceId() {\n return this.DeviceId;\n }",
"public com.flexnet.opsembedded.webservices.ExternalIdQueryType getDeviceUniqueId() {\n return deviceUniqueId;\n }",
"public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }",
"public static String getManufacturerID(byte[] edid) {\n // Bytes 8-9 are manufacturer ID in 3 5-bit characters.\n String temp = String\n .format(\"%8s%8s\", Integer.toBinaryString(edid[8] & 0xFF), Integer.toBinaryString(edid[9] & 0xFF))\n .replace(Symbol.C_SPACE, '0');\n Logger.debug(\"Manufacurer ID: {}\", temp);\n return String.format(\"%s%s%s\", (char) (64 + Integer.parseInt(temp.substring(1, 6), 2)),\n (char) (64 + Integer.parseInt(temp.substring(7, 11), 2)),\n (char) (64 + Integer.parseInt(temp.substring(12, Normal._16), 2))).replace(Symbol.AT, Normal.EMPTY);\n }",
"java.lang.String getMachineId();",
"public String mo10115a(Context context) {\n try {\n return (String) C2342q.m9000a(\"getId\", context);\n } catch (Exception e) {\n Log.e(\"AdvertisingInfo\", \"Error getting advertising id: \" + e.getMessage());\n return null;\n }\n }",
"public static String getOldUdid(Context context) {\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n String udid = telephonyManager.getDeviceId();\n\n if (isValidImei(udid)) {\n return udid;\n }\n\n udid = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n if (!TextUtils.isEmpty(udid) && !INVALID_ANDROIDID.equals(udid.toLowerCase(Locale.getDefault()))) {\n return udid;\n }\n\n String macAddress = getWifiMacAddress(context);\n if (!TextUtils.isEmpty(macAddress)) {\n udid = toMD5(macAddress + Build.MODEL + Build.MANUFACTURER + Build.ID + Build.DEVICE);\n return udid;\n }\n String name = String.valueOf(System.currentTimeMillis());\n udid = UUID.nameUUIDFromBytes(name.getBytes()).toString();\n \n return udid;\n }",
"@NonNull\n public static String getDeviceID(@NonNull Context ctx) {\n String duid = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n return (duid == null || duid.length() == 0) ? \"emulator\" : duid;\n }",
"public String readChipID() {\r\n return mFactoryBurnUtil.readChipID();\r\n }",
"public String getCurrentCellid() {\n String cellidString = null;\n if (this.mTelephonyManager != null) {\n CellLocation mCellLocation = this.mTelephonyManager.getCellLocation();\n if (mCellLocation != null) {\n int type;\n if (mCellLocation instanceof CdmaCellLocation) {\n type = 1;\n Log.e(MessageUtil.TAG, \"getCurrentCellid type type = PHONE_TYPE_CDMA\");\n } else if (mCellLocation instanceof GsmCellLocation) {\n type = 2;\n Log.e(MessageUtil.TAG, \"getCurrentCellid type type = PHONE_TYPE_GSM\");\n } else {\n type = 0;\n }\n int cellid;\n switch (type) {\n case 1:\n Log.e(MessageUtil.TAG, \"getCurrentCellid type is PHONE_TYPE_CDMA\");\n CdmaCellLocation cdmaCellLocation = (CdmaCellLocation) mCellLocation;\n if (cdmaCellLocation != null) {\n int systemid = cdmaCellLocation.getSystemId();\n int networkid = cdmaCellLocation.getNetworkId();\n cellid = cdmaCellLocation.getBaseStationId();\n if (systemid >= 0 && networkid >= 0 && cellid >= 0) {\n cellidString = Integer.toString(systemid) + Integer.toString(networkid) + Integer.toString(cellid);\n Log.e(MessageUtil.TAG, \"getCurrentCellid PHONE_TYPE_CDMA cellidString = \" + cellidString);\n break;\n }\n return null;\n }\n break;\n case 2:\n Log.e(MessageUtil.TAG, \"getCurrentCellid type is PHONE_TYPE_GSM\");\n GsmCellLocation gsmCellLocation = (GsmCellLocation) mCellLocation;\n if (gsmCellLocation != null) {\n String plmn = this.mTelephonyManager.getNetworkOperator();\n cellid = gsmCellLocation.getCid();\n if (plmn != null && cellid >= 0) {\n cellidString = plmn + Integer.toString(cellid);\n Log.e(MessageUtil.TAG, \"getCurrentCellid PHONE_TYPE_GSM cellidString = \" + cellidString);\n break;\n }\n return null;\n }\n break;\n default:\n Log.e(MessageUtil.TAG, \"getCurrentCellid type is error\");\n break;\n }\n }\n return null;\n }\n Log.e(MessageUtil.TAG, \"getCurrentCellid mTelephonyManager == null\");\n return cellidString;\n }",
"public String getDeviceNameForMacro() {\r\n String name = getDeviceName();\r\n\r\n if(name.startsWith(\"PIC32\")) {\r\n return name.substring(3); // \"32MX795F512L\"\r\n } else if(name.startsWith(\"ATSAM\")) {\r\n return name.substring(2); // \"SAME70Q21\"\r\n } else {\r\n return name;\r\n }\r\n }",
"private DeviceId getDeviceId(String ip) {\n try {\n return DeviceId.deviceId(new URI(SCHEME_NAME, ip, null));\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(\"Unable to build deviceID for device \"\n + ip, e);\n }\n }",
"public String getMyDeviceId() {\n return myDeviceId;\n }",
"public com.google.protobuf.ByteString\n getDeviceIdBytes() {\n java.lang.Object ref = deviceId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n deviceId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"String getBusi_id();",
"public static String getIMEI(Context context) {\n\n return Settings.Secure.getString(context.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n\n }",
"final int getDeviceNum() {\n return device.getDeviceNum();\n }",
"public com.google.protobuf.ByteString\n getDeviceIdBytes() {\n java.lang.Object ref = deviceId_;\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 deviceId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static String getDeviceID(Context context) {\n return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n }",
"io.dstore.values.IntegerValue getValueCharacteristicId();",
"@Nullable\n @SuppressLint(\"HardwareIds\")\n private String createId(Context context) {\n String id = Settings.Secure.getString(\n context.getContentResolver(),\n Settings.Secure.ANDROID_ID);\n String device = Build.DEVICE;\n id += device;\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n return HexCoder.toHex(md.digest(id.getBytes(\"UTF-8\")));\n } catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {\n Log.e(TAG, \"createId: \"+e.toString());\n }\n return null;\n }",
"public String deviceId() {\n return this.deviceId;\n }",
"public String readChipID(int len) {\r\n\t return mFactoryBurnUtil.readChipID(len);\r\n\t}",
"private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }",
"public String getDeviceCode() {\n return deviceCode;\n }",
"public int get_moteId() {\n return (int)getUIntBEElement(offsetBits_moteId(), 16);\n }",
"public void getDeviceId(final Callback<String> callback)\n {\n sendEngagementCommand(new Runnable()\n {\n @Override\n public void run()\n {\n try\n {\n callback.onResult(mEngagementService.getDeviceId());\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n });\n }",
"public BigDecimal getDeviceIdentifier() {\n return deviceIdentifier;\n }",
"default public int getCodeToDevicePort()\t\t\t\t{ return 2225; }",
"public static String m570b(Context context) {\r\n if (context == null) {\r\n return null;\r\n }\r\n try {\r\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(\"phone\");\r\n return telephonyManager != null ? telephonyManager.getSubscriberId() : null;\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }",
"private void getGCM_ID() {\n if (regIDValue.length() <= 0)\n regIDValue = DriverApplication.getGCMRegistrationId(ctx);\n Log.d(\"GCM_REG_ID \", regIDValue);\n }",
"@Nullable\n @Generated\n @Selector(\"identifierForVendor\")\n public native NSUUID identifierForVendor();",
"public String readS2ChipID() {\r\n return mFactoryBurnUtil.readS2ChipID();\r\n }",
"public String getProductID() {\n final byte[] data = new byte[12];\n mem.getBytes(16, data, 0, data.length);\n return new String(data).trim();\n }",
"public static String m21396c() {\n return Build.MANUFACTURER;\n }",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"public String uuid(){\n\t\t String device_unique_id = Secure.getString(activity.getContentResolver(),\n\t\t Secure.ANDROID_ID);\n\t\t return device_unique_id;\n\t\t}",
"public SmartHomeDevice getCustomDevice(String id);",
"public String generatePhoneId() {\n String device = Build.DEVICE.equals(\"generic\") ? \"emulator\" : Build.DEVICE;\n String network = getNetwork();\n String carrier = (network == NETWORK_WIFI) ?\n getWifiCarrierName() : getTelephonyCarrierName();\n\n StringBuilder stringBuilder = new StringBuilder(ANDROID_STRING);\n stringBuilder.append('-').append(device).append('_')\n .append(Build.VERSION.RELEASE).append('_').append(network)\n .append('_').append(carrier).append('_').append(getTelephonyPhoneType())\n .append('_').append(isLandscape() ? \"Landscape\" : \"Portrait\");\n\n return stringBuilder.toString();\n }",
"public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"public abstract String getMachineID();",
"public String getWmoId() {\n String wmoID = \"\";\n if (!(stnm == GempakConstants.IMISSD)) {\n wmoID = String.valueOf(stnm / 10);\n }\n return wmoID;\n }",
"String mo10312id();",
"String getDeviceName();",
"public static synchronized String getUID() throws UnknownHostException, SocketException {\r\n \r\n // Initialized MAC address if necessary.\r\n if (!initialized) {\r\n initialized = true;\r\n macAddress = UMROMACAddress.getMACAddress();\r\n macAddress = Math.abs(macAddress);\r\n }\r\n \r\n // Use standard class to get unique values.\r\n String guidText = new UID().toString();\r\n \r\n StringTokenizer st = new StringTokenizer(guidText, \":\");\r\n \r\n int unique = Math.abs(Integer.valueOf(st.nextToken(), 16).intValue());\r\n long time = Math.abs(Long.valueOf(st.nextToken(), 16).longValue());\r\n // why add 0x8000 ? because usually starts at -8000, which wastes 4 digits\r\n int count = Math\r\n .abs(Short.valueOf(st.nextToken(), 16).shortValue() + 0x8000);\r\n \r\n // concatenate values to make it into a DICOM GUID.\r\n String guid = UMRO_ROOT_GUID + macAddress + \".\" + unique + \".\" + time\r\n + \".\" + count;\r\n \r\n return guid;\r\n }",
"public synchronized String getDeviceIdForWebSocketSession(Session session) {\n\t\tInetSocketAddress remoteAddress = session.getRemoteAddress();\n\t\tif (!deviceIdsByWebsocketRemoteAttdress.containsKey(remoteAddress)) {\n\t\t\tString deviceId = getNextDeviceId();\n\t\t\tdeviceIdsByWebsocketRemoteAttdress.put(remoteAddress, deviceId);\n\t\t\twebsocketRemoteAddressByDeviceId.put(deviceId, remoteAddress);\n\n\t\t\treturn deviceId;\n\t\t} else {\n\t\t\treturn deviceIdsByWebsocketRemoteAttdress.get(remoteAddress);\n\t\t}\n\t}",
"public String getOemID() {\n final byte[] data = new byte[8];\n mem.getBytes(8, data, 0, data.length);\n return new String(data).trim();\n }",
"public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}",
"public java.lang.String getResultDeviceGuid() {\n return resultDeviceGuid;\n }",
"public String getMaternalID();",
"public MidiDeviceDescriptor getMidiDevice();"
] | [
"0.73739004",
"0.7319825",
"0.72449744",
"0.7210673",
"0.71921265",
"0.7180565",
"0.7119717",
"0.7094825",
"0.70701706",
"0.6928318",
"0.6865942",
"0.680697",
"0.6800966",
"0.679977",
"0.67775214",
"0.67556775",
"0.67493546",
"0.670919",
"0.670919",
"0.6678004",
"0.6566153",
"0.6558434",
"0.6514611",
"0.64991546",
"0.6489682",
"0.64753354",
"0.6444616",
"0.64358115",
"0.6404314",
"0.63990104",
"0.63988155",
"0.6381167",
"0.6364407",
"0.634639",
"0.6314106",
"0.63126385",
"0.6309823",
"0.62627363",
"0.6245798",
"0.62335044",
"0.6184427",
"0.618346",
"0.6151897",
"0.6140344",
"0.6138223",
"0.6138223",
"0.6091963",
"0.6080458",
"0.6080458",
"0.6075417",
"0.60690343",
"0.6054052",
"0.6047185",
"0.6026002",
"0.60258275",
"0.60205686",
"0.6005556",
"0.5985716",
"0.5962013",
"0.5956445",
"0.59523684",
"0.5945961",
"0.5939114",
"0.591371",
"0.5910782",
"0.5886781",
"0.587893",
"0.5849471",
"0.58312166",
"0.58260876",
"0.58169186",
"0.5768745",
"0.57602227",
"0.57559854",
"0.57498705",
"0.574559",
"0.57369244",
"0.57310104",
"0.5724843",
"0.57151127",
"0.5701663",
"0.56987506",
"0.56926453",
"0.5678828",
"0.5660678",
"0.5653986",
"0.56426495",
"0.5635435",
"0.5627628",
"0.56246674",
"0.5622117",
"0.5619268",
"0.5611368",
"0.5606505",
"0.55975384",
"0.5589265",
"0.55834836",
"0.5577667",
"0.55775946",
"0.5564843"
] | 0.6587626 | 20 |
get sim serial number, ICCID(20bits) | public static String simSerialNumber() {
// return sim serial number
return getTelephonyManager().getSimSerialNumber();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getSerialNumber();",
"java.lang.String getSerialNumber();",
"java.lang.String getSerial();",
"String getSerial();",
"Integer getCCPID();",
"String getCCSID();",
"public static String getIccid() {\n\t\treturn null;\n\t}",
"public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }",
"public static String m583i(Context context) {\r\n try {\r\n return ((TelephonyManager) context.getSystemService(\"phone\")).getSimSerialNumber();\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }",
"public String readChipID() {\r\n return mFactoryBurnUtil.readChipID();\r\n }",
"public String readS2ChipID() {\r\n return mFactoryBurnUtil.readS2ChipID();\r\n }",
"public static Object getIccid() {\n\t\treturn null;\n\t}",
"public String getReceivedSerialNumber() ;",
"public byte getISerialNumber() {\r\n\t\treturn iSerialNumber;\r\n\t}",
"public String getTransmittedSerialNumber() ;",
"public String getCpuSerialNo()\n\t{\n\t\treturn cpuSerialNo;\n\t}",
"String mo10312id();",
"public static String getSerialNo(byte[] edid) {\n // Bytes 12-15 are Serial number (last 4 characters)\n if (Logger.get().isDebug()) {\n Logger.debug(\"Serial number: {}\", Arrays.toString(Arrays.copyOfRange(edid, 12, Normal._16)));\n }\n return String.format(\"%s%s%s%s\", getAlphaNumericOrHex(edid[15]), getAlphaNumericOrHex(edid[14]),\n getAlphaNumericOrHex(edid[13]), getAlphaNumericOrHex(edid[12]));\n }",
"public String getIccid() {\r\n return iccid;\r\n }",
"public String readChipID(int len) {\r\n\t return mFactoryBurnUtil.readChipID(len);\r\n\t}",
"public String getDeviceId() {\n String info = \"\";\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n if (null == info && null != mContext) {\n info = getIMEI();\n }\n if (null == info) {\n info = \"\";\n }\n } catch (Exception e) {\n System.out.println(\"in or out strean exception\");\n }\n return info;\n }",
"public int getSerialNum()\r\n\t{\r\n\t\treturn(serialNum);\r\n\t}",
"public Integer getCocSerialNo() {\n\t\treturn cocSerialNo;\n\t}",
"public String readDeviceSN(){\r\n return mFactoryBurnUtil.readDeviceSN();\r\n }",
"public String getTextDeviceIdentifier() {\r\n\t\tString DeviceIdentifier = safeGetText(addVehiclesHeader.replace(\"Add Vehicle\", \"Please Enter Device IMEI Number\"), SHORTWAIT);\r\n\t\treturn DeviceIdentifier;\r\n\t}",
"public String imei() {\n\t\t TelephonyManager telephonyManager = (TelephonyManager) activity\n\t\t .getSystemService(Context.TELEPHONY_SERVICE);\n\t\t return telephonyManager.getDeviceId();\n\t\t}",
"public String getDeviceId() {\n String deviceId = ((TelephonyManager) LoginActivity.this.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();\n if (deviceId != null && !deviceId.equalsIgnoreCase(\"null\")) {\n // System.out.println(\"imei number :: \" + deviceId);\n return deviceId;\n }\n\n deviceId = android.os.Build.SERIAL;\n // System.out.println(\"serial id :: \" + deviceId);\n return deviceId;\n\n }",
"String getBusi_id();",
"public java.math.BigInteger getSerialNumber() {\r\n return serialNumber;\r\n }",
"public abstract java.lang.String getIdpc();",
"public java.lang.String getSerialNumber() {\n java.lang.Object ref = serialNumber_;\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 serialNumber_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getSerialNumber() {\n java.lang.Object ref = serialNumber_;\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 serialNumber_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getSerialNumber() {\n\t\treturn serialNumber;\n\t}",
"public BigInteger getSerialNumber() {\n return serialNumber;\n }",
"public final String getSerial(){\n return this.peripheralSerial;\n }",
"String getCidr();",
"private String getVehicleRegNumber() {\n LOGGER.info(\"Please type the vehicle registration number \"\n + \"and press enter key\");\n return inputReaderUtil.readVehicleRegistrationNumber();\n }",
"public java.lang.String getSerialNumber() {\n java.lang.Object ref = serialNumber_;\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 serialNumber_ = s;\n return s;\n }\n }",
"public java.lang.String getSerialNumber() {\n java.lang.Object ref = serialNumber_;\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 serialNumber_ = s;\n return s;\n }\n }",
"public String getIdCardNo() {\n\t\treturn idCardNo;\n\t}",
"int getSimObjID();",
"public String getCnicNo() {\n return (String)getAttributeInternal(CNICNO);\n }",
"public java.lang.String getIDCardNo() {\r\n return localIDCardNo;\r\n }",
"public java.lang.String getIDCardNo() {\r\n return localIDCardNo;\r\n }",
"private String getIdentificationString() {\n\t\tif (clientController.client.visitorID.getVal() != null)\n\t\t\treturn clientController.client.visitorID.getVal().intern();\n\t\tif (clientController.client.logedInSubscriber.getVal() != null)\n\t\t\treturn clientController.client.logedInSubscriber.getVal().personalID;\n\t\treturn null;\n\t}",
"com.google.protobuf.ByteString\n getSerialNumberBytes();",
"com.google.protobuf.ByteString\n getSerialNumberBytes();",
"org.hl7.fhir.String getDeviceIdentifier();",
"public String getSerialNumber()\n {\n return serialNumber;\n }",
"public WsmSimcardIdentifier getIdentificadorSimcardByIccid(String iccid)\r\n\t{\r\n\t\t// Nova instancia do WsmSimcardIdentifier, ja com os parametros informados\r\n\t\tWsmSimcardIdentifier identificadorSimcard = new WsmSimcardIdentifier(iccid, WsmSimcardIdentifier.SIM_TYPE_ICCID);\r\n\t\t\r\n\t\t// Retorno do objeto\r\n\t\treturn identificadorSimcard;\r\n\t}",
"public int nextSerialNumber(){\n serialNumber++;\n return serialNumber;\n }",
"@Deprecated\r\n\tpublic String readMACID(){\r\n\t\treturn \"\";\r\n\t}",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"long getSeqnum();",
"public String getSerialNumber()\n {\n return _serialNumber;\n }",
"String getIdNumber();",
"public long getSerial() {\n\t\treturn this.serialNumber;\n\t}",
"public String getImei() {\n //NOTE \"imei\" is the \"Device ID\" since it represents the IMEI in GSM and the MEID in CDMA\n // return mPhone.getPhoneName().equals(\"CDMA\") ? mPhone.getMeid() : mPhone.getDeviceId();\n return \"\";\n }",
"private String getDeviceId(Context context){\n TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n //\n ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);\n String tmDevice = tm.getDeviceId();\n\n String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n String serial = null;\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) serial = Build.SERIAL;\n\n if(tmDevice != null) return \"01\" + tmDevice;\n if(androidId != null) return \"02\" + androidId;\n if(serial != null) return \"03\" + serial;\n\n return null;\n }",
"public String getIdCardNo() {\n return idCardNo;\n }",
"public int getICID() {\n return icid;\n }",
"public String getMaternalID();",
"public String getWmoId() {\n String wmoID = \"\";\n if (!(stnm == GempakConstants.IMISSD)) {\n wmoID = String.valueOf(stnm / 10);\n }\n return wmoID;\n }",
"public String getCQcIdseq() {\n return (String) getAttributeInternal(CQCIDSEQ);\n }",
"public long getComNumber() {\r\n return comNumber;\r\n }",
"public int getCCN(){\n\t\treturn ccn;\n\t}",
"public int CCID() {\n\t\treturn this.creditCardIDNum;\n\t}",
"public static synchronized String getUID() throws UnknownHostException, SocketException {\r\n \r\n // Initialized MAC address if necessary.\r\n if (!initialized) {\r\n initialized = true;\r\n macAddress = UMROMACAddress.getMACAddress();\r\n macAddress = Math.abs(macAddress);\r\n }\r\n \r\n // Use standard class to get unique values.\r\n String guidText = new UID().toString();\r\n \r\n StringTokenizer st = new StringTokenizer(guidText, \":\");\r\n \r\n int unique = Math.abs(Integer.valueOf(st.nextToken(), 16).intValue());\r\n long time = Math.abs(Long.valueOf(st.nextToken(), 16).longValue());\r\n // why add 0x8000 ? because usually starts at -8000, which wastes 4 digits\r\n int count = Math\r\n .abs(Short.valueOf(st.nextToken(), 16).shortValue() + 0x8000);\r\n \r\n // concatenate values to make it into a DICOM GUID.\r\n String guid = UMRO_ROOT_GUID + macAddress + \".\" + unique + \".\" + time\r\n + \".\" + count;\r\n \r\n return guid;\r\n }",
"public void get_IMEI(){\n TelephonyManager mngr = (TelephonyManager) getSystemService(this.TELEPHONY_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mngr.getDeviceId();\n }",
"public WsmSimcardIdentifier getIdentificadorSimcardByImsi(String imsi)\r\n\t{\r\n\t\t// Nova instancia do WsmSimcardIdentifier, ja com os parametros informados\r\n\t\tWsmSimcardIdentifier identificadorSimcard = new WsmSimcardIdentifier(imsi, WsmSimcardIdentifier.SIM_TYPE_IMSI);\r\n\t\t\r\n\t\t// Retorno do objeto\r\n\t\treturn identificadorSimcard;\r\n\t}",
"java.lang.String getDeviceId();",
"public AtomicInteger getSerialNo() {\n return serialNo;\n }",
"public String getCurrentCellid() {\n String cellidString = null;\n if (this.mTelephonyManager != null) {\n CellLocation mCellLocation = this.mTelephonyManager.getCellLocation();\n if (mCellLocation != null) {\n int type;\n if (mCellLocation instanceof CdmaCellLocation) {\n type = 1;\n Log.e(MessageUtil.TAG, \"getCurrentCellid type type = PHONE_TYPE_CDMA\");\n } else if (mCellLocation instanceof GsmCellLocation) {\n type = 2;\n Log.e(MessageUtil.TAG, \"getCurrentCellid type type = PHONE_TYPE_GSM\");\n } else {\n type = 0;\n }\n int cellid;\n switch (type) {\n case 1:\n Log.e(MessageUtil.TAG, \"getCurrentCellid type is PHONE_TYPE_CDMA\");\n CdmaCellLocation cdmaCellLocation = (CdmaCellLocation) mCellLocation;\n if (cdmaCellLocation != null) {\n int systemid = cdmaCellLocation.getSystemId();\n int networkid = cdmaCellLocation.getNetworkId();\n cellid = cdmaCellLocation.getBaseStationId();\n if (systemid >= 0 && networkid >= 0 && cellid >= 0) {\n cellidString = Integer.toString(systemid) + Integer.toString(networkid) + Integer.toString(cellid);\n Log.e(MessageUtil.TAG, \"getCurrentCellid PHONE_TYPE_CDMA cellidString = \" + cellidString);\n break;\n }\n return null;\n }\n break;\n case 2:\n Log.e(MessageUtil.TAG, \"getCurrentCellid type is PHONE_TYPE_GSM\");\n GsmCellLocation gsmCellLocation = (GsmCellLocation) mCellLocation;\n if (gsmCellLocation != null) {\n String plmn = this.mTelephonyManager.getNetworkOperator();\n cellid = gsmCellLocation.getCid();\n if (plmn != null && cellid >= 0) {\n cellidString = plmn + Integer.toString(cellid);\n Log.e(MessageUtil.TAG, \"getCurrentCellid PHONE_TYPE_GSM cellidString = \" + cellidString);\n break;\n }\n return null;\n }\n break;\n default:\n Log.e(MessageUtil.TAG, \"getCurrentCellid type is error\");\n break;\n }\n }\n return null;\n }\n Log.e(MessageUtil.TAG, \"getCurrentCellid mTelephonyManager == null\");\n return cellidString;\n }",
"public static String m21417t(Context context) {\n if (TextUtils.isEmpty(f16893d)) {\n try {\n f16893d = ((TelephonyManager) context.getSystemService(\"phone\")).getSubscriberId();\n } catch (Exception e) {\n C5205o.m21464a((Throwable) e);\n }\n }\n return f16893d;\n }",
"public String getSerialNumber() {\n\t\treturn serialNumber;\n\t}",
"public String getDevSerialNumber() {\n return devSerialNumber;\n }",
"public com.google.protobuf.ByteString\n getSerialNumberBytes() {\n java.lang.Object ref = serialNumber_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n serialNumber_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getSerialNumberBytes() {\n java.lang.Object ref = serialNumber_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n serialNumber_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private long getNewSerialNumber() {\n\t\tSystem.out.print(\"Please enter the correct serial number: \");\n\t\ttry {\n\t\t\treturn sc.nextLong();\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.out.println(\"----->Invalid input. A number was expected.<-----\");\n\t\t\tsc.nextLine();\n\t\t\treturn this.getNewSerialNumber();\n\t\t}\n\t}",
"long getRfIdentifier();",
"public int mo15797hn() {\n return this.f3883JI;\n }",
"public static int m21411n(Context context) {\n if (TextUtils.isEmpty(f16896g)) {\n f16896g = ((TelephonyManager) context.getSystemService(\"phone\")).getSimOperator();\n if (TextUtils.isEmpty(f16896g)) {\n f16896g = \"\";\n }\n }\n if (!\"46000\".equals(f16896g)) {\n if (!\"46002\".equals(f16896g)) {\n if (!\"46004\".equals(f16896g)) {\n if (!\"46007\".equals(f16896g)) {\n if (!\"46008\".equals(f16896g)) {\n if (!\"46001\".equals(f16896g)) {\n if (!\"46006\".equals(f16896g)) {\n if (!\"46009\".equals(f16896g)) {\n if (!\"46003\".equals(f16896g)) {\n if (!\"46005\".equals(f16896g)) {\n if (!\"46011\".equals(f16896g)) {\n return \"46020\".equals(f16896g) ? 4 : 0;\n }\n }\n }\n return 3;\n }\n }\n }\n return 2;\n }\n }\n }\n }\n }\n return 1;\n }",
"public String nextSessionId() {\n\t\tSecureRandom random = new SecureRandom();\n\t\treturn new BigInteger(130, random).toString(32);\n\t}",
"public com.google.protobuf.ByteString\n getSerialNumberBytes() {\n java.lang.Object ref = serialNumber_;\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 serialNumber_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getSerialNumberBytes() {\n java.lang.Object ref = serialNumber_;\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 serialNumber_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getSerialNo() {\n\t\treturn serialNo;\n\t}",
"public String getUniqueID(Context ctx)\n {\n String m_szDevIDShort = \"\";\n String m_szAndroidID = \"\";\n String m_szWLANMAC = \"\";\n\n try {\n m_szDevIDShort = \"35\" + // we make this look like a valid IMEI\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n m_szAndroidID = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n WifiManager wm = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);\n m_szWLANMAC = wm.getConnectionInfo().getMacAddress();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n String m_szLongID = m_szWLANMAC + m_szDevIDShort + m_szAndroidID;\n\n MessageDigest m = null;\n try {\n m = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n m.update(m_szLongID.getBytes(), 0, m_szLongID.length());\n byte p_md5Data[] = m.digest();\n\n //noinspection RedundantStringConstructorCall\n String m_szUniqueID = new String();\n for (int i = 0; i < p_md5Data.length; i++) {\n int b = (0xFF & p_md5Data[i]);\n // if it is a single digit, make sure it have 0 in front (proper\n // padding)\n if (b <= 0xF)\n m_szUniqueID += \"0\";\n // add number to string\n m_szUniqueID += Integer.toHexString(b);\n }\n\n return m_szUniqueID;\n }",
"public String mo23261C() {\n return (String) this.f13965a.mo23249a(C7196pb.f13683Dd);\n }",
"private String m29111g() {\n PersistentConfiguration cVar = this.f22554b;\n if (cVar != null) {\n String string = cVar.getString(\"UTDID2\");\n if (!C6804i.m29033a(string) && this.f22552a.mo32716a(string) != null) {\n return string;\n }\n }\n return null;\n }",
"private static String pseudoUniqueId() {\n\t\t// decimal\n\t\tfinal Integer DECIMAL = 10;\n\n\t\t// return the android device some common info(board, brand, CPU type +\n\t\t// ABI convention, device, display, host, id, manufacturer, model,\n\t\t// product, tags, type and user) combined string\n\t\treturn new StringBuilder().append(Build.BOARD.length() % DECIMAL)\n\t\t\t\t.append(Build.BRAND.length() % DECIMAL)\n\t\t\t\t.append(Build.CPU_ABI.length() % DECIMAL)\n\t\t\t\t.append(Build.DEVICE.length() % DECIMAL)\n\t\t\t\t.append(Build.DISPLAY.length() % DECIMAL)\n\t\t\t\t.append(Build.HOST.length() % DECIMAL)\n\t\t\t\t.append(Build.ID.length() % DECIMAL)\n\t\t\t\t.append(Build.MANUFACTURER.length() % DECIMAL)\n\t\t\t\t.append(Build.MODEL.length() % DECIMAL)\n\t\t\t\t.append(Build.PRODUCT.length() % DECIMAL)\n\t\t\t\t.append(Build.TAGS.length() % DECIMAL)\n\t\t\t\t.append(Build.TYPE.length() % DECIMAL)\n\t\t\t\t.append(Build.USER.length() % DECIMAL).toString();\n\t}",
"public static native String getSatId(int satNo);",
"public static String getPhoneIMEI(Context context) {\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n return telephonyManager.getDeviceId();\n }",
"Integer getDeviceId();",
"public int get_infos_seq_num() {\n return (int)getUIntBEElement(offsetBits_infos_seq_num(), 16);\n }",
"public static String m21416s(Context context) {\n if (TextUtils.isEmpty(f16894e)) {\n try {\n f16894e = ((TelephonyManager) context.getSystemService(\"phone\")).getDeviceId();\n } catch (Exception e) {\n C5205o.m21464a((Throwable) e);\n }\n }\n return f16894e;\n }"
] | [
"0.7191308",
"0.7191308",
"0.7014634",
"0.6885748",
"0.67015296",
"0.65971226",
"0.65904313",
"0.652406",
"0.6511594",
"0.6402503",
"0.63778996",
"0.6372338",
"0.6341703",
"0.6339693",
"0.6237346",
"0.6235826",
"0.6230206",
"0.6201878",
"0.6198837",
"0.618638",
"0.61622816",
"0.61614525",
"0.6112932",
"0.6106339",
"0.6096305",
"0.6083778",
"0.6078785",
"0.6075249",
"0.60599643",
"0.6041842",
"0.6029804",
"0.6029804",
"0.59978336",
"0.5989258",
"0.5983059",
"0.5981466",
"0.597685",
"0.5968073",
"0.5968073",
"0.5944408",
"0.5936977",
"0.59354156",
"0.59302187",
"0.59302187",
"0.5928836",
"0.59206206",
"0.59206206",
"0.5916565",
"0.5914211",
"0.59134305",
"0.59105533",
"0.5896996",
"0.5878892",
"0.5878892",
"0.5878892",
"0.5878892",
"0.5878892",
"0.5878892",
"0.5878892",
"0.5878361",
"0.58734345",
"0.58725613",
"0.5868057",
"0.58658767",
"0.58635247",
"0.5861195",
"0.5858483",
"0.5850965",
"0.584998",
"0.58468765",
"0.5846563",
"0.58431906",
"0.5840275",
"0.58333415",
"0.5822758",
"0.58199304",
"0.5819811",
"0.5814401",
"0.5812031",
"0.57793266",
"0.577895",
"0.57748914",
"0.57748914",
"0.575789",
"0.57479745",
"0.5745639",
"0.57442266",
"0.57399493",
"0.5731923",
"0.5731923",
"0.57161087",
"0.5713107",
"0.5710368",
"0.5708453",
"0.570805",
"0.570755",
"0.5700959",
"0.57000893",
"0.5697581",
"0.56948316"
] | 0.7000247 | 3 |
get wlan mac address | public static String wlanMacAddress() {
String _ret = null;
// get wifi manager
WifiManager _wifiManager = (WifiManager) CTApplication.getContext()
.getSystemService(Context.WIFI_SERVICE);
// check wifi manager and return waln mac address
if (null != _wifiManager) {
// check the wifi state
if (!_wifiManager.isWifiEnabled()) {
// open the wlan
_wifiManager.setWifiEnabled(true);
// get wlan mac address(has 3-5 seconds delay)
_ret = _wifiManager.getConnectionInfo().getMacAddress();
// close the wlan
_wifiManager.setWifiEnabled(false);
} else {
// get wlan mac address
_ret = _wifiManager.getConnectionInfo().getMacAddress();
}
}
return _ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getWlanMacAddress() {\n WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);\n WifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\n String macAddress = wifiInfo == null ? null : wifiInfo.getMacAddress();\n return !TextUtils.isEmpty(macAddress) ? macAddress : \"Unavailable\";\n }",
"public String getMac(){\n WifiManager manager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);\n WifiInfo info = manager.getConnectionInfo();\n return info.getMacAddress();\n }",
"private static String getMacAddress(){\n\t\ttry {\n\t\t\t//getting hardware address from inside a virtual machine from NetworkInterface object returns null, so need a gambiarra.\n\t\t\t//if this issue is ever solved please replace for the appropriate code\n\t\t\tString command = \"ifconfig\";\n\t\t\tProcess p = Runtime.getRuntime().exec(command);\n\t\t\tBufferedReader inn = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n\t\t\tString line = inn.readLine();\n\n\t\t\twhile( line != null ){\n\t\t\t\t\n\t\t\t\tif(line.indexOf(\"eth0\") >= 0){\n\t\t\t\t\tString[] split = line.split(\" \");\n\t\t\t\t\treturn split[split.length-1];\n\t\t\t\t}\n\n\t\t\t\tline = inn.readLine();\n\t\t\t}\n\n\t\t\tinn.close();\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\treturn \"error\";\n\t}",
"public static String getMacAddress() {\n try {\n List<NetworkInterface> all = Collections.list(NetworkInterface.getNetworkInterfaces());\n for (NetworkInterface nif : all) {\n if (!nif.getName().equalsIgnoreCase(\"wlan0\")) continue;\n\n byte[] macBytes = nif.getHardwareAddress();\n if (macBytes == null) {\n return \"\";\n }\n\n StringBuilder res1 = new StringBuilder();\n for (byte b : macBytes) {\n res1.append(String.format(\"%02X:\",b));\n }\n\n if (res1.length() > 0) {\n res1.deleteCharAt(res1.length() - 1);\n }\n return res1.toString();\n }\n } catch (Exception ex) {\n }\n return \"02:00:00:00:00:00\";\n }",
"public static\n String getMACAddress()\n {\n String sResult = null;\n try {\n Process pid = Runtime.getRuntime().exec(\"ipconfig /all\");\n BufferedReader in = new BufferedReader(new InputStreamReader(pid.getInputStream()));\n String sLine = null;\n while((sLine = in.readLine()) != null) {\n if(getOccurrences(sLine, '-') == 5) {\n int i = sLine.lastIndexOf('-');\n sResult = sLine.substring(i - 14, i + 3);\n break;\n }\n }\n in.close();\n }\n catch(Exception ex) {\n ex.printStackTrace();\n }\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" MAC Address = \" + sResult);\n return sResult;\n }",
"public java.lang.String getUser_mac();",
"private static String getMacAddress(Context context) {\n // android devices should have a wifi address\n final String wlanAddress = readAddressFromInterface(\"wlan0\");\n\n if (wlanAddress != null) {\n return wlanAddress.replace(\"\\n\", \"\").toUpperCase();\n }\n\n final String ethAddress = readAddressFromInterface(\"eth0\");\n if (ethAddress != null) {\n return ethAddress.replace(\"\\n\", \"\").toUpperCase();\n }\n\n // backup -> read from Wifi!\n if (!Utils.checkPermission(context, android.Manifest.permission.ACCESS_WIFI_STATE)) {\n return \"\";\n } else {\n try {\n final WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\n @SuppressWarnings(\"MissingPermission\") final String wifiAddress = wifiManager.getConnectionInfo().getMacAddress();\n\n if (wifiAddress != null) {\n return wifiAddress;\n }\n } catch (Exception e) {\n log.debug(e.getMessage(), e);\n }\n }\n\n return null;\n }",
"public String getEthernetMacAddress(){\n\t try {\n\t return loadFileAsString(\"/sys/class/net/eth0/address\")\n\t .toUpperCase().substring(0, 17);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t return null;\n\t }\n\t}",
"public static String m581h(Context context) {\r\n try {\r\n return ((WifiManager) context.getSystemService(\"wifi\")).getConnectionInfo().getMacAddress();\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }",
"@Option MacAddress getMacAddress();",
"String getMacAddress() {\n return String.format(\"%s:%s:%s:%s:%s:%s\", macAddress.substring(0, 2), macAddress.substring(2, 4),\n macAddress.substring(4, 6), macAddress.substring(6, 8), macAddress.substring(8, 10), macAddress.substring(10, 12));\n }",
"public String getMac() {\n\t\treturn InfraUtil.getMacAddress();\n\t}",
"public String macAddress() {\n return this.macAddress;\n }",
"public String getMacAddress()\r\n\t{\r\n\t\treturn macAddress;\r\n\t}",
"public String readEthMAC() {\r\n\t\treturn mFactoryBurnUtil.readEthMAC();\r\n\t}",
"public String getMacAddress()\n {\n return macAddress;\n }",
"public String getMacAddress()\n\t{\n\t\treturn macAddress;\n\t}",
"public MACAddress getMacAddress() \n\t{\n\t\treturn this.hwAddress;\n\t}",
"public static String bluetoothMacAddress() {\n\t\tString _ret = null;\n\n\t\t// get a handle to the default local Bluetooth adapter\n\t\tBluetoothAdapter _localBluetoothAdapter = BluetoothAdapter\n\t\t\t\t.getDefaultAdapter();\n\n\t\t// check default local bluetooth adapter and return bluetooth mac\n\t\t// address\n\t\tif (null != _localBluetoothAdapter) {\n\t\t\t// check the bluetooth state\n\t\t\tif (!_localBluetoothAdapter.isEnabled()) {\n\t\t\t\t// open the bluetooth\n\t\t\t\t_localBluetoothAdapter.enable();\n\n\t\t\t\t// get default local bluetooth mac address(has 1-2 seconds\n\t\t\t\t// delay)\n\t\t\t\t_ret = _localBluetoothAdapter.getAddress();\n\n\t\t\t\t// close the bluetooth\n\t\t\t\t_localBluetoothAdapter.disable();\n\t\t\t} else {\n\t\t\t\t// get default local bluetooth mac address\n\t\t\t\t_ret = _localBluetoothAdapter.getAddress();\n\t\t\t}\n\t\t}\n\n\t\treturn _ret;\n\t}",
"public String getMacAddress() {\n return macAddress;\n }",
"public String getMacAddress() {\n return macAddress;\n }",
"public static String getMac(InetAddress add) throws SocketException,NullPointerException{\n\t\t\n\t\tNetworkInterface network = NetworkInterface.getByInetAddress(add);\n\t\tbyte[] mac = network.getHardwareAddress();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < mac.length; i++) {\n\t\t\tsb.append(String.format(\"%02X%s\", mac[i], (i < mac.length - 1) ? \"-\" : \"\"));\t\t\n\t\t}\n\t\tData.MAC_ADDRESS=sb.toString();\n\t\treturn sb.toString();\n\t\t\n\t}",
"private static String m21383C(Context context) {\n WifiInfo wifiInfo;\n String str = \"02:00:00:00:00:00\";\n if (context == null) {\n return str;\n }\n WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(\"wifi\");\n if (wifiManager == null) {\n return str;\n }\n try {\n wifiInfo = wifiManager.getConnectionInfo();\n } catch (Exception e) {\n C5205o.m21464a((Throwable) e);\n wifiInfo = null;\n }\n if (wifiInfo == null) {\n return null;\n }\n String macAddress = wifiInfo.getMacAddress();\n if (!TextUtils.isEmpty(macAddress)) {\n macAddress = macAddress.toUpperCase(Locale.ENGLISH);\n }\n return macAddress;\n }",
"public static String getMacCliente(){\n\t\tInetAddress ip;\n\t\tbyte[] mac = null;\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost();\n\t\t\tNetworkInterface network = NetworkInterface.getByInetAddress(ip);\n\n\t\t\tmac = network.getHardwareAddress();\n\t\t\tfor (int i = 0; i < mac.length; i++) {\n\t\t\t\tsb.append(String.format(\"%02X%s\", mac[i],(i < mac.length - 1) ? \"-\" : \"\"));\n\t\t\t}\n\t\t} catch (UnknownHostException e) {\n\t\t\t//Log.error(e, \"Utiles :: getMacCliente :: controlado\");\n\t\t} catch (SocketException e) {\n\t\t\t//Log.error(e, \"Utiles :: getMacCliente :: controlado\");\n\t\t} catch (NullPointerException e){\n\t\t\t//Log.error(e, \"Utiles :: getMacCliente :: controlado\");\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public static String macAddress(String interfaceName) {\n\t try {\n\t List<NetworkInterface> interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());\n\t for (NetworkInterface intf : interfaces) {\n\t if (interfaceName != null) {\n\t if (!intf.getName().equalsIgnoreCase(interfaceName)) continue;\n\t }\n\t byte[] mac = intf.getHardwareAddress();\n\t if (mac==null) return \"\";\n\t StringBuilder buf = new StringBuilder();\n\t for (int idx=0; idx<mac.length; idx++)\n\t buf.append(String.format(\"%02X:\", mac[idx])); \n\t if (buf.length()>0) buf.deleteCharAt(buf.length()-1);\n\t return buf.toString();\n\t }\n\t } catch (Exception ex) { } // for now eat exceptions\n\t return \"\";\n\t /*try {\n\t // this is so Linux hack\n\t return loadFileAsString(\"/sys/class/net/\" +interfaceName + \"/address\").toUpperCase().trim();\n\t } catch (IOException ex) {\n\t return null;\n\t }*/\n\t }",
"public java.lang.String getMac() {\n return mac;\n }",
"public static String getMACAddress(String interfaceName) {\n try {\n List<NetworkInterface> interfaces = Collections\n .list(NetworkInterface.getNetworkInterfaces());\n for (NetworkInterface intf : interfaces) {\n if (interfaceName != null) {\n if (!intf.getName().equalsIgnoreCase(interfaceName))\n continue;\n }\n byte[] mac = intf.getHardwareAddress();\n if (mac == null)\n return \"\";\n StringBuilder buf = new StringBuilder();\n for (int idx = 0; idx < mac.length; idx++)\n buf.append(String.format(\"%02X:\", mac[idx]));\n if (buf.length() > 0)\n buf.deleteCharAt(buf.length() - 1);\n return buf.toString();\n }\n } catch (Exception ex) {\n } // for now eat exceptions\n return \"\";\n\n }",
"public static String getLocalMac() {\n\t\tif (!mInitialized) Log.v(\"OpenIp\", \"Initialisation isn't done\");\n\t\treturn localMac;\n\t}",
"private String getWifiIP()\n {\n WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE);\n @SuppressWarnings(\"deprecation\")\n String ip = Formatter.formatIpAddress(wm.getConnectionInfo().getIpAddress());\n return ip;\n }",
"public static String getNetMac() {\n\t\tif (!mInitialized) Log.v(\"OpenIp\", \"Initialisation isn't done\");\n\t\treturn netMac;\n\t}",
"public String getMACCHN()\n {\n return this.MACCHN;\n }",
"public String getMacNo() {\r\n return macNo;\r\n }",
"java.lang.String getAgentMac();",
"public Mac getMac() {\r\n return mac;\r\n }",
"public static String getDeviceMacAddress(Context context) {\n final String macAddress = getMacAddress(context);\n\n if (macAddress == null) {\n return \"\";\n }\n\n log.debug(\"macAddress: \" + macAddress);\n\n return StringUtils.cleanSpaceCharacterFromString(macAddress.toUpperCase(Locale.UK));\n }",
"public InetAddress getIP()\r\n\r\n {\r\n InetAddress ip=null;\r\n try{\r\n WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\r\n DhcpInfo dhcp = wifi.getDhcpInfo();\r\n int dip=dhcp.ipAddress;\r\n byte[] quads = new byte[4];\r\n for (int k = 0; k < 4; k++)\r\n quads[k] = (byte) (dip >> (k * 8));\r\n ip= InetAddress.getByAddress(quads);\r\n } catch (UnknownHostException e) {\r\n e.printStackTrace();\r\n }\r\n return ip;\r\n }",
"java.lang.String getBssid();",
"private String getWifiIPAddress() {\n\t\tWifiManager wifiManager = (WifiManager) this.getSystemService(this.WIFI_SERVICE);\n\t\tWifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\n\t\tint ipAddress = wifiInfo.getIpAddress();\n\n\t\tif(ipAddress != 0)\n\t\t\t//\n\t\t\treturn String.format(\"%d.%d.%d.%d\",\n\t\t\t\t\t(ipAddress & 0xff), (ipAddress >> 8 & 0xff),\n\t\t\t\t\t(ipAddress >> 16 & 0xff), (ipAddress >> 24 & 0xff));\n\t\telse\n\t\t\treturn \"127.0.0.1\";\n\t}",
"private static String m21398d() {\n try {\n for (NetworkInterface networkInterface : Collections.list(NetworkInterface.getNetworkInterfaces())) {\n if (networkInterface.getName().equalsIgnoreCase(\"wlan0\")) {\n byte[] hardwareAddress = networkInterface.getHardwareAddress();\n if (hardwareAddress == null) {\n return \"\";\n }\n StringBuilder sb = new StringBuilder();\n for (byte valueOf : hardwareAddress) {\n sb.append(String.format(\"%02X:\", new Object[]{Byte.valueOf(valueOf)}));\n }\n if (sb.length() > 0) {\n sb.deleteCharAt(sb.length() - 1);\n }\n return sb.toString();\n }\n }\n } catch (Throwable th) {\n C5205o.m21464a(th);\n }\n return \"02:00:00:00:00:00\";\n }",
"@Deprecated\r\n public String readWiFiMAC(String wifiModelType) {\r\n return mFactoryBurnUtil.readWiFiMAC(wifiModelType);\r\n }",
"private static final long getHostId(){\n long macAddressAsLong = 0;\n try {\n Random random = new Random();\n InetAddress address = InetAddress.getLocalHost();\n NetworkInterface ni = NetworkInterface.getByInetAddress(address);\n if (ni != null) {\n byte[] mac = ni.getHardwareAddress();\n random.nextBytes(mac); // we don't really want to reveal the actual MAC address\n\n //Converts array of unsigned bytes to an long\n if (mac != null) {\n for (int i = 0; i < mac.length; i++) {\n macAddressAsLong <<= 8;\n macAddressAsLong ^= (long)mac[i] & 0xFF;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return macAddressAsLong;\n }",
"public String getMac() {\n return this.Mac;\n }",
"public static MacAddress getRouterMacAddress(KubevirtRouter router) {\n if (router.mac() == null) {\n log.warn(\"Failed to get mac address of router {}\", router.name());\n }\n\n return router.mac();\n }",
"@NonNull\n public static String getMACAddress(String interfaceName) throws SocketException {\n List<NetworkInterface> interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());\n for (NetworkInterface netInterface : interfaces) {\n if (interfaceName != null) {\n if (!netInterface.getName().equalsIgnoreCase(interfaceName)) continue;\n }\n byte[] mac = netInterface.getHardwareAddress();\n if (mac == null) return \"\";\n StringBuilder buf = new StringBuilder();\n for (byte aMac : mac) buf.append(String.format(\"%02X:\", aMac));\n if (buf.length() > 0) buf.deleteCharAt(buf.length() - 1);\n return buf.toString();\n }\n\n return \"\";\n }",
"public String getStrmac() {\n return strmac;\n }",
"private String getMobileIP(){\n try {\n for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces();\n en.hasMoreElements();) {\n NetworkInterface networkinterface = en.nextElement();\n for (Enumeration<InetAddress> enumIpAddr = networkinterface.getInetAddresses(); enumIpAddr.hasMoreElements();) {\n InetAddress inetAddress = enumIpAddr.nextElement();\n if (!inetAddress.isLoopbackAddress()) {\n return inetAddress.getHostAddress().toString();\n }\n }\n }\n } catch (Exception ex) {\n Log.e(\"Current IP\", ex.toString());\n }\n return null;\n }",
"@Override\n public String getMACAddress()\n {\n String id = client.properties().getString(Keys.client_id);\n if (id == null)\n {\n ClientIDGenerator gen = new ClientIDGenerator();\n id = gen.generateId();\n client.properties().setString(Keys.client_id, id);\n }\n return id;\n //return AppUtil.getMACAddress(this);\n }",
"public InetAddress getBroadcastAddress() {\r\n InetAddress ip=null;\r\n try{\r\n WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\r\n DhcpInfo dhcp = wifi.getDhcpInfo();\r\n int broadcast = (dhcp.ipAddress & dhcp.netmask) | ~dhcp.netmask;\r\n byte[] quads = new byte[4];\r\n for (int k = 0; k < 4; k++)\r\n quads[k] = (byte) (broadcast >> (k * 8));\r\n ip= InetAddress.getByAddress(quads);\r\n }catch(IOException e)\r\n {\r\n\r\n }\r\n\r\n return ip;\r\n }",
"public String getFormattedMACAddress() {\n String defaultReturn = \"00:00:00:00:00:00\";\n\n // Validate the data\n if (macAddress == null) {\n return defaultReturn;\n }\n String mac = macAddress.replace(\"-\", \"\");\n if (mac.length() != 12) {\n return defaultReturn;\n }\n\n List<String> parts = new ArrayList<>();\n for (int i = 0; i < 6; i++) {\n int offset = 2 * i;\n parts.add(mac.substring(offset, offset + 2));\n }\n\n return String.join(\":\", parts);\n }",
"private void checkWifiStep1() {\n\n Log.i(\"checkk\", \"ikan\");\n\n WifiManager wifiManager= (WifiManager)getApplicationContext().getSystemService(Context.WIFI_SERVICE);\n\n WifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\n String name = wifiInfo.getSSID();\n\n //String macbabyyy = wifiInfo.getMacAddress();\n\n String bssiddda = wifiInfo.getBSSID();\n\n //wifiInfo.get\n\n // Log.i(\"checkk mac\",macbabyyy);\n Log.i(\"checkk bssid\",bssiddda);\n Log.i(\"checkk ssid\",name);\n\n Toast.makeText(getApplicationContext(),\"wifi ini :\"+ name, Toast.LENGTH_LONG).show();\n\n //asking fine location permission\n\n String constWifiName = \"\\\"arif0527 2.4GHz@unifi\\\"\";\n\n if(name.equals(constWifiName)){\n\n Log.i(\"checkk BERJAYA : \",bssiddda);\n Toast.makeText(getApplicationContext(),\"BERJAYA :\"+ name, Toast.LENGTH_LONG).show();\n message.setText(\"BERJAYA!!\");\n }\n\n\n }",
"public MAC getMacDest() {\n\t\treturn macDest;\n\t}",
"public String getMAddr() {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getMaddr () \");\n Via via=(Via)sipHeader;\n \n Host host=via.getMaddr();\n if ( host == null) return null;\n else return host.getIpAddress(); \n }",
"public String getMacBluetooth()\n/* */ {\n/* 69 */ return this.macBluetooth;\n/* */ }",
"private BandInfo infoFromMac(String mac) {\n BandInfo[] bands = pairedBands;//BandClientManager.getInstance().getPairedBands();\n for (BandInfo b :\n bands) {\n if (b.getMacAddress().equals(mac)) {\n return b;\n }\n }\n\n // Failed to find the bandInfo matching the MAC address, create one and store\n Log.e(TAG, \"Failed to find the MAC address \" + mac);\n return null;\n }",
"private static String m21388a(WifiManager wifiManager) {\n String a = m21386a(wifiManager.getConnectionInfo().getIpAddress());\n return a != null ? a : \"\";\n }",
"public String getArpTable(String ipAddr) throws IOException {\n Scanner s = new Scanner(Runtime.getRuntime().exec(ARP_CMD +\" \"+ ipAddr).getInputStream()).useDelimiter(\"\\\\A\");\n String sysInput = s.next();\n String mac = \"\";\n Pattern pattern = Pattern.compile(mac_regex);\n Matcher matcher = pattern.matcher(sysInput);\n if (matcher.find()) {\n mac = mac + matcher.group().replaceAll(\"\\\\-\", \":\");\n } \n return mac.strip();\n\t}",
"@SuppressLint(\"DefaultLocale\")\n\tprivate String getIpAddr()\n\t{\n\t\tString ipString = null;\n\t\tWifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);\n\t\tif (wifiManager != null)\n\t\t{\n\t\t\tWifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\t\t\tif (wifiInfo != null)\n\t\t\t{\n\t\t\t\tint ip = wifiInfo.getIpAddress();\n\n\t\t\t\tipString = String.format(\"%d.%d.%d.%d\", (ip & 0xff),\n\t\t\t\t\t(ip >> 8 & 0xff), (ip >> 16 & 0xff), (ip >> 24 & 0xff));\n\n\t\t\t}\n\t\t}\n\t\treturn ipString;\n\t}",
"String getAddr();",
"com.google.protobuf.ByteString\n getAgentMacBytes();",
"public MacAddress getClientMac() {\n return clientMac;\n }",
"public ApInfo findBySsid(String ssid, String mac) {\n ApInfo apInfo = null;\n if (ssid == null || ssid.equals(\"\")) {\n LogUtil.d(\"findBySsid ssid=null or ssid=\");\n return null;\n } else if (mac == null || mac.equals(\"\")) {\n LogUtil.d(\"findBySsid mac=null or mac=\");\n return null;\n } else {\n Cursor cursor = null;\n if (this.db == null) {\n return null;\n }\n try {\n cursor = this.db.rawQuery(\"SELECT SSID,MAC,UPTIME FROM MOBILE_AP WHERE SSID = ? AND MAC = ? \", new String[]{ssid, mac});\n if (cursor.moveToNext()) {\n apInfo = new ApInfo(cursor.getString(cursor.getColumnIndexOrThrow(\"SSID\")), cursor.getString(cursor.getColumnIndexOrThrow(\"MAC\")), cursor.getString(cursor.getColumnIndexOrThrow(\"UPTIME\")));\n }\n } catch (IllegalArgumentException e) {\n LogUtil.e(\"findBySsid IllegalArgumentException: \" + e.getMessage());\n } catch (Exception e2) {\n LogUtil.e(\"findBySsid Exception: \" + e2.getMessage());\n if (cursor != null) {\n cursor.close();\n }\n return apInfo;\n } catch (Throwable th) {\n if (cursor != null) {\n cursor.close();\n }\n throw th;\n }\n }\n }",
"public static String Ipconfig(){\n StringBuilder sbuf = new StringBuilder();\n InetAddress ip;\n String hostname;\n // Inet6Address ipv6; *add a ipv6 to get the ipv6 address\n try {\n ip = InetAddress.getLocalHost();\n hostname = ip.getHostName();\n\n //NetworkInterface network = NetworkInterface.getByInetAddress(ip);\n NetworkInterface nif = NetworkInterface.getByName(\"localhost\");\n //InetAddress[] inet = InetAddress.getAllByName(ip.getHostName());\n //String address = getAddress(inet).getHostAddress();\n\n sbuf.append(\"Default gateway: \"+ip.getLocalHost());\n //fmt.format(\"MAc address:\" + nif.getHardwareAddress());\n sbuf.append(\"\\nCurrent Name : \" + ip.getHostName());\n sbuf.append(\"\\nCurrent IP address : \" + ip.getHostAddress());\n //System.out.println(\"Current IPv6 address : \"+ getByAddress(hostname,inet,nets));// + ipv6.getHostAddress());\n //System.out.println(\"Current IPv6 Temp address : \");// + ipv6.getHostAddress());\n sbuf.append(\"\\nCurrent IPv6 Local : \");// + ipv6.getHostAddress());\n \n } catch(Throwable se){\n se.printStackTrace();\n }\n return sbuf.toString();\n }",
"private static String w(Context object) {\n void var4_7;\n Object object2;\n block5: {\n int n10 = Build.VERSION.SDK_INT;\n object2 = null;\n int n11 = 23;\n if (n10 >= n11) {\n return null;\n }\n String string2 = \"wifi\";\n try {\n object = object.getSystemService(string2);\n object = (WifiManager)object;\n object = object.getConnectionInfo();\n object = object.getMacAddress();\n string2 = \"02:00:00:00:00:00\";\n }\n catch (Exception exception) {\n // empty catch block\n break block5;\n }\n try {\n n10 = (int)(string2.equals(object) ? 1 : 0);\n if (n10 == 0) return object;\n return null;\n }\n catch (Exception exception) {\n object2 = object;\n }\n }\n object = new Object[]{};\n String string3 = \"failed to get wifi mac address\";\n m.a.a.z((Throwable)var4_7, string3, (Object[])object);\n return object2;\n }",
"public String format(MacAddress mac) {\n byte[] b = mac.getInternalBytes();\n Oui oui = _byHashCode.get(Oui.hashCode(mac.getInternalBytes()));\n StringBuilder buf = new StringBuilder();\n\n if (oui == null) {\n buf.append(String.format(\"Unknown-%02x-%02x-%02x\", b[0], b[1], b[2]));\n } else {\n buf.append(oui.getShortName());\n }\n buf.append('-');\n\n for (int i = 3; i < MacAddress.ETH_ALEN; ++i) {\n if (i > 3) buf.append(':');\n buf.append(String.format(\"%02x\", b[i]));\n }\n\n return buf.toString();\n }",
"String getXmppAddress();",
"private String getClientIP(){\n try {\n ConnectivityManager connManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);\n @SuppressWarnings(\"deprecation\")\n NetworkInfo wifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n @SuppressWarnings(\"deprecation\")\n NetworkInfo mobile = connManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);\n\n if (wifi.isConnected()) {\n // If Wi-Fi connected\n return getWifiIP();\n }\n\n if (mobile.isConnected()) {\n // If Internet connected\n return getMobileIP();\n }\n\n return null;\n }catch(SecurityException e){\n return null;\n }\n }",
"private static String m21400e() {\n try {\n return new BufferedReader(new FileReader(new File(\"/sys/class/net/wlan0/address\"))).readLine();\n } catch (Throwable th) {\n C5205o.m21464a(th);\n return \"02:00:00:00:00:00\";\n }\n }",
"public String getOdlOpenflowMacAddress2() throws SnmpStatusException;",
"public static String getDeviceIpAddress() {\n try {\n for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {\n NetworkInterface intf = en.nextElement();\n for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {\n InetAddress inetAddress = enumIpAddr.nextElement();\n\n log.debug(\"inetAddress: \" + inetAddress);\n\n if (!inetAddress.isLoopbackAddress()) {\n String ip = Formatter.formatIpAddress(inetAddress.hashCode());\n return ip;\n }\n }\n }\n } catch (SocketException ex) {\n log.error(ex.getMessage(), ex);\n }\n\n return null;\n }",
"@Deprecated\r\n\tpublic String readMACID(){\r\n\t\treturn \"\";\r\n\t}",
"public String getAudioMulticastAddr();",
"public MAC getMacSource() {\n\t\treturn macSource;\n\t}",
"public void testGetMacAddress() throws Exception {\n String address = \"58:a2:b5:7d:49:24\";\n IDevice device = new StubDevice(MOCK_DEVICE_SERIAL) {\n @Override\n public void executeShellCommand(String command, IShellOutputReceiver receiver)\n throws TimeoutException, AdbCommandRejectedException,\n ShellCommandUnresponsiveException, IOException {\n receiver.addOutput(address.getBytes(), 0, address.length());\n }\n };\n mMockIDevice.executeShellCommand(EasyMock.anyObject(), EasyMock.anyObject());\n EasyMock.expectLastCall().andDelegateTo(device).anyTimes();\n EasyMock.replay(mMockIDevice);\n assertEquals(address, mTestDevice.getMacAddress());\n EasyMock.verify(mMockIDevice);\n }",
"public static String getGateWayIp() {\n try {\n for (Enumeration<NetworkInterface> en = NetworkInterface\n .getNetworkInterfaces(); en.hasMoreElements();) {\n NetworkInterface intf = en.nextElement();\n for (Enumeration<InetAddress> ipAddr = intf.getInetAddresses(); ipAddr\n .hasMoreElements();) {\n InetAddress inetAddress = ipAddr.nextElement();\n if (!inetAddress.isLoopbackAddress()) {\n if (inetAddress.getHostAddress().length() <= 16) {\n return inetAddress.getHostAddress();\n }\n }\n }\n }\n } catch (SocketException ex) {\n ex.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"\";\n }",
"private String getAddress() {\n\t\tif (localIp != null) {\n\t\t\treturn localIp;\n\t\t}\n\t\tString address = \"\";\n\t\tInetAddress lanIp = null;\n\t\ttry {\n\t\t\tString ipAddress = null;\n\t\t\tEnumeration<NetworkInterface> net = null;\n\t\t\tnet = NetworkInterface.getNetworkInterfaces();\n\t\t\twhile (net.hasMoreElements()) {\n\t\t\t\tNetworkInterface element = net.nextElement();\n\t\t\t\tEnumeration<InetAddress> addresses = element.getInetAddresses();\n\t\t\t\twhile (addresses.hasMoreElements()) {\n\t\t\t\t\tInetAddress ip = addresses.nextElement();\n\t\t\t\t\tif (ip instanceof Inet4Address) {\n\t\t\t\t\t\tif (ip.isSiteLocalAddress()) {\n\t\t\t\t\t\t\tipAddress = ip.getHostAddress();\n\t\t\t\t\t\t\tlanIp = InetAddress.getByName(ipAddress);\n\t\t\t\t\t\t\tSystem.out.println(\"found local address: \" + ipAddress);\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\tif (lanIp == null)\n\t\t\t\treturn null; \n\t\t\taddress = lanIp.toString().replaceAll(\"^/+\", \"\"); \n\t\t} catch (UnknownHostException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch (SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn address;\n\n\t}",
"public String getMacKey() {\r\n return macKey;\r\n }",
"public static String getWANIP() {\n URL whatismyip = null;\n BufferedReader in = null;\n try {\n \twhatismyip = new URL(\"http://checkip.amazonaws.com\");\n in = new BufferedReader(new InputStreamReader(whatismyip.openStream()));\n String ip = in.readLine();\n return ip;\n } catch (IOException e) {\n \treturn \"No internet.\";\n\t\t}\n }",
"public String getMacChannel() {\r\n return macChannel;\r\n }",
"public static String m588l(Context context) {\r\n try {\r\n WifiManager wifiManager = (WifiManager) context.getSystemService(\"wifi\");\r\n if (wifiManager.isWifiEnabled()) {\r\n return wifiManager.getConnectionInfo().getBSSID();\r\n }\r\n } catch (Throwable th) {\r\n }\r\n return bi_常量类.f6358b_空串;\r\n }",
"public String getVideoMulticastAddr();",
"public static List<String> getAllHardwareAddress() throws SocketException {\n ArrayList<String> addresses = new ArrayList<>();\n Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();\n while (ifaces.hasMoreElements()) {\n NetworkInterface iface = ifaces.nextElement();\n byte[] macaddr = iface.getHardwareAddress();\n if (macaddr == null)\n continue;\n String key = String.format(MACADDR_FORMAT, macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5]);\n addresses.add(key);\n }\n return addresses;\n }",
"public static List<String> getHardwareAddresses() {\r\n\t\tList<String> result = new Vector<String>();\r\n\t\ttry {\r\n\t\t\tEnumeration<NetworkInterface> nis = NetworkInterface.getNetworkInterfaces();\r\n\t\t\tif (nis != null) {\r\n\t\t\t\twhile (nis.hasMoreElements()) {\r\n\t\t\t\t\tbyte[] mac = nis.nextElement().getHardwareAddress();\r\n\t\t\t\t\tif ((mac != null) && (mac.length == 6)) {\r\n\t\t\t\t\t\tresult.add(getHardwareAddressAsString(mac));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SocketException e) {\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public Oui getOui(MacAddress mac) {\n Oui result = _byHashCode.get(Oui.hashCode(mac.getInternalBytes()));\n if (result == null && (mac.isLocal() || mac.isMulticast())) {\n byte[] b = mac.getBytes();\n b[0] &= ~(MacAddress.FLAG_LOCAL | MacAddress.FLAG_MCAST);\n result = _byHashCode.get(Oui.hashCode(b));\n }\n return result;\n }",
"private String getIpAddress() throws SocketException {\n String ip = null;\n\n Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces();\n\n while (networkInterfaces.hasMoreElements()) {\n NetworkInterface networkInterface = (NetworkInterface) networkInterfaces.nextElement();\n\n if (networkInterface.getName().equals(\"eth0\") || networkInterface.getName().equals(\"wlan0\")) {\n Enumeration inetAddresses = networkInterface.getInetAddresses();\n\n while (inetAddresses.hasMoreElements()) {\n InetAddress inetAddress = (InetAddress) inetAddresses.nextElement();\n if (inetAddress instanceof Inet4Address) {\n ip = inetAddress.getHostAddress();\n }\n }\n }\n }\n \n return ip;\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.435 -0400\", hash_original_method = \"69DFE6488E4E1095ED955C498CAF3E20\", hash_generated_method = \"26A15C1C765EE269E3F8338945CC3FE4\")\n \n public static String getMacAddressCommand(){\n \tdouble taintDouble = 0;\n \n \tString retObj = new String(); \n \tretObj.addTaint(taintDouble);\n \treturn retObj;\n }",
"int getAddr();",
"public String getNatAddress();",
"private static void findMacAddresses(String s) {\n\n try {\n Pattern regex = Pattern.compile(\n \"(?<mac>[0-9a-f]{16})\\\\s+BPD\\\\s+(true|false)\\\\s+[0-9]+\\\\s+FSK_75\\\\s+FSK_75\\\\s+(?<rssi>[\\\\d-.]+)\");\n Matcher regexMatcher = regex.matcher(s);\n if (regexMatcher.find()) {\n macAdresses.put(regexMatcher.group(\"mac\"), Double.parseDouble(regexMatcher.group(\"rssi\")));\n }\n } catch (PatternSyntaxException ex) {\n ex.printStackTrace();\n }\n\n }",
"java.lang.String getBitcoinAddress();",
"java.lang.String getSsid();",
"public String getUpnpExternalIpaddress();",
"private InetAddress getBroadcastAddress() {\n InetAddress broadcastAddress = null;\n try {\n Enumeration<NetworkInterface> networkInterface = NetworkInterface\n .getNetworkInterfaces();\n\n while (broadcastAddress == null\n && networkInterface.hasMoreElements()) {\n NetworkInterface singleInterface = networkInterface.nextElement();\n String interfaceName = singleInterface.getName();\n if (interfaceName.contains(\"wlan0\") || interfaceName.contains(\"eth0\")) {\n for (InterfaceAddress interfaceAddress : singleInterface.getInterfaceAddresses()) {\n broadcastAddress = interfaceAddress.getBroadcast();\n if (broadcastAddress != null) {\n break;\n }\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return broadcastAddress;\n }",
"public Address getCurrentCallRemoteAddress();",
"DeviceEntity getByMac(String mac);",
"public void setMac(java.lang.String mac) {\n this.mac = mac;\n }",
"@ReactMethod\n public void getBSSID(final Callback callback) {\n WifiInfo info = wifi.getConnectionInfo();\n\n String bssid = info.getBSSID();\n\n callback.invoke(bssid.toUpperCase());\n }",
"@Override\n\tprotected byte[] mac(IsoPackage isoPackage) throws Exception {\n\t\treturn null;\n\t}",
"private Result fillFromMAC() {\n final Result r = getResult();\n\n final DataArray da = MacHostPropertiesMonitor.getData();\n\n r.addSet(\"CPU_idle\", da.getParam(\"cpu_idle\"));\n r.addSet(\"CPU_int\", 0);\n r.addSet(\"CPU_iowait\", 0);\n r.addSet(\"CPU_nice\", 0);\n r.addSet(\"CPU_softint\", 0);\n r.addSet(\"CPU_sys\", da.getParam(\"cpu_sys\"));\n r.addSet(\"CPU_usr\", da.getParam(\"cpu_usr\"));\n r.addSet(\"Load5\", da.getParam(\"load1\"));\n r.addSet(\"Load10\", da.getParam(\"load5\"));\n r.addSet(\"Load15\", da.getParam(\"load15\"));\n r.addSet(\"Page_in\", da.getParam(\"blocks_in_R\"));\n r.addSet(\"Page_out\", da.getParam(\"blocks_out_R\"));\n r.addSet(\"Swap_in\", da.getParam(\"swap_in_R\"));\n r.addSet(\"Swap_out\", da.getParam(\"swap_out_R\"));\n r.addSet(\"eth0_IN\", da.getParam(\"eth0_in_R\"));\n r.addSet(\"eth0_OUT\", da.getParam(\"eth0_out_R\"));\n\n return r;\n }",
"java.lang.String getIpv6();",
"void gotMyMac();"
] | [
"0.8292737",
"0.81544304",
"0.80333096",
"0.7813034",
"0.76514596",
"0.75927633",
"0.7585045",
"0.7495249",
"0.7308721",
"0.73031205",
"0.72450054",
"0.71222675",
"0.7065716",
"0.7046785",
"0.7040433",
"0.7027845",
"0.6964163",
"0.69638425",
"0.6938394",
"0.6923879",
"0.6923879",
"0.6881879",
"0.6880618",
"0.6792398",
"0.6764883",
"0.65750897",
"0.65559745",
"0.65447515",
"0.65310025",
"0.6526822",
"0.6482436",
"0.6479449",
"0.6461236",
"0.64405453",
"0.64166373",
"0.6364802",
"0.6337937",
"0.6274023",
"0.6261353",
"0.6260377",
"0.62203443",
"0.62190515",
"0.62000495",
"0.6187902",
"0.61825764",
"0.6177796",
"0.61770725",
"0.61567193",
"0.61304057",
"0.61131114",
"0.61069816",
"0.6059307",
"0.6044278",
"0.60303855",
"0.6012843",
"0.6000008",
"0.5989644",
"0.5965247",
"0.59330547",
"0.59076357",
"0.58356315",
"0.5831488",
"0.58159214",
"0.5788467",
"0.578084",
"0.5773517",
"0.57723534",
"0.5771142",
"0.5763138",
"0.57435995",
"0.57394505",
"0.5739092",
"0.57305497",
"0.5723766",
"0.57202375",
"0.57194847",
"0.5705205",
"0.56998146",
"0.5664891",
"0.5645711",
"0.56200606",
"0.56152254",
"0.5602943",
"0.5598744",
"0.5588221",
"0.55878043",
"0.55723774",
"0.5571155",
"0.55635965",
"0.5555349",
"0.55386037",
"0.55137265",
"0.5512389",
"0.54941833",
"0.5487466",
"0.5473771",
"0.5469344",
"0.54546106",
"0.5435883",
"0.5435786"
] | 0.84924185 | 0 |
get bluetooth mac address | public static String bluetoothMacAddress() {
String _ret = null;
// get a handle to the default local Bluetooth adapter
BluetoothAdapter _localBluetoothAdapter = BluetoothAdapter
.getDefaultAdapter();
// check default local bluetooth adapter and return bluetooth mac
// address
if (null != _localBluetoothAdapter) {
// check the bluetooth state
if (!_localBluetoothAdapter.isEnabled()) {
// open the bluetooth
_localBluetoothAdapter.enable();
// get default local bluetooth mac address(has 1-2 seconds
// delay)
_ret = _localBluetoothAdapter.getAddress();
// close the bluetooth
_localBluetoothAdapter.disable();
} else {
// get default local bluetooth mac address
_ret = _localBluetoothAdapter.getAddress();
}
}
return _ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMac(){\n WifiManager manager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);\n WifiInfo info = manager.getConnectionInfo();\n return info.getMacAddress();\n }",
"private static String getMacAddress(Context context) {\n // android devices should have a wifi address\n final String wlanAddress = readAddressFromInterface(\"wlan0\");\n\n if (wlanAddress != null) {\n return wlanAddress.replace(\"\\n\", \"\").toUpperCase();\n }\n\n final String ethAddress = readAddressFromInterface(\"eth0\");\n if (ethAddress != null) {\n return ethAddress.replace(\"\\n\", \"\").toUpperCase();\n }\n\n // backup -> read from Wifi!\n if (!Utils.checkPermission(context, android.Manifest.permission.ACCESS_WIFI_STATE)) {\n return \"\";\n } else {\n try {\n final WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\n @SuppressWarnings(\"MissingPermission\") final String wifiAddress = wifiManager.getConnectionInfo().getMacAddress();\n\n if (wifiAddress != null) {\n return wifiAddress;\n }\n } catch (Exception e) {\n log.debug(e.getMessage(), e);\n }\n }\n\n return null;\n }",
"public String getMacBluetooth()\n/* */ {\n/* 69 */ return this.macBluetooth;\n/* */ }",
"@Option MacAddress getMacAddress();",
"private static String getMacAddress(){\n\t\ttry {\n\t\t\t//getting hardware address from inside a virtual machine from NetworkInterface object returns null, so need a gambiarra.\n\t\t\t//if this issue is ever solved please replace for the appropriate code\n\t\t\tString command = \"ifconfig\";\n\t\t\tProcess p = Runtime.getRuntime().exec(command);\n\t\t\tBufferedReader inn = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n\t\t\tString line = inn.readLine();\n\n\t\t\twhile( line != null ){\n\t\t\t\t\n\t\t\t\tif(line.indexOf(\"eth0\") >= 0){\n\t\t\t\t\tString[] split = line.split(\" \");\n\t\t\t\t\treturn split[split.length-1];\n\t\t\t\t}\n\n\t\t\t\tline = inn.readLine();\n\t\t\t}\n\n\t\t\tinn.close();\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\treturn \"error\";\n\t}",
"public String getMacAddress()\r\n\t{\r\n\t\treturn macAddress;\r\n\t}",
"String getMacAddress() {\n return String.format(\"%s:%s:%s:%s:%s:%s\", macAddress.substring(0, 2), macAddress.substring(2, 4),\n macAddress.substring(4, 6), macAddress.substring(6, 8), macAddress.substring(8, 10), macAddress.substring(10, 12));\n }",
"public String getMacAddress()\n {\n return macAddress;\n }",
"public String getMacAddress()\n\t{\n\t\treturn macAddress;\n\t}",
"public java.lang.String getUser_mac();",
"public String getMacAddress() {\n return macAddress;\n }",
"public String getMacAddress() {\n return macAddress;\n }",
"public String macAddress() {\n return this.macAddress;\n }",
"public String getEthernetMacAddress(){\n\t try {\n\t return loadFileAsString(\"/sys/class/net/eth0/address\")\n\t .toUpperCase().substring(0, 17);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t return null;\n\t }\n\t}",
"public static String getMacAddress() {\n try {\n List<NetworkInterface> all = Collections.list(NetworkInterface.getNetworkInterfaces());\n for (NetworkInterface nif : all) {\n if (!nif.getName().equalsIgnoreCase(\"wlan0\")) continue;\n\n byte[] macBytes = nif.getHardwareAddress();\n if (macBytes == null) {\n return \"\";\n }\n\n StringBuilder res1 = new StringBuilder();\n for (byte b : macBytes) {\n res1.append(String.format(\"%02X:\",b));\n }\n\n if (res1.length() > 0) {\n res1.deleteCharAt(res1.length() - 1);\n }\n return res1.toString();\n }\n } catch (Exception ex) {\n }\n return \"02:00:00:00:00:00\";\n }",
"public static String getDeviceMacAddress(Context context) {\n final String macAddress = getMacAddress(context);\n\n if (macAddress == null) {\n return \"\";\n }\n\n log.debug(\"macAddress: \" + macAddress);\n\n return StringUtils.cleanSpaceCharacterFromString(macAddress.toUpperCase(Locale.UK));\n }",
"public MACAddress getMacAddress() \n\t{\n\t\treturn this.hwAddress;\n\t}",
"public static\n String getMACAddress()\n {\n String sResult = null;\n try {\n Process pid = Runtime.getRuntime().exec(\"ipconfig /all\");\n BufferedReader in = new BufferedReader(new InputStreamReader(pid.getInputStream()));\n String sLine = null;\n while((sLine = in.readLine()) != null) {\n if(getOccurrences(sLine, '-') == 5) {\n int i = sLine.lastIndexOf('-');\n sResult = sLine.substring(i - 14, i + 3);\n break;\n }\n }\n in.close();\n }\n catch(Exception ex) {\n ex.printStackTrace();\n }\n System.out.println(ResourcesMgr.sLOG_PREFIX + \" MAC Address = \" + sResult);\n return sResult;\n }",
"public static String wlanMacAddress() {\n\t\tString _ret = null;\n\n\t\t// get wifi manager\n\t\tWifiManager _wifiManager = (WifiManager) CTApplication.getContext()\n\t\t\t\t.getSystemService(Context.WIFI_SERVICE);\n\n\t\t// check wifi manager and return waln mac address\n\t\tif (null != _wifiManager) {\n\t\t\t// check the wifi state\n\t\t\tif (!_wifiManager.isWifiEnabled()) {\n\t\t\t\t// open the wlan\n\t\t\t\t_wifiManager.setWifiEnabled(true);\n\n\t\t\t\t// get wlan mac address(has 3-5 seconds delay)\n\t\t\t\t_ret = _wifiManager.getConnectionInfo().getMacAddress();\n\n\t\t\t\t// close the wlan\n\t\t\t\t_wifiManager.setWifiEnabled(false);\n\t\t\t} else {\n\t\t\t\t// get wlan mac address\n\t\t\t\t_ret = _wifiManager.getConnectionInfo().getMacAddress();\n\t\t\t}\n\t\t}\n\n\t\treturn _ret;\n\t}",
"public String getMac() {\n\t\treturn InfraUtil.getMacAddress();\n\t}",
"public String readEthMAC() {\r\n\t\treturn mFactoryBurnUtil.readEthMAC();\r\n\t}",
"public String getWlanMacAddress() {\n WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);\n WifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\n String macAddress = wifiInfo == null ? null : wifiInfo.getMacAddress();\n return !TextUtils.isEmpty(macAddress) ? macAddress : \"Unavailable\";\n }",
"public String getBluetoothAddress() {\n return addressStr;\n }",
"public static String m581h(Context context) {\r\n try {\r\n return ((WifiManager) context.getSystemService(\"wifi\")).getConnectionInfo().getMacAddress();\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }",
"public static String getMac(InetAddress add) throws SocketException,NullPointerException{\n\t\t\n\t\tNetworkInterface network = NetworkInterface.getByInetAddress(add);\n\t\tbyte[] mac = network.getHardwareAddress();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < mac.length; i++) {\n\t\t\tsb.append(String.format(\"%02X%s\", mac[i], (i < mac.length - 1) ? \"-\" : \"\"));\t\t\n\t\t}\n\t\tData.MAC_ADDRESS=sb.toString();\n\t\treturn sb.toString();\n\t\t\n\t}",
"@Override\n public String getMACAddress()\n {\n String id = client.properties().getString(Keys.client_id);\n if (id == null)\n {\n ClientIDGenerator gen = new ClientIDGenerator();\n id = gen.generateId();\n client.properties().setString(Keys.client_id, id);\n }\n return id;\n //return AppUtil.getMACAddress(this);\n }",
"public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }",
"private BandInfo infoFromMac(String mac) {\n BandInfo[] bands = pairedBands;//BandClientManager.getInstance().getPairedBands();\n for (BandInfo b :\n bands) {\n if (b.getMacAddress().equals(mac)) {\n return b;\n }\n }\n\n // Failed to find the bandInfo matching the MAC address, create one and store\n Log.e(TAG, \"Failed to find the MAC address \" + mac);\n return null;\n }",
"public java.lang.String getMac() {\n return mac;\n }",
"public String getMacNo() {\r\n return macNo;\r\n }",
"public static String macAddress(String interfaceName) {\n\t try {\n\t List<NetworkInterface> interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());\n\t for (NetworkInterface intf : interfaces) {\n\t if (interfaceName != null) {\n\t if (!intf.getName().equalsIgnoreCase(interfaceName)) continue;\n\t }\n\t byte[] mac = intf.getHardwareAddress();\n\t if (mac==null) return \"\";\n\t StringBuilder buf = new StringBuilder();\n\t for (int idx=0; idx<mac.length; idx++)\n\t buf.append(String.format(\"%02X:\", mac[idx])); \n\t if (buf.length()>0) buf.deleteCharAt(buf.length()-1);\n\t return buf.toString();\n\t }\n\t } catch (Exception ex) { } // for now eat exceptions\n\t return \"\";\n\t /*try {\n\t // this is so Linux hack\n\t return loadFileAsString(\"/sys/class/net/\" +interfaceName + \"/address\").toUpperCase().trim();\n\t } catch (IOException ex) {\n\t return null;\n\t }*/\n\t }",
"public Mac getMac() {\r\n return mac;\r\n }",
"public static String getMacCliente(){\n\t\tInetAddress ip;\n\t\tbyte[] mac = null;\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost();\n\t\t\tNetworkInterface network = NetworkInterface.getByInetAddress(ip);\n\n\t\t\tmac = network.getHardwareAddress();\n\t\t\tfor (int i = 0; i < mac.length; i++) {\n\t\t\t\tsb.append(String.format(\"%02X%s\", mac[i],(i < mac.length - 1) ? \"-\" : \"\"));\n\t\t\t}\n\t\t} catch (UnknownHostException e) {\n\t\t\t//Log.error(e, \"Utiles :: getMacCliente :: controlado\");\n\t\t} catch (SocketException e) {\n\t\t\t//Log.error(e, \"Utiles :: getMacCliente :: controlado\");\n\t\t} catch (NullPointerException e){\n\t\t\t//Log.error(e, \"Utiles :: getMacCliente :: controlado\");\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public String getMACCHN()\n {\n return this.MACCHN;\n }",
"private static String m21383C(Context context) {\n WifiInfo wifiInfo;\n String str = \"02:00:00:00:00:00\";\n if (context == null) {\n return str;\n }\n WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(\"wifi\");\n if (wifiManager == null) {\n return str;\n }\n try {\n wifiInfo = wifiManager.getConnectionInfo();\n } catch (Exception e) {\n C5205o.m21464a((Throwable) e);\n wifiInfo = null;\n }\n if (wifiInfo == null) {\n return null;\n }\n String macAddress = wifiInfo.getMacAddress();\n if (!TextUtils.isEmpty(macAddress)) {\n macAddress = macAddress.toUpperCase(Locale.ENGLISH);\n }\n return macAddress;\n }",
"public static String getMACAddress(String interfaceName) {\n try {\n List<NetworkInterface> interfaces = Collections\n .list(NetworkInterface.getNetworkInterfaces());\n for (NetworkInterface intf : interfaces) {\n if (interfaceName != null) {\n if (!intf.getName().equalsIgnoreCase(interfaceName))\n continue;\n }\n byte[] mac = intf.getHardwareAddress();\n if (mac == null)\n return \"\";\n StringBuilder buf = new StringBuilder();\n for (int idx = 0; idx < mac.length; idx++)\n buf.append(String.format(\"%02X:\", mac[idx]));\n if (buf.length() > 0)\n buf.deleteCharAt(buf.length() - 1);\n return buf.toString();\n }\n } catch (Exception ex) {\n } // for now eat exceptions\n return \"\";\n\n }",
"java.lang.String getAgentMac();",
"public String getMac() {\n return this.Mac;\n }",
"public String getFormattedMACAddress() {\n String defaultReturn = \"00:00:00:00:00:00\";\n\n // Validate the data\n if (macAddress == null) {\n return defaultReturn;\n }\n String mac = macAddress.replace(\"-\", \"\");\n if (mac.length() != 12) {\n return defaultReturn;\n }\n\n List<String> parts = new ArrayList<>();\n for (int i = 0; i < 6; i++) {\n int offset = 2 * i;\n parts.add(mac.substring(offset, offset + 2));\n }\n\n return String.join(\":\", parts);\n }",
"public MAC getMacDest() {\n\t\treturn macDest;\n\t}",
"@NonNull\n public static String getMACAddress(String interfaceName) throws SocketException {\n List<NetworkInterface> interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());\n for (NetworkInterface netInterface : interfaces) {\n if (interfaceName != null) {\n if (!netInterface.getName().equalsIgnoreCase(interfaceName)) continue;\n }\n byte[] mac = netInterface.getHardwareAddress();\n if (mac == null) return \"\";\n StringBuilder buf = new StringBuilder();\n for (byte aMac : mac) buf.append(String.format(\"%02X:\", aMac));\n if (buf.length() > 0) buf.deleteCharAt(buf.length() - 1);\n return buf.toString();\n }\n\n return \"\";\n }",
"com.google.protobuf.ByteString\n getAgentMacBytes();",
"public String getMacBanchId() {\r\n return macBanchId;\r\n }",
"private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\n }",
"private static final long getHostId(){\n long macAddressAsLong = 0;\n try {\n Random random = new Random();\n InetAddress address = InetAddress.getLocalHost();\n NetworkInterface ni = NetworkInterface.getByInetAddress(address);\n if (ni != null) {\n byte[] mac = ni.getHardwareAddress();\n random.nextBytes(mac); // we don't really want to reveal the actual MAC address\n\n //Converts array of unsigned bytes to an long\n if (mac != null) {\n for (int i = 0; i < mac.length; i++) {\n macAddressAsLong <<= 8;\n macAddressAsLong ^= (long)mac[i] & 0xFF;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return macAddressAsLong;\n }",
"@Deprecated\r\n\tpublic String readMACID(){\r\n\t\treturn \"\";\r\n\t}",
"public String getStrmac() {\n return strmac;\n }",
"public MacAddress getClientMac() {\n return clientMac;\n }",
"public void testGetMacAddress() throws Exception {\n String address = \"58:a2:b5:7d:49:24\";\n IDevice device = new StubDevice(MOCK_DEVICE_SERIAL) {\n @Override\n public void executeShellCommand(String command, IShellOutputReceiver receiver)\n throws TimeoutException, AdbCommandRejectedException,\n ShellCommandUnresponsiveException, IOException {\n receiver.addOutput(address.getBytes(), 0, address.length());\n }\n };\n mMockIDevice.executeShellCommand(EasyMock.anyObject(), EasyMock.anyObject());\n EasyMock.expectLastCall().andDelegateTo(device).anyTimes();\n EasyMock.replay(mMockIDevice);\n assertEquals(address, mTestDevice.getMacAddress());\n EasyMock.verify(mMockIDevice);\n }",
"public String getMyDeviceName() {\n return bluetoothName;\n }",
"public static String m580h() {\r\n try {\r\n BluetoothAdapter defaultAdapter = BluetoothAdapter.getDefaultAdapter();\r\n return (defaultAdapter == null || defaultAdapter.isEnabled()) ? defaultAdapter.getAddress() : bi_常量类.f6358b_空串;\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }",
"public void testGetMacAddress_stubDevice() throws Exception {\n String address = \"58:a2:b5:7d:49:24\";\n IDevice device = new StubDevice(MOCK_DEVICE_SERIAL) {\n @Override\n public void executeShellCommand(String command, IShellOutputReceiver receiver)\n throws TimeoutException, AdbCommandRejectedException,\n ShellCommandUnresponsiveException, IOException {\n receiver.addOutput(address.getBytes(), 0, address.length());\n }\n };\n mTestDevice.setIDevice(device);\n assertNull(mTestDevice.getMacAddress());\n }",
"java.lang.String getBssid();",
"public String getMacChannel() {\r\n return macChannel;\r\n }",
"public String format(MacAddress mac) {\n byte[] b = mac.getInternalBytes();\n Oui oui = _byHashCode.get(Oui.hashCode(mac.getInternalBytes()));\n StringBuilder buf = new StringBuilder();\n\n if (oui == null) {\n buf.append(String.format(\"Unknown-%02x-%02x-%02x\", b[0], b[1], b[2]));\n } else {\n buf.append(oui.getShortName());\n }\n buf.append('-');\n\n for (int i = 3; i < MacAddress.ETH_ALEN; ++i) {\n if (i > 3) buf.append(':');\n buf.append(String.format(\"%02x\", b[i]));\n }\n\n return buf.toString();\n }",
"public String getMacKey() {\r\n return macKey;\r\n }",
"public static String getLocalMac() {\n\t\tif (!mInitialized) Log.v(\"OpenIp\", \"Initialisation isn't done\");\n\t\treturn localMac;\n\t}",
"@ReactMethod\n public void getBSSID(final Callback callback) {\n WifiInfo info = wifi.getConnectionInfo();\n\n String bssid = info.getBSSID();\n\n callback.invoke(bssid.toUpperCase());\n }",
"@Test\n public void testProvideBluetoothMacAddressToDevice() throws Exception {\n String reqId = \"testId\";\n Long provideBtAddrTimeout = 1000L;\n\n Field fieldSettings = mBluetoothMacAddressResolutionHelper.getClass()\n .getDeclaredField(\"mSettings\");\n fieldSettings.setAccessible(true);\n fieldSettings.set(mBluetoothMacAddressResolutionHelper, mMockDiscoveryManagerSettings);\n\n when(mMockDiscoveryManagerSettings.getProvideBluetoothMacAddressTimeout())\n .thenReturn(provideBtAddrTimeout);\n\n\n Field fieldGattManager = mBluetoothMacAddressResolutionHelper.getClass()\n .getDeclaredField(\"mBluetoothGattManager\");\n fieldGattManager.setAccessible(true);\n fieldGattManager.set(mBluetoothMacAddressResolutionHelper, mMockBluetoothGattManager);\n\n EnumSet<BlePeerDiscoverer.BlePeerDiscovererStateSet> mStateSet\n = EnumSet.of(BlePeerDiscoverer.BlePeerDiscovererStateSet.NOT_STARTED);\n when(mMockBlePeerDiscoverer.getState()).thenReturn(mStateSet);\n\n // used to instantiate BluetoothDeviceDiscoverer\n when(mMockBluetoothAdapter.isDiscovering()).thenReturn(true);\n when(mMockDiscoveryManager.isBleMultipleAdvertisementSupported()).thenReturn(true);\n when(mMockBlePeerDiscoverer.startPeerAddressHelperAdvertiser(\n reqId, PeerProperties.BLUETOOTH_MAC_ADDRESS_UNKNOWN, provideBtAddrTimeout\n )).thenReturn(true);\n\n mBluetoothMacAddressResolutionHelper.startProvideBluetoothMacAddressMode(reqId);\n\n // actual test\n mBluetoothMacAddressResolutionHelper.provideBluetoothMacAddressToDevice(mMockBluetoothDevice);\n\n verify(mMockBlePeerDiscoverer, times(1)).startPeerAddressHelperAdvertiser(\n reqId, PeerProperties.BLUETOOTH_MAC_ADDRESS_UNKNOWN, provideBtAddrTimeout);\n verify(mMockDiscoveryManager, times(1)).onProvideBluetoothMacAddressModeStartedChanged(true);\n verify(mMockBluetoothGattManager, times(1)).provideBluetoothMacAddressToDevice(\n mMockBluetoothDevice, reqId);\n }",
"private void connectBluetooth() {\n try {\n if (blueTooth == null && macSet) {\n Log.d(\"lol\", \"macSet connect bluetooootooththoth\");\n blueTooth = new BluetoothConnection(macAddress, this, listener);\n blueTooth.connect();\n }\n } catch (Exception e) {\n Log.d(\"lol\", \"Failed connection: \" + e.getMessage() + \" \" + e.getClass());\n }\n }",
"public static MacAddress getRouterMacAddress(KubevirtRouter router) {\n if (router.mac() == null) {\n log.warn(\"Failed to get mac address of router {}\", router.name());\n }\n\n return router.mac();\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.435 -0400\", hash_original_method = \"69DFE6488E4E1095ED955C498CAF3E20\", hash_generated_method = \"26A15C1C765EE269E3F8338945CC3FE4\")\n \n public static String getMacAddressCommand(){\n \tdouble taintDouble = 0;\n \n \tString retObj = new String(); \n \tretObj.addTaint(taintDouble);\n \treturn retObj;\n }",
"public Oui getOui(MacAddress mac) {\n Oui result = _byHashCode.get(Oui.hashCode(mac.getInternalBytes()));\n if (result == null && (mac.isLocal() || mac.isMulticast())) {\n byte[] b = mac.getBytes();\n b[0] &= ~(MacAddress.FLAG_LOCAL | MacAddress.FLAG_MCAST);\n result = _byHashCode.get(Oui.hashCode(b));\n }\n return result;\n }",
"public static Bluetooth getBT(){\n return BT;\n }",
"private void connectToBluetoothDevice(String mac) {\n if (BluetoothAdapter.checkBluetoothAddress(mac)) {\n BluetoothDevice mBluetoothDevice = mBluetoothAdapter\n .getRemoteDevice(mac);\n mConnectThread = new ConnectThread(mBluetoothDevice);\n mConnectThread.start();\n }\n }",
"public static String getNetMac() {\n\t\tif (!mInitialized) Log.v(\"OpenIp\", \"Initialisation isn't done\");\n\t\treturn netMac;\n\t}",
"public String getMAddr() {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getMaddr () \");\n Via via=(Via)sipHeader;\n \n Host host=via.getMaddr();\n if ( host == null) return null;\n else return host.getIpAddress(); \n }",
"public MacAddress(){\n super(MAC_DIGIT_COUNT);\n }",
"public InetAddress getBroadcastAddress() {\r\n InetAddress ip=null;\r\n try{\r\n WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\r\n DhcpInfo dhcp = wifi.getDhcpInfo();\r\n int broadcast = (dhcp.ipAddress & dhcp.netmask) | ~dhcp.netmask;\r\n byte[] quads = new byte[4];\r\n for (int k = 0; k < 4; k++)\r\n quads[k] = (byte) (broadcast >> (k * 8));\r\n ip= InetAddress.getByAddress(quads);\r\n }catch(IOException e)\r\n {\r\n\r\n }\r\n\r\n return ip;\r\n }",
"private String getDeviceName() {\n String permission = \"android.permission.BLUETOOTH\";\n int res = context.checkCallingOrSelfPermission(permission);\n if (res == PackageManager.PERMISSION_GRANTED) {\n try {\n BluetoothAdapter myDevice = BluetoothAdapter.getDefaultAdapter();\n if (myDevice != null) {\n return myDevice.getName();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return \"Unknown\";\n }",
"public String getOdlOpenflowMacAddress2() throws SnmpStatusException;",
"@Override\n\tpublic String readDatagram() {\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.print(\"MAC ADRESS: \");\n\t\tString mac = null;\n\t\ttry {\n\t\t\tmac = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (mac.equals(\"quit\")){\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}\n\t\tSystem.out.print(\"DATAGRAM: \");\n\t\tString datagram = null;\n\t\ttry {\n\t\t\tdatagram = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (datagram.equals(\"quit\")){\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn mac+\";\"+datagram;\n\t}",
"private void connectDevice(String address) {\n// // Get the device MAC address\n BluetoothDevice device = mBtAdapter.getRemoteDevice(address);\n// // Attempt to connect to the device\n mChatService.connect(device, true);\n }",
"public void setMacAddress(String macAddress) {\n this.macAddress = macAddress;\n }",
"String getXmppAddress();",
"@Deprecated\r\n public String readWiFiMAC(String wifiModelType) {\r\n return mFactoryBurnUtil.readWiFiMAC(wifiModelType);\r\n }",
"public String getArpTable(String ipAddr) throws IOException {\n Scanner s = new Scanner(Runtime.getRuntime().exec(ARP_CMD +\" \"+ ipAddr).getInputStream()).useDelimiter(\"\\\\A\");\n String sysInput = s.next();\n String mac = \"\";\n Pattern pattern = Pattern.compile(mac_regex);\n Matcher matcher = pattern.matcher(sysInput);\n if (matcher.find()) {\n mac = mac + matcher.group().replaceAll(\"\\\\-\", \":\");\n } \n return mac.strip();\n\t}",
"public String getMacReason() {\r\n return macReason;\r\n }",
"SelectBluetoothDeviceParameters getSelectBluetoothDeviceParameters();",
"public String getDeviceAddress() {\n return mDeviceAddress;\n }",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"public BluetoothDevice getDevice() {\n return this.device;\n }",
"DeviceEntity getByMac(String mac);",
"public void testIsMacAddress() {\n assertTrue(mTestDevice.isMacAddress(\"00:00:00:00:00:00\"));\n assertTrue(mTestDevice.isMacAddress(\"00:15:E9:2B:99:3C\"));\n assertTrue(mTestDevice.isMacAddress(\"FF:FF:FF:FF:FF:FF\"));\n assertTrue(mTestDevice.isMacAddress(\"58:a2:b5:7d:49:24\"));\n }",
"public MAC getMacSource() {\n\t\treturn macSource;\n\t}",
"@Override\n\tprotected byte[] mac(IsoPackage isoPackage) throws Exception {\n\t\treturn null;\n\t}",
"java.lang.String getBrokerAddress();",
"void gotMyMac();",
"public interface OnDeviceSelectedListener {\n\n /**\n * Method used to send the address of a selected bluetooth device.\n * @param address the MAC address of the bluetooth device.\n */\n void onDeviceSelected(String address);\n}",
"private static void findMacAddresses(String s) {\n\n try {\n Pattern regex = Pattern.compile(\n \"(?<mac>[0-9a-f]{16})\\\\s+BPD\\\\s+(true|false)\\\\s+[0-9]+\\\\s+FSK_75\\\\s+FSK_75\\\\s+(?<rssi>[\\\\d-.]+)\");\n Matcher regexMatcher = regex.matcher(s);\n if (regexMatcher.find()) {\n macAdresses.put(regexMatcher.group(\"mac\"), Double.parseDouble(regexMatcher.group(\"rssi\")));\n }\n } catch (PatternSyntaxException ex) {\n ex.printStackTrace();\n }\n\n }",
"void changeBTAddress() {\n\t\t\n\t\t// if ( this.beacon.getAppType() == AppType.APPLE_GOOGLE_CONTACT_TRACING ) {\n\t\tif ( this.useRandomAddr()) {\n\t\t\t// try to change the BT address\n\t\t\t\n\t\t\t// the address is LSB..MSB and bits 47:46 are 0 i.e. bits 0 & 1 of right-most byte are 0.\n\t\t\tbyte btRandomAddr[] = getBTRandomNonResolvableAddress();\n\t\t\t\n\t\t\t// generate the hcitool command string\n\t\t\tString hciCmd = getSetRandomBTAddrCmd( btRandomAddr);\n\t\t\t\n\t\t\tlogger.info( \"SetRandomBTAddrCmd: \" + hciCmd);\n\t\t\t\n\t\t\t// do the right thing...\n\t\t\tfinal String envVars[] = { \n\t\t\t\t\"SET_RAND_ADDR_CMD=\" + hciCmd\n\t\t\t};\n\t\t\t\t\t\t\n\t\t\tfinal String cmd = \"./scripts/set_random_addr\";\n\t\t\t\n\t\t\tboolean status = runScript( cmd, envVars, this, null);\n\t\t}\n\t\t\t\n\t}",
"public void findBluetooth() {\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n btStatusDisplay.setText(\"Device does not support Bluetooth\");\n }\n btStatusDisplay.setText(\"Trying to connect...\");\n\n /** Pops up request to enable if found not enabled */\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n /** Get reference to scale as Bluetooth device \"mmDevice\" */\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().equals(\"BLUE\")) {\n mmDevice = device;\n btStatusDisplay.setText(\"Bluetooth device found\");\n break;\n }\n }\n }\n }",
"public static List<String> getAllHardwareAddress() throws SocketException {\n ArrayList<String> addresses = new ArrayList<>();\n Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();\n while (ifaces.hasMoreElements()) {\n NetworkInterface iface = ifaces.nextElement();\n byte[] macaddr = iface.getHardwareAddress();\n if (macaddr == null)\n continue;\n String key = String.format(MACADDR_FORMAT, macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5]);\n addresses.add(key);\n }\n return addresses;\n }",
"String getAddress();",
"String getAddress();"
] | [
"0.7819292",
"0.75928503",
"0.7571852",
"0.7503415",
"0.7422607",
"0.7394143",
"0.7353765",
"0.7349749",
"0.73239934",
"0.73050547",
"0.7295647",
"0.7295647",
"0.7295308",
"0.7271584",
"0.72567075",
"0.72565097",
"0.72385514",
"0.72146964",
"0.7088931",
"0.707524",
"0.7061499",
"0.70303833",
"0.69940567",
"0.68488425",
"0.6828045",
"0.6756953",
"0.64829576",
"0.64619297",
"0.64567906",
"0.6429401",
"0.6428905",
"0.63773614",
"0.63572085",
"0.634727",
"0.62626976",
"0.6248231",
"0.6241333",
"0.6224548",
"0.6189498",
"0.6181826",
"0.61711425",
"0.6119786",
"0.61185914",
"0.6103303",
"0.6096227",
"0.608968",
"0.6080504",
"0.6066979",
"0.6031485",
"0.601827",
"0.59577084",
"0.59545106",
"0.59279495",
"0.5913966",
"0.5908121",
"0.5896492",
"0.58820033",
"0.57941127",
"0.5748919",
"0.57475525",
"0.57251537",
"0.5710129",
"0.5682127",
"0.56805277",
"0.56646836",
"0.5644476",
"0.5635082",
"0.5630862",
"0.5608924",
"0.56033874",
"0.5568519",
"0.5561295",
"0.55606437",
"0.5546972",
"0.55280644",
"0.5527378",
"0.55174553",
"0.54851824",
"0.54749674",
"0.5473559",
"0.54686975",
"0.54686975",
"0.54686975",
"0.54686975",
"0.54686975",
"0.54686975",
"0.54551893",
"0.5447297",
"0.542719",
"0.5422729",
"0.5382093",
"0.5381678",
"0.5378994",
"0.5377753",
"0.5375677",
"0.53552705",
"0.5345763",
"0.533892",
"0.53169197",
"0.53169197"
] | 0.8534456 | 0 |
get combined unique id(had been md5) | public static String combinedUniqueId() {
// generate combined unique id using device id, pseudo unique id and
// android id
String _combinedUniqueId = deviceId() + pseudoUniqueId() + androidId();
Log.d(LOG_TAG, "The combined unique id = " + _combinedUniqueId);
return StringUtils.md5(_combinedUniqueId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String uniqueId();",
"String getUniqueId();",
"String getUniqueID();",
"public String gerarUID() {\n //String id1 = UUID.randomUUID().toString().replace(\"-\", \"\");\n String id1 = UUID.randomUUID().toString();\n return id1;\n }",
"private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }",
"private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }",
"UUID getUniqueId();",
"public String getUniqueID(Context ctx)\n {\n String m_szDevIDShort = \"\";\n String m_szAndroidID = \"\";\n String m_szWLANMAC = \"\";\n\n try {\n m_szDevIDShort = \"35\" + // we make this look like a valid IMEI\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n m_szAndroidID = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n WifiManager wm = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);\n m_szWLANMAC = wm.getConnectionInfo().getMacAddress();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n String m_szLongID = m_szWLANMAC + m_szDevIDShort + m_szAndroidID;\n\n MessageDigest m = null;\n try {\n m = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n m.update(m_szLongID.getBytes(), 0, m_szLongID.length());\n byte p_md5Data[] = m.digest();\n\n //noinspection RedundantStringConstructorCall\n String m_szUniqueID = new String();\n for (int i = 0; i < p_md5Data.length; i++) {\n int b = (0xFF & p_md5Data[i]);\n // if it is a single digit, make sure it have 0 in front (proper\n // padding)\n if (b <= 0xF)\n m_szUniqueID += \"0\";\n // add number to string\n m_szUniqueID += Integer.toHexString(b);\n }\n\n return m_szUniqueID;\n }",
"String generateUID();",
"public String getUniqueID();",
"private String generateUniqueIdString() {\r\n return TimeBasedUUID.getUUIDAsString();\r\n }",
"static String generateId() {\r\n\t\treturn UUID.randomUUID().toString().replaceAll(\"-\", \"\");\r\n\t}",
"UUID id();",
"public int generateUniqueID(){\n\n int uniqueID = 100; \n int maxID =getMaxId() ;\n \n uniqueID = uniqueID + maxID;\n\n return uniqueID;\n }",
"String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }",
"private static String getUniqueId()\n\t{\n\t\tfinal int limit = 100000000;\n\t\tint current;\n\t\tsynchronized (DiskFileItem.class)\n\t\t{\n\t\t\tcurrent = counter.nextInt();\n\t\t}\n\t\tString id = Integer.toString(current);\n\n\t\t// If you manage to get more than 100 million of ids, you'll\n\t\t// start getting ids longer than 8 characters.\n\t\tif (current < limit)\n\t\t{\n\t\t\tid = (\"00000000\" + id).substring(id.length());\n\t\t}\n\t\treturn id;\n\t}",
"private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}",
"public static String uniqueId() {\r\n return UUID.randomUUID().toString();\r\n }",
"private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }",
"private long generateID() {\n\t\treturn ++lastID;\n\t}",
"public static byte[] generateUpstreamId() {\n byte[] upstreamId = new byte[ID_BYTE_LENGTH];\n String uuidStr = UUID.randomUUID().toString();\n for (int i = 0; i < ID_BYTE_LENGTH; i++) {\n upstreamId[i] = (byte) uuidStr.charAt(i);\n }\n return upstreamId;\n }",
"public static String uniqueId() {\n return UUID.randomUUID().toString();\n }",
"byte[] getId();",
"public String getUniqueID ( ) { return _uniqueID; }",
"int nextId();",
"public static int generateUniqueId(){\r\n String returnme = GregorianCalendar.getInstance().getTimeInMillis() + \"\";\r\n return Integer.parseInt(returnme.substring(returnme.length() - 9, returnme.length()));\r\n }",
"private static String pseudoUniqueId() {\n\t\t// decimal\n\t\tfinal Integer DECIMAL = 10;\n\n\t\t// return the android device some common info(board, brand, CPU type +\n\t\t// ABI convention, device, display, host, id, manufacturer, model,\n\t\t// product, tags, type and user) combined string\n\t\treturn new StringBuilder().append(Build.BOARD.length() % DECIMAL)\n\t\t\t\t.append(Build.BRAND.length() % DECIMAL)\n\t\t\t\t.append(Build.CPU_ABI.length() % DECIMAL)\n\t\t\t\t.append(Build.DEVICE.length() % DECIMAL)\n\t\t\t\t.append(Build.DISPLAY.length() % DECIMAL)\n\t\t\t\t.append(Build.HOST.length() % DECIMAL)\n\t\t\t\t.append(Build.ID.length() % DECIMAL)\n\t\t\t\t.append(Build.MANUFACTURER.length() % DECIMAL)\n\t\t\t\t.append(Build.MODEL.length() % DECIMAL)\n\t\t\t\t.append(Build.PRODUCT.length() % DECIMAL)\n\t\t\t\t.append(Build.TAGS.length() % DECIMAL)\n\t\t\t\t.append(Build.TYPE.length() % DECIMAL)\n\t\t\t\t.append(Build.USER.length() % DECIMAL).toString();\n\t}",
"protected int getUniqueID() {\n\t\treturn uniqueID;\n\t}",
"protected int generateUniqueId() {\n\t\tint id = super.getUniqueId();\n\t\tsuper.setUniqueId(getUniqueId() + 1);\n\t\treturn id;\n\t}",
"public int genID() {\n int uid = this.hashCode();\n if (uid < 0) {\n uid = Math.abs(uid);\n uid = uid * 15551;\n }\n return uid;\n }",
"public String generateLink_Id() {\n\t\tString Link_Id = \"L\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkLinkIdIfExist(Link_Id)) {\n\t\t\tLink_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn Link_Id;\n\t}",
"private String generateUID()\n {\n String uid;\n int nbAccounts = this.getNumberOfAccounts();\n String host = this.registration.getHost();\n int nbAccountsForHost = this.getNbAccountForHost(host);\n \n if (nbAccounts == 0 || (this.isModification() && nbAccounts == 1) ||\n nbAccountsForHost == 0 || (this.isModification() && nbAccountsForHost == 1))\n {\n // We create the first account or we edit the onlyone\n // Or we create the first account for this server or edit the onlyone\n uid = host;\n }\n else\n {\n uid = host + \":\" + this.registration.getPort();\n }\n \n return uid;\n }",
"private String generateId(String input) {\n\t\treturn StringUtil.hashSHA256(input);\n\t}",
"UUID getId();",
"String getExistingId();",
"public String getId() {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"n=\");\n\t\tif ( nodeId != null ) {\n\t\t\tbuilder.append(nodeId);\n\t\t}\n\t\tbuilder.append(\";c=\");\n\t\tif ( created != null ) {\n\t\t\tbuilder.append(created);\n\t\t}\n\t\tbuilder.append(\";s=\");\n\t\tif ( sourceId != null ) {\n\t\t\tbuilder.append(sourceId);\n\t\t}\n\t\treturn DigestUtils.sha1Hex(builder.toString());\n\t}",
"public int getId() {\n // some code goes here\n int id = f.getAbsoluteFile().hashCode();\n //System.out.println(id);\n return id;\n }",
"public int hashCode() {\n/* 781 */ return getUniqueId().hashCode();\n/* */ }",
"public String getUniqueId() {\n\t\treturn m_serverName + \" - \" + m_userId + \" - \" + m_timestampMillisecs;\n\t}",
"public void generateID()\n {\n ID = this.hashCode();\n }",
"public static String getUniqueIdentifier() {\r\n UUID uuid = UUID.randomUUID();\r\n return uuid.toString();\r\n }",
"public String getUniqueId() {\n return _uniqueId;\n }",
"private String generate_uuid() {\n\n int random_length = 12;\n int time_length = 4;\n\n byte[] output_byte = new byte[random_length+time_length];\n\n //12 byte long secure random\n SecureRandom random = new SecureRandom();\n byte[] random_part = new byte[random_length];\n random.nextBytes(random_part);\n System.arraycopy(random_part, 0, output_byte, 0, random_length);\n\n //merged with 4 less significant bytes of time\n long currentTime = System.currentTimeMillis();\n for (int i=random_length; i<output_byte.length; i++){\n output_byte[i] = (byte)(currentTime & 0xFF);\n currentTime >>= 8;\n }\n\n //Converted to base64 byte\n String output = Base64.encodeBase64String(output_byte);\n Log.debug_value(\"UUID\", output);\n return output;\n\n }",
"public String RtoosGetID() \n\t{\n\t\treturn UUIDs.random().toString();\n\t}",
"java.lang.String getUUID();",
"private static int generateId() {\n\t\treturn ++sId;\n\t}",
"public static String nextUuId() {\n UUID uuid = UUID.randomUUID();\n\n StringBuilder buff = new StringBuilder(32);\n long2string(uuid.getMostSignificantBits(), buff);\n long2string(uuid.getLeastSignificantBits(), buff);\n\n return buff.toString();\n }",
"public static String getUUID() {\n\t\treturn UUID.randomUUID().toString().toUpperCase().replace(\"-\", \"\").substring(0, 5);\n\t}",
"public String getNextID() {\n String id = \"am\" + Integer.toString(nextID);\n nextID++;\n return id;\n }",
"public int getUniqueId() {\r\n\t\treturn uniqueId;\r\n\t}",
"String mo10312id();",
"public String generateGUID() {\n Random randomGenerator = new Random();\n String hash = DigestUtils.shaHex(HASH_FORMAT.format(new Date())\n + randomGenerator.nextInt());\n return hash.substring(0, GUID_LEN);\n }",
"long getToUid();",
"public String getBaseId();",
"long getUID() throws UidGenerateException;",
"public int getId() {\n // some code goes here\n \treturn m_f.getAbsoluteFile().hashCode();\n }",
"private String generateNewCallId()\n {\n\n\t\t// Generate the variant number\n\t\tint variable = NumberUtils.getIntRandom();\n\n\t\t// Convert to hex value\n\t\tString hex = NumberUtils.toHexValue(variable);\n\n\t\t// Compose the final call id\n\t\treturn \"{2B073406-65D8-A7B2-5B13-B287\" + hex + \"}\";\n\t}",
"public String getUniqueID()\r\n {\r\n return (m_uniqueID);\r\n }",
"private Integer getUniqueId(Object object) {\n/* 89 */ Integer id = this.idCache.get(object);\n/* 90 */ if (id == null) {\n/* 91 */ id = Integer.valueOf(this.uidGenerator.incrementAndGet());\n/* 92 */ Integer existing = this.idCache.putIfAbsent(object, id);\n/* 93 */ if (existing != null) {\n/* 94 */ return existing;\n/* */ }\n/* */ } \n/* 97 */ return id;\n/* */ }",
"private int generateNewId() {\n int size = userListCtrl.getUsers().size();\n \n if (size == 0) {\n return 1;\n } else {\n return userListCtrl.getUsers().get(size-1).getUserID()+1;\n }\n }",
"public String generateId() {\n return Utils.generateKey();\n }",
"public String getUniqueIdentifier(){\n return (streetAddress + aptNumber + zip).toLowerCase().replaceAll(\"\\\\s+\",\"\"); \n }",
"private static String localUnique(){\n\t\tfinal long counterValue = instanceCounter.getAndIncrement();\n\t\tString unique = uniqueTop + String.format(\"%08d\", counterValue);\n\t\treturn unique;\t\t\n\t}",
"public int getUniqueID() { \n return -1;\n }",
"long getUID();",
"static int getUniqueID(Object obj) {\n return obj.hashCode();\n }",
"public String uniqueId() {\n return this.uniqueId;\n }",
"public UUID getUniqueId ( ) {\n\t\treturn extract ( handle -> handle.getUniqueId ( ) );\n\t}",
"@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }",
"@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }",
"public abstract long id();",
"public static long getID() {\n int localizador = 0;\n Long min = 1000000000L;\n Long max = 9999999999L;\n\n do {\n localizador = (int) Math.floor(Math.random() * (max - min + 1) + min);\n } while (Integer.toString(localizador).length() != 10);\n return localizador;\n }",
"public String generateId() {\n return RandomStringUtils.randomAlphabetic(32);\n }",
"long getUid();",
"long getUid();",
"private static synchronized String getNextRequestId()\n {\n if (++nextRequestId < 0)\n {\n nextRequestId = 0;\n }\n String id = Integer.toString(nextRequestId);\n return id;\n }",
"private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }",
"public static synchronized String getUID() throws UnknownHostException, SocketException {\r\n \r\n // Initialized MAC address if necessary.\r\n if (!initialized) {\r\n initialized = true;\r\n macAddress = UMROMACAddress.getMACAddress();\r\n macAddress = Math.abs(macAddress);\r\n }\r\n \r\n // Use standard class to get unique values.\r\n String guidText = new UID().toString();\r\n \r\n StringTokenizer st = new StringTokenizer(guidText, \":\");\r\n \r\n int unique = Math.abs(Integer.valueOf(st.nextToken(), 16).intValue());\r\n long time = Math.abs(Long.valueOf(st.nextToken(), 16).longValue());\r\n // why add 0x8000 ? because usually starts at -8000, which wastes 4 digits\r\n int count = Math\r\n .abs(Short.valueOf(st.nextToken(), 16).shortValue() + 0x8000);\r\n \r\n // concatenate values to make it into a DICOM GUID.\r\n String guid = UMRO_ROOT_GUID + macAddress + \".\" + unique + \".\" + time\r\n + \".\" + count;\r\n \r\n return guid;\r\n }",
"public byte[] getUniqueID()\n {\n return m_Key;\n }",
"private Long createId() {\n return System.currentTimeMillis() % 1000;\n }",
"private String nextGUID() {\r\n\t\tString guidIdSQL = \"SELECT SYS_GUID() FROM DUAL\";\r\n\t\treturn namedJdbcTemplate.queryForObject(guidIdSQL, (HashMap<String, ?>) null, String.class);\r\n\t}",
"String getUuid();",
"public static String createUniqueKey() {\r\n\r\n\t\tint iRnd;\r\n\t\tlong lSeed = System.currentTimeMillis();\r\n\t\tRandom oRnd = new Random(lSeed);\r\n\t\tString sHex;\r\n\t\tStringBuffer sUUID = new StringBuffer(32);\r\n\t\tbyte[] localIPAddr = new byte[4];\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 8 characters Code IP address of this machine\r\n\t\t\tlocalIPAddr = InetAddress.getLocalHost().getAddress();\r\n\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[0]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[1]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[2]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[3]) & 255]);\r\n\t\t}\r\n\t\tcatch (UnknownHostException e) {\r\n\t\t\t// Use localhost by default\r\n\t\t\tsUUID.append(\"7F000000\");\r\n\t\t}\r\n\r\n\t\t// Append a seed value based on current system date\r\n\t\tsUUID.append(Long.toHexString(lSeed));\r\n\r\n\t\t// 6 characters - an incremental sequence\r\n\t\tsUUID.append(Integer.toHexString(iSequence.incrementAndGet()));\r\n\r\n\t\tiSequence.compareAndSet(16777000, 1048576);\r\n\r\n\t\tdo {\r\n\t\t\tiRnd = oRnd.nextInt();\r\n\t\t\tif (iRnd>0) iRnd = -iRnd;\r\n\t\t\tsHex = Integer.toHexString(iRnd);\r\n\t\t} while (0==iRnd);\r\n\r\n\t\t// Finally append a random number\r\n\t\tsUUID.append(sHex);\r\n\r\n\t\treturn sUUID.substring(0, 32);\r\n\t}",
"String getContentGeneratorId();",
"protected String generateCommandID()\n {\n String res = new String (_initialID);\n // \"increase\" the ID for the next call\n boolean wasIncr = false;\n for (int i = _initialID.length-1; i>=0; i--)\n {\n if (_initialID[i] >= 'Z')\n {\n _initialID[i] = 'A';\n if ( i > 0 )\n {\n _initialID[i-1]++;\n wasIncr = true;\n }\n }\n else\n {\n if (! wasIncr) _initialID[i]++;\n break;\n }\n }\n return res;\n }",
"public String getUniqueIdValue() {\n return uniqueIdValue;\n }",
"private int IdRandom() {\n\t\tRandom random = new Random();\n\t\tint id = random.nextInt(899999) + 100000;\n\t\treturn id;\n\t}",
"java.lang.String getToUid();",
"public int generateId() {\n if (allMessage.size() ==0) {\n return 1000;\n }\n return allMessage.get(allMessage.size() - 1).getId() + 1;\n }",
"String idProvider();",
"String getUnique();",
"protected String generateLockId() {\n return AkkaUtils.nextId();\n }",
"private String getNewConversationId( )\r\n {\r\n return UUID.randomUUID( ).toString( );\r\n }",
"public String getUniqTime(){\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n return timeStamp;\n }",
"String getUid();",
"default String getOwnerId()\n {\n return Long.toUnsignedString(getOwnerIdLong());\n }",
"public String uuid(){\n\t\t String device_unique_id = Secure.getString(activity.getContentResolver(),\n\t\t Secure.ANDROID_ID);\n\t\t return device_unique_id;\n\t\t}",
"public String identityHash() {\n return Integer.toHexString(System.identityHashCode(this));\n }",
"public static final String getRandomId() {\r\n return (\"\" + Math.random()).substring(2);\r\n }",
"UUID getUUID();"
] | [
"0.7532869",
"0.73161167",
"0.7133858",
"0.7094323",
"0.70608187",
"0.70330316",
"0.701277",
"0.69711924",
"0.69447863",
"0.691133",
"0.68662184",
"0.68592215",
"0.68314403",
"0.68023986",
"0.6746904",
"0.6738211",
"0.6722472",
"0.6667449",
"0.66659445",
"0.6657272",
"0.66485333",
"0.6593464",
"0.65652037",
"0.6541301",
"0.65342283",
"0.6518955",
"0.6514752",
"0.651448",
"0.65141255",
"0.64944947",
"0.6473029",
"0.6472036",
"0.64706254",
"0.64670485",
"0.64597034",
"0.64565814",
"0.6446356",
"0.6445155",
"0.64347905",
"0.64081",
"0.63877076",
"0.63745064",
"0.637016",
"0.63591677",
"0.63584757",
"0.6356249",
"0.63543886",
"0.63478893",
"0.63345975",
"0.6334499",
"0.63272226",
"0.63260573",
"0.62824756",
"0.62735784",
"0.62712353",
"0.6269121",
"0.6259264",
"0.62581426",
"0.6236248",
"0.6235936",
"0.6229799",
"0.62265515",
"0.622312",
"0.62198323",
"0.6217743",
"0.6216344",
"0.62003994",
"0.6197005",
"0.61893845",
"0.61893845",
"0.6187545",
"0.61818314",
"0.6177726",
"0.6176635",
"0.6176635",
"0.61698186",
"0.61570126",
"0.6155738",
"0.6153258",
"0.6152944",
"0.61516494",
"0.61505324",
"0.6150311",
"0.61450756",
"0.6131689",
"0.6128305",
"0.61229473",
"0.61198604",
"0.60967934",
"0.6096443",
"0.6095856",
"0.6093232",
"0.60896415",
"0.60882676",
"0.6086227",
"0.6086017",
"0.60818696",
"0.6081622",
"0.6076437",
"0.6069244"
] | 0.7880299 | 0 |
generate pseudo unique id(13bits) | private static String pseudoUniqueId() {
// decimal
final Integer DECIMAL = 10;
// return the android device some common info(board, brand, CPU type +
// ABI convention, device, display, host, id, manufacturer, model,
// product, tags, type and user) combined string
return new StringBuilder().append(Build.BOARD.length() % DECIMAL)
.append(Build.BRAND.length() % DECIMAL)
.append(Build.CPU_ABI.length() % DECIMAL)
.append(Build.DEVICE.length() % DECIMAL)
.append(Build.DISPLAY.length() % DECIMAL)
.append(Build.HOST.length() % DECIMAL)
.append(Build.ID.length() % DECIMAL)
.append(Build.MANUFACTURER.length() % DECIMAL)
.append(Build.MODEL.length() % DECIMAL)
.append(Build.PRODUCT.length() % DECIMAL)
.append(Build.TAGS.length() % DECIMAL)
.append(Build.TYPE.length() % DECIMAL)
.append(Build.USER.length() % DECIMAL).toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }",
"public int genID() {\n int uid = this.hashCode();\n if (uid < 0) {\n uid = Math.abs(uid);\n uid = uid * 15551;\n }\n return uid;\n }",
"String generateUID();",
"private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }",
"public int generateUniqueID(){\n\n int uniqueID = 100; \n int maxID =getMaxId() ;\n \n uniqueID = uniqueID + maxID;\n\n return uniqueID;\n }",
"String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }",
"static String generateId() {\r\n\t\treturn UUID.randomUUID().toString().replaceAll(\"-\", \"\");\r\n\t}",
"String uniqueId();",
"public String generateId() {\n return RandomStringUtils.randomAlphabetic(32);\n }",
"public static int generateUniqueId(){\r\n String returnme = GregorianCalendar.getInstance().getTimeInMillis() + \"\";\r\n return Integer.parseInt(returnme.substring(returnme.length() - 9, returnme.length()));\r\n }",
"private long generateID() {\n\t\treturn ++lastID;\n\t}",
"private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }",
"private String generateUniqueIdString() {\r\n return TimeBasedUUID.getUUIDAsString();\r\n }",
"private static int generateId() {\n\t\treturn ++sId;\n\t}",
"public String generateId() {\n return Utils.generateKey();\n }",
"public String generateID() {\n return IDPREFIX + nextidint++;\n }",
"public static String secureRandomId() {\n\t\tSecureRandom random = new SecureRandom();\n\t\treturn new BigInteger(130, random).toString(32);\n\t}",
"public static String createUniqueKey() {\r\n\r\n\t\tint iRnd;\r\n\t\tlong lSeed = System.currentTimeMillis();\r\n\t\tRandom oRnd = new Random(lSeed);\r\n\t\tString sHex;\r\n\t\tStringBuffer sUUID = new StringBuffer(32);\r\n\t\tbyte[] localIPAddr = new byte[4];\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 8 characters Code IP address of this machine\r\n\t\t\tlocalIPAddr = InetAddress.getLocalHost().getAddress();\r\n\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[0]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[1]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[2]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[3]) & 255]);\r\n\t\t}\r\n\t\tcatch (UnknownHostException e) {\r\n\t\t\t// Use localhost by default\r\n\t\t\tsUUID.append(\"7F000000\");\r\n\t\t}\r\n\r\n\t\t// Append a seed value based on current system date\r\n\t\tsUUID.append(Long.toHexString(lSeed));\r\n\r\n\t\t// 6 characters - an incremental sequence\r\n\t\tsUUID.append(Integer.toHexString(iSequence.incrementAndGet()));\r\n\r\n\t\tiSequence.compareAndSet(16777000, 1048576);\r\n\r\n\t\tdo {\r\n\t\t\tiRnd = oRnd.nextInt();\r\n\t\t\tif (iRnd>0) iRnd = -iRnd;\r\n\t\t\tsHex = Integer.toHexString(iRnd);\r\n\t\t} while (0==iRnd);\r\n\r\n\t\t// Finally append a random number\r\n\t\tsUUID.append(sHex);\r\n\r\n\t\treturn sUUID.substring(0, 32);\r\n\t}",
"public static String nextUuId() {\n UUID uuid = UUID.randomUUID();\n\n StringBuilder buff = new StringBuilder(32);\n long2string(uuid.getMostSignificantBits(), buff);\n long2string(uuid.getLeastSignificantBits(), buff);\n\n return buff.toString();\n }",
"public String GenerateID()\n\t{\n\t\tRandom randomGenerator = new Random();\n\t\treturn Integer.toString(randomGenerator.nextInt(Integer.MAX_VALUE));\n\t}",
"public int generateSessionID(){\r\n SecureRandom randsession = new SecureRandom();\r\n return randsession.nextInt(1234567890);\r\n }",
"private String generateId(String input) {\n\t\treturn StringUtil.hashSHA256(input);\n\t}",
"public static long generateUniqueId() {\n // A UUID represents a 128-bit value, that is 16 bytes long value.\n final UUID uuid = UUID.randomUUID();\n return Math.abs(uuid.getMostSignificantBits());\n }",
"private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}",
"protected int generateUniqueId() {\n\t\tint id = super.getUniqueId();\n\t\tsuper.setUniqueId(getUniqueId() + 1);\n\t\treturn id;\n\t}",
"public void generateID()\n {\n ID = this.hashCode();\n }",
"public static String makeRandomID() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }",
"public String generateGUID() {\n Random randomGenerator = new Random();\n String hash = DigestUtils.shaHex(HASH_FORMAT.format(new Date())\n + randomGenerator.nextInt());\n return hash.substring(0, GUID_LEN);\n }",
"public static int genID(){\n Random rand = new Random();\n\n int theID = rand.nextInt(999)+1;\n\n return theID;\n\n }",
"public NUID() {\n // Generate a cryto random int, 0 <= val < max to seed pseudorandom\n seq = nextLong(PRAND, maxSeq);\n inc = minInc + nextLong(PRAND, maxInc - minInc);\n pre = new char[preLen];\n for (int i = 0; i < preLen; i++) {\n pre[i] = '0';\n }\n randomizePrefix();\n }",
"private Long createId() {\n return System.currentTimeMillis() % 1000;\n }",
"int nextId();",
"public String generateLink_Id() {\n\t\tString Link_Id = \"L\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkLinkIdIfExist(Link_Id)) {\n\t\t\tLink_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn Link_Id;\n\t}",
"public static String generateInstanceId() {\n\t\t// TODO Use a complex hashing algorithm and generate 16-character\n\t\t// string;\n\n\t\treturn Calendar.getInstance().getTime().toString().replaceAll(\" \", \"\");\n\t}",
"public String nextSessionId() {\n\t\tSecureRandom random = new SecureRandom();\n\t\treturn new BigInteger(130, random).toString(32);\n\t}",
"private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }",
"private int IdRandom() {\n\t\tRandom random = new Random();\n\t\tint id = random.nextInt(899999) + 100000;\n\t\treturn id;\n\t}",
"private String generate_uuid() {\n\n int random_length = 12;\n int time_length = 4;\n\n byte[] output_byte = new byte[random_length+time_length];\n\n //12 byte long secure random\n SecureRandom random = new SecureRandom();\n byte[] random_part = new byte[random_length];\n random.nextBytes(random_part);\n System.arraycopy(random_part, 0, output_byte, 0, random_length);\n\n //merged with 4 less significant bytes of time\n long currentTime = System.currentTimeMillis();\n for (int i=random_length; i<output_byte.length; i++){\n output_byte[i] = (byte)(currentTime & 0xFF);\n currentTime >>= 8;\n }\n\n //Converted to base64 byte\n String output = Base64.encodeBase64String(output_byte);\n Log.debug_value(\"UUID\", output);\n return output;\n\n }",
"private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}",
"public static long randomId() {\n UUID uuid = UUID.randomUUID();\n long mostSignificantBits = uuid.getMostSignificantBits();\n long leastSignificantBits = uuid.getLeastSignificantBits();\n return (mostSignificantBits ^ leastSignificantBits) & Long.MAX_VALUE;\n }",
"public static String generateId(String prefix) {\n\t\tlong now = System.currentTimeMillis();\n\t\tlong randomLong = Math.round(Math.random() * 89999) + 10000;\n\t\treturn (prefix + now + \"-\" + randomLong);\n\t}",
"public static String generateReverseTimestampId() {\r\n\t\tString sTs = Str.leftPad(String.valueOf(Long.MAX_VALUE-System.currentTimeMillis()),'0',20);\r\n\t\tString sRd = Str.leftPad(String.valueOf(new Random().nextInt(Integer.MAX_VALUE)),'0',10);\r\n\t\treturn Str.leftPad(sTs+sRd,'0',32);\r\n\t }",
"public static String generateId(String s){\n\t\tString date = LocalDate.now().format(DateTimeFormatter.ofPattern(\"yyMMdd\"));\n\t\tString key = s +\"_\" + date;\n\t\t//com.incr(key);\n\t\tredisTemplate.opsForValue().increment(key);\n\t\tInteger num = redisTemplate.opsForValue().get(key);\n\t\treturn date + \"-\" + String.format(\"%08d\",num);\n\t}",
"protected UniqueID() {\n UUID newID = UUID.randomUUID();\n this.mostSigBits = newID.getMostSignificantBits();\n this.leastSigBits = newID.getLeastSignificantBits();\n }",
"public static int makeSegID() {\n int newID = (int) (Math.random() * 100000000);\n return newID;\n }",
"public static String uniqueId() {\r\n return UUID.randomUUID().toString();\r\n }",
"protected String generateRandomId(String prefix) {\n int nextInt = RANDOM.nextInt();\n nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);\n return prefix + \"_\" + String.valueOf(nextInt);\n }",
"public static String generateRandomNonce() {\n Random r = new Random();\n StringBuffer n = new StringBuffer();\n for (int i = 0; i < r.nextInt(8) + 2; i++) {\n n.append(r.nextInt(26) + 'a');\n }\n return n.toString();\n }",
"private String generateNewCallId()\n {\n\n\t\t// Generate the variant number\n\t\tint variable = NumberUtils.getIntRandom();\n\n\t\t// Convert to hex value\n\t\tString hex = NumberUtils.toHexValue(variable);\n\n\t\t// Compose the final call id\n\t\treturn \"{2B073406-65D8-A7B2-5B13-B287\" + hex + \"}\";\n\t}",
"public static long getID() {\n int localizador = 0;\n Long min = 1000000000L;\n Long max = 9999999999L;\n\n do {\n localizador = (int) Math.floor(Math.random() * (max - min + 1) + min);\n } while (Integer.toString(localizador).length() != 10);\n return localizador;\n }",
"public static String aUniqueIdentifier() {\n return \"MONEXT\" + new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n }",
"private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }",
"private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }",
"String getUniqueId();",
"public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(SHORT_DEF_COUNT);\n }",
"public static String uniqueId() {\n return UUID.randomUUID().toString();\n }",
"public String generateActivationId() {\n return UUID.randomUUID().toString();\n }",
"String getUniqueID();",
"UUID getUniqueId();",
"public static String generateID(int length) {\n\t\tString id = \"\";\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tid += (int) (Math.random() * 10);\n\t\t}\n\t\t\n\t\treturn id;\n\t}",
"public static String generateNewUserId() {\r\n\t\tDate date = new Date();\r\n\t\treturn String.format(\"%s-%s\", UUID.randomUUID().toString(),\r\n\t\t\t\tString.valueOf(date.getTime()));\r\n\t}",
"public static String generateID(int num){\n StringBuilder str=new StringBuilder();//定义变长字符串\n Random random=new Random();\n for (int i = 0; i < num; i++) {\n str.append(random.nextInt(10));\n }\n return str.toString();\n }",
"protected String generateCommandID()\n {\n String res = new String (_initialID);\n // \"increase\" the ID for the next call\n boolean wasIncr = false;\n for (int i = _initialID.length-1; i>=0; i--)\n {\n if (_initialID[i] >= 'Z')\n {\n _initialID[i] = 'A';\n if ( i > 0 )\n {\n _initialID[i-1]++;\n wasIncr = true;\n }\n }\n else\n {\n if (! wasIncr) _initialID[i]++;\n break;\n }\n }\n return res;\n }",
"public String generateCustomer_Id() {\n\t\tString customer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkCustomerIdIfExist(customer_Id)) {\n\t\t\tcustomer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn customer_Id;\n\t}",
"public String gerarUID() {\n //String id1 = UUID.randomUUID().toString().replace(\"-\", \"\");\n String id1 = UUID.randomUUID().toString();\n return id1;\n }",
"UUID id();",
"private byte generatePatternId() {\n byte[] patternId = new byte[1];\n new Random().nextBytes(patternId);\n if (patternId[0] == (byte) ServerStateEvent.PATTERN_ERROR_OR_IDLE) {\n return 1;\n }\n if (patternId[0] == ServerStateEvent.PATTERN_SERVER) {\n return 2;\n }\n return patternId[0];\n }",
"private int generateSessionId(){\n int id;\n do{\n id = smIdGenerator.nextInt(50000);\n }while(mSessionMap.containsKey(id));\n\n Log.i(TAG, \"generating session id:\" + id);\n return id;\n }",
"public static String getUniqueIdentifier() {\r\n UUID uuid = UUID.randomUUID();\r\n return uuid.toString();\r\n }",
"public static String createPID()\r\n\t{\r\n\t\tunique_count++;\r\n\t\tif(unique_count >= 100) unique_count = 0;\r\n\t\tString str_num = String.format(\"%02d\", unique_count);\r\n\t\t\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyMMddHHmmss\");\r\n\t\tString pid = dateFormat.format(new Date()) + str_num;\r\n\t\treturn pid;\r\n\t}",
"public int idGenerator() {\n Random random = new Random();\n int id;\n return id = random.nextInt(10000);\n }",
"private String generatePurchaseId() {\n\t\tint purchaseId = purchaseIdCounter.incrementAndGet();\n\t\treturn Integer.toString(purchaseId);\n\t}",
"protected String getNextID(String prefix) {\n return String.format(\"%s-%s\", prefix, UUID.randomUUID().toString()) ;\n }",
"private static Integer generateID() {\n Integer uniqueID = -1;\n while (setOfIDs.contains(uniqueID) || !Employee.isPositive(uniqueID)) {\n uniqueID += 1;\n }\n return uniqueID;\n }",
"private static String getUniqueId()\n\t{\n\t\tfinal int limit = 100000000;\n\t\tint current;\n\t\tsynchronized (DiskFileItem.class)\n\t\t{\n\t\t\tcurrent = counter.nextInt();\n\t\t}\n\t\tString id = Integer.toString(current);\n\n\t\t// If you manage to get more than 100 million of ids, you'll\n\t\t// start getting ids longer than 8 characters.\n\t\tif (current < limit)\n\t\t{\n\t\t\tid = (\"00000000\" + id).substring(id.length());\n\t\t}\n\t\treturn id;\n\t}",
"public static int generateViewId() {\n\t\tdo {\n\t\t\tfinal int result = sNextGeneratedId.get();\n\t\t\t// aapt-generated IDs have the high byte nonzero; clamp to the range under that.\n\t\t\tint newValue = result + 1;\n\t\t\tif (newValue > 0x00FFFFFF){\n\t\t\t\tnewValue = 1; // Roll over to 1, not 0.\n\t\t\t}\n\t\t\tif (sNextGeneratedId.compareAndSet(result, newValue)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}while(true);\n\t}",
"private static int generateViewId() {\n for (;;) {\n final int result = sNextGeneratedId.get();\n // aapt-generated IDs have the high byte nonzero; clamp to the range under that.\n int newValue = result + 1;\n if (newValue > 0x00FFFFFF) newValue = 1; // Roll over to 1, not 0.\n if (sNextGeneratedId.compareAndSet(result, newValue)) {\n return result;\n }\n }\n }",
"@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }",
"@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }",
"protected String generateStateId() {\n\t\treturn ServiceBus.crypto.getRandomString();\n\t}",
"protected String generateUserID() {\n Random r = new Random();\n String userID;\n do {\n int randomIDnum = r.nextInt(999999999) + 1;\n userID = String.valueOf(randomIDnum);\n } while (this.userMap.containsKey(userID));\n return userID;\n }",
"UUID generateRandomUuid();",
"private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }",
"protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}",
"public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }",
"public synchronized String generateTag() {\n return Integer.toHexString(rand.nextInt());\n }",
"long getUID() throws UidGenerateException;",
"private int generateNewId() {\n int size = userListCtrl.getUsers().size();\n \n if (size == 0) {\n return 1;\n } else {\n return userListCtrl.getUsers().get(size-1).getUserID()+1;\n }\n }",
"private static int nextInstanceID()\n {\n return baseID.incrementAndGet();\n }",
"public long getNextID() throws IDGenerationException;",
"public static byte[] generateUpstreamId() {\n byte[] upstreamId = new byte[ID_BYTE_LENGTH];\n String uuidStr = UUID.randomUUID().toString();\n for (int i = 0; i < ID_BYTE_LENGTH; i++) {\n upstreamId[i] = (byte) uuidStr.charAt(i);\n }\n return upstreamId;\n }",
"public static long generateCode() {\n long code = (long) (100000 + Math.random() * 899999l);\n return code;\n }",
"public String getNextID() {\n String id = \"am\" + Integer.toString(nextID);\n nextID++;\n return id;\n }",
"public BigInteger getNextBigID() throws IDGenerationException;",
"public static String getUniqueSequence() {\n\t\treturn UUID.randomUUID().toString();\n\t}",
"private UniqueIdentifier(){\n\t\t\n\t}",
"@Override\n\tpublic native final String createUniqueId() /*-{\n // In order to force uid's to be document-unique across multiple modules,\n // we hang a counter from the document.\n if (!this.gwt_uid) {\n this.gwt_uid = 1;\n }\n\n return \"gwt-uid-\" + this.gwt_uid++;\n\t}-*/;",
"public String makeNonce()\n\t{\n\t\tbyte[] data = new byte[NONCE_SIZE];\n\t\trandom.nextBytes(data);\n\n\t\treturn encoder.encode(data);\n\t}",
"public static String generateMfactID() {\n\tmfactID++;\n\treturn String.valueOf(mfactID);\n }",
"public static String generateId(int digitAmount) {\n\t\t\n\t\tfinal String upperAlpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\t\t\n\t\tString brokerOrderID = \"\";\n\t\tfor (int i = 0; i < digitAmount; i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tint randomAlphaIndex = ThreadLocalRandom.current().nextInt(0, 25 + 1);\n\t\t\t\tbrokerOrderID += upperAlpha.charAt(randomAlphaIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint randomInteger = ThreadLocalRandom.current().nextInt(1, 9 + 1);\n\t\t\t\tbrokerOrderID += Integer.toString(randomInteger);\n\t\t\t}\n\t\t}\n\t\treturn brokerOrderID;\n\t}"
] | [
"0.7766663",
"0.7714384",
"0.7698985",
"0.7643245",
"0.76427305",
"0.7600994",
"0.75455755",
"0.74979836",
"0.7485211",
"0.7467025",
"0.7386768",
"0.7376032",
"0.7305149",
"0.7278746",
"0.72648877",
"0.7259326",
"0.72558814",
"0.7237492",
"0.7228962",
"0.7225431",
"0.7182109",
"0.7176258",
"0.71422195",
"0.7129763",
"0.71102244",
"0.7092119",
"0.7068196",
"0.70567983",
"0.7035645",
"0.70270157",
"0.6977226",
"0.69552946",
"0.69494116",
"0.69287455",
"0.6928066",
"0.6913391",
"0.69126225",
"0.68996453",
"0.68982744",
"0.6893271",
"0.68854547",
"0.68770367",
"0.6868523",
"0.68667334",
"0.68519187",
"0.68480325",
"0.683693",
"0.6834524",
"0.6832586",
"0.682826",
"0.68251425",
"0.6825022",
"0.68175983",
"0.6802612",
"0.67952526",
"0.6785886",
"0.67823523",
"0.6767134",
"0.675485",
"0.67361623",
"0.6731207",
"0.6729987",
"0.67266405",
"0.67139053",
"0.6702864",
"0.6698607",
"0.6688672",
"0.6681914",
"0.6673486",
"0.6668617",
"0.66586584",
"0.66538763",
"0.66434",
"0.6636657",
"0.6624011",
"0.6620681",
"0.661592",
"0.66094",
"0.66094",
"0.65934575",
"0.65894496",
"0.6580679",
"0.6568112",
"0.6564616",
"0.6563819",
"0.65617716",
"0.65579456",
"0.65484434",
"0.65480304",
"0.65459204",
"0.6539885",
"0.6534284",
"0.65296805",
"0.6520516",
"0.651914",
"0.65019524",
"0.64813006",
"0.64773047",
"0.64762676",
"0.6465118"
] | 0.6725374 | 63 |
The main for this class | public static void main (String args[]) {
int playerId;
String name;
players = new Player [GameData.NUM_PLAYERS_PLUS_NEUTRALS];
// display blank board
ui.displayMap();
// get player names
for (playerId=0; playerId<GameData.NUM_PLAYERS; playerId++) {
ui.displayString("Enter the name of Player " + (playerId+1));
name = ui.getCommand();
ui.displayString("> " + name);
ui.displayString(name + "'s colour is "+ PlayerColourString(playerId) + "\n");
players[playerId]= new Player(playerId, name);
}
//Set the neutral names
for(; playerId<GameData.NUM_PLAYERS_PLUS_NEUTRALS; playerId++) {
players[playerId]= new Player( playerId, PlayerColourString(playerId) + " Neutral");
ui.displayString(players[playerId].getName() + "'s colour is "+ PlayerColourString(playerId) + "\n");
}
Territory.initialiseTerritories(playerId, board, players, deckOfCards);
// display map
ui.displayMap();
Reinforcements.setUpArmies(players, ui, board);
Turn.turn(players, board, ui, deckOfCards);
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Main() {\n\n super();\n }",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"public static void main() {\n \n }",
"public Main() {\n\t\tsuper();\n\t}",
"public Main() {\n \n \n }",
"private Main ()\n {\n super ();\n }",
"public static void main()\n\t{\n\t}",
"public Main() {\r\n\t}",
"public static void main(){\n\t}",
"private Main() {\n }",
"private Main() {}",
"public static void main() {\n }",
"public Main() {}",
"public Main() {\r\n }",
"public Main() {\r\n }",
"public void main(){\n }",
"public Main() {\n }",
"public Main() {\n }",
"public Main() {\n }",
"public void Main(){\n }",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main(String[] args) {\n \n \n \n \n }",
"public static void main(String[] args) {\n \n \n \n\t}",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t }",
"public main() {\n initComponents();\n \n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args)\r\t{",
"public static void main(String[] args) {\n \n\n }",
"public Main() {\n // Required empty public constructor\n }",
"public static void main(String[] args) {\n \r\n\t}",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public static void main (String[] args) {\r\n\t\t \r\n\t\t}",
"public static void main (String []args){\n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t}",
"private ThoseMain()\n {\n // Do nothing\n }",
"public static void main(String[] args) {\n MainIntrence mainintrence = new MainIntrence();\r\n\r\n\r\n\r\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String []args){\n\n }",
"public static void main (String args[]) {\n\t\t\n }",
"public static void main(String[] args){\n\t\t\n\t\t\n \t}",
"public static void main(String[] args)\r\n {\n \r\n \r\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args)\r\n {\r\n \r\n \r\n \r\n }",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"public static void main (String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n \n\t\t}",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n \r\n}",
"public static void main(String[] args) {\r\n\t\t//method body\r\n\t}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {\n\t\r\n}",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[] args) \n\t{\n\t\t\n\t\n\t\t\n\t}",
"public static void main(String[] args) {\n new Main();\n }",
"public static void main(String[] args) {\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\r\n}",
"public static void main(String args[]){\n\t\t\n\t\n\t}",
"public void run() {\n // The run method should be overridden by the subordinate class. Please\n // see the example applications provided for more details.\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}"
] | [
"0.80435586",
"0.79647374",
"0.7927693",
"0.78521025",
"0.7772681",
"0.7671922",
"0.76132405",
"0.7521429",
"0.7510775",
"0.7413783",
"0.7411721",
"0.7398342",
"0.7357508",
"0.731046",
"0.731046",
"0.72614235",
"0.7229629",
"0.7158718",
"0.7158718",
"0.7143846",
"0.7133976",
"0.7118418",
"0.71153164",
"0.71054184",
"0.70824414",
"0.70803356",
"0.70803356",
"0.70803356",
"0.70803356",
"0.70803356",
"0.70803356",
"0.70732194",
"0.7069931",
"0.7055084",
"0.7055084",
"0.70187336",
"0.70187336",
"0.7014288",
"0.70024824",
"0.6955148",
"0.69438875",
"0.6940562",
"0.6930002",
"0.6923655",
"0.69121504",
"0.68994445",
"0.68890744",
"0.6886916",
"0.6886916",
"0.6884815",
"0.68779963",
"0.687681",
"0.68516463",
"0.68501925",
"0.68501925",
"0.68501925",
"0.68501925",
"0.6846213",
"0.68321985",
"0.68321985",
"0.68249524",
"0.68181926",
"0.68166226",
"0.68152285",
"0.681264",
"0.6806797",
"0.67993265",
"0.6795155",
"0.6789845",
"0.6789206",
"0.6789206",
"0.6777518",
"0.67707926",
"0.677031",
"0.6768393",
"0.67668647",
"0.6765854",
"0.6763453",
"0.67621535",
"0.6757729",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325",
"0.67550325"
] | 0.0 | -1 |
Description:Samples A Bit from Bernoulli with Restriction of 20Bit Exponent | private static int bernoulli(long result, long fractionOfExponent, double[][] exponentialDistribution)
{
/* *
* Computes the Actual Bernoulli Parameter = exp (-t / f)
* Yields A Fraction of 2^62, to Keep Only 62 Bits of Precision in This Implementation
* */
double bernoulliParameter = 4611686018427387904.0;
for (long i = 0, j = fractionOfExponent; i < 3; i++, j >>= 5)
{
bernoulliParameter *= exponentialDistribution[(int)i][(int)(j & 31)];
}
/* Sample from Bernoulli of bernoulliParameter */
return (int)(((result & 0x3FFFFFFFFFFFFFFFL) - Math.round(bernoulliParameter)) >>> 63);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double sample();",
"public BernoulliDistribution(){\n\t\tthis(0.5);\n\t}",
"public void randomiseBinary()\r\n\t{\r\n\t\tfor (int i = 0; i < binary.length; i++)\r\n\t\t\tbinary[i] = Math.random() >= 0.5;\r\n\t}",
"public BernoulliDistribution(double p){\n\t\tsuper(1, p);\n\t}",
"@Test\n public void testZeroB() {\n assertEquals(1, PiGenerator.powerMod(5, 0, 42));\n }",
"@Test\n public void testProbInputBinaryData() throws Exception {\n /* Test with valid value */\n int[] result = NoiseGenerator.randomBinaryData(5,0.5);\n Assert.assertFalse(result == null);\n\n /* Test with invalid value */\n result = NoiseGenerator.randomBinaryData(5,-0.1);\n Assert.assertTrue(result == null);\n\n }",
"public BernoulliBayesianEstimator()\n {\n // This is the uniform distribution.\n this( new BetaDistribution.PDF( 1.0, 1.0 ) );\n }",
"public abstract double sample();",
"public static double megaBitsToBits(double num) { return (num*Math.exp(6)); }",
"int nextSample(final double mean);",
"@Test(timeout = 4000)\n public void test001() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedTruePositiveRate();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }",
"int next(int bits);",
"private double genMultiplier() {\n return (random.nextInt(81) + 60)/100.0;\n }",
"@Test\n @Tag(\"bm1000\")\n public void testBANDM() {\n CuteNetlibCase.doTest(\"BANDM.SIF\", \"-158.6280184501187\", null, NumberContext.of(7, 4));\n }",
"public Data(int n, double p) {\n try {\n if (n <= 0) throw new Exception(\"Specified size for random Data object is zero or even negative\");\n if (p < 0.0 || p > 1.0)\n throw new Exception(\"Specified probability of 1 bits in random Data object should be contained in [0,1]\");\n\n Random r = new Random();\n this.data = new ArrayList<Byte>(n);\n for (int i = 0; i < n; i++) {\n int bi = 0;\n for (int j = 0; j < 8; j++) {\n if (r.nextDouble() < p) bi = bi + 1;\n bi = bi << 1;\n }\n byte b = (byte) bi;\n this.data.add(b);\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }",
"private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}",
"int nextBits(int bits);",
"public static double gigaBitsToBits(double num) { return (num*Math.exp(9)); }",
"public double[] randomBreitWigner(double a, double gamma, int n){\r\n double[] r = DatanRandom.ecuy(n);\r\n for(int i = 0; i < n; i++){\r\n r[i] = a + 0.5 * gamma * Math.tan(Math.PI * (r[i] - 0.5));\r\n }\r\n return r;\r\n }",
"public PowerGenerator(double aFactor)\n {\n this.aFactor= aFactor;\n }",
"double sample()\n\t{\n\t\treturn rb.peek();\n\t}",
"public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}",
"static BigInteger randomBigInteger(int numBits) {\n while (true) {\n if (RANDOM_SOURCE.nextBoolean()) {\n return randomNonNegativeBigInteger(numBits);\n }\n BigInteger neg = randomNonNegativeBigInteger(numBits).negate();\n if (neg.signum() != 0) {\n return neg;\n }\n }\n }",
"float genChance();",
"public static RuntimeValue bernoulli(RuntimeValue p) throws RuntimeException {\n if (isDiscreteFloatSample(p) && hasSingleValue(p.getDiscreteFloatSample())) {\n return new RuntimeValue(\n RuntimeValue.Type.DISTRIBUTION,\n new BernoulliDistribution(p.getDiscreteFloatSample().single())\n );\n }\n\n throw new RuntimeException(\"Unable to create Bernoulli distribution\");\n }",
"public static byte[] genIndividuo(int nB){\n byte nInd[] = new byte[nB];\n Random r = new Random();\n float aux;\n for(int i=0;i<nB;i++){\n aux = r.nextFloat();\n if(aux < 0.5)\n nInd[i] = 0;\n else\n nInd[i] = 1;\n }\n return nInd;\n }",
"@Test\n public void testLargeB() {\n assertEquals(12, PiGenerator.powerMod(2, 42, 13));\n }",
"public void generateB(){\n\t\t\tfor(int i = 0;i < w.length;i++){\n\t\t\t\tb[i] = w[i].multiply(r).mod(q);\n\t\t\t}\n\t}",
"@Test\n public void testPropEdgeCaseBinaryData() throws Exception {\n /* Test with value greater than p = 1.0 */\n int[] result = NoiseGenerator.randomBinaryData(10,1.10);\n Assert.assertTrue(result == null);\n }",
"@Test\n public void testSizeRandomBinaryData() throws Exception {\n /* Test with valid value */\n int[] result = NoiseGenerator.randomBinaryData(5,0.50);\n Assert.assertFalse(result == null);\n\n /* Test with invalid value */\n result = NoiseGenerator.randomBinaryData(-1,0.50);\n Assert.assertTrue(result == null);\n }",
"@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }",
"public abstract double getGen(int i);",
"@Test\n\tpublic void testProductWithLotsOfSamplesV2() {\n\t\trunBoundedTest(10000, true, \"product({{(on f in Boolean -> 999999997..999999999) f(true) + f(false) : true }})\", \"(999999997+999999997)^9\", \"(999999999+999999999)^9\");\n\t}",
"AdaptiveProbMap(int n, int rate) \n {\n this.rate = rate;\n this.data = new int[n*33];\n\n for (int i=0, k=0; i<n; i++, k+=33)\n {\n for (int j=0; j<33; j++)\n this.data[k+j] = (i == 0) ? Global.squash((j-16)<<7) << 4 : this.data[j];\n }\n }",
"private static int createSelectedKey(int bBit) {\r\n\t\tRandom random = new Random();\r\n\t\tint maxKey = (int) Math.pow(2, bBit);\r\n\t\tint randomKey = random.nextInt((maxKey - 1) + 1) + 1;\t\r\n\t\treturn randomKey;\r\n\t}",
"@Test\n public void encodeAsBitSet()\n {\n int value = 6;\n final BinaryEncoder encoder = new BinaryEncoder(16);\n\n BitSet result = encoder.encodeAsBitSet(value);\n\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n assertFalse(result.get(0));\n assertTrue(result.get(1));\n assertTrue(result.get(2));\n assertFalse(result.get(3));\n\n value = 20; // > 16 outside range\n result = encoder.encodeAsBitSet(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n // 0100 Best fit into 4 digits; ignores higher bits.\n assertFalse(result.get(0));\n assertFalse(result.get(1));\n assertTrue(result.get(2));\n assertFalse(result.get(3));\n }",
"public double getNextRawSample();",
"public WeibullGen (RandomStream s, double alpha) {\n this (s, alpha, 1.0, 0.0);\n }",
"@Test\n public void testP() {\n System.out.println(\"p\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0.027, instance.p(0), 1E-7);\n assertEquals(0.0567, instance.p(1), 1E-7);\n assertEquals(0.07938, instance.p(2), 1E-7);\n assertEquals(0.09261, instance.p(3), 1E-7);\n assertEquals(0.05033709, instance.p(10), 1E-7);\n }",
"@Test\n public void testZeroA() {\n assertEquals(0, PiGenerator.powerMod(0, 5, 42));\n }",
"public void sample() {\n getFunctionEstimator().sample();\n }",
"public static double genExp(double a) {\r\n\t\tdouble x = 1 - generator.nextDouble();\r\n\t\tdouble exp = -1 * Math.log(x) * a;\r\n\t\treturn exp;\r\n\r\n\t}",
"static BigInteger randomNonNegativeBigInteger(int numBits) {\n int digits = RANDOM_SOURCE.nextInt(numBits);\n if (digits == 0) {\n return new BigInteger(1, RANDOM_SOURCE);\n } else {\n return new BigInteger(digits, RANDOM_SOURCE).setBit(digits);\n }\n }",
"private boolean learning()\r\n\t{\r\n\t\tint temp = (int) (Math.random() * 100);\t\t//generate a random int between 0-100\r\n\t\tif(temp<=intelligence)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"Boolean getRandomize();",
"private static void test1() {\n\n\tint n=10000;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint val=rand7();\n\t\t\tcount[val]++;\n\t\t}\n\t\t\n\t\tfor(int i:count)\n\t\t\tSystem.out.println(i);\n\t}",
"public static double megaBytesToBits(double num) { return (num*8*Math.exp(6)); }",
"public BernoulliBayesianEstimator(\n BetaDistribution prior )\n {\n this( new BernoulliDistribution(), prior );\n }",
"@Test(timeout = 4000)\n public void test007() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setNumericPriorsFromBuffer();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }",
"public float gaussianRandom() {\n\t\treturn (CCMath.constrain((float)nextGaussian() / 4,-1 ,1 ) + 1) / 2;\n\t}",
"public BloomFilter(int n){\n\t\tflags = new boolean[4*n]; // initialize the boolean array by the size of 4n\n\t\tfor(int i=0; i<flags.length; i++){\n\t\t\tflags[i]=false; // initializing the fields with false value\n\t\t}\n\t\ta = (int) (Math.random()*100); // 1-100\n\t\tb = (int) (Math.random()*100);// 1-100\n\t}",
"public void setAverageBits(int bits) {\n }",
"static BigInteger randomNonZeroBigInteger(int numBits) {\n BigInteger result = randomPositiveBigInteger(numBits);\n return RANDOM_SOURCE.nextBoolean() ? result : result.negate();\n }",
"@Test\n @Tag(\"bm1000\")\n public void testSC50B() {\n CuteNetlibCase.doTest(\"SC50B.SIF\", \"-7.0000000000E+01\", \"0.0\", NumberContext.of(7, 4));\n }",
"@Test\n\tpublic void testProductWithLotsOfSamplesV1() {\n\t\trunBoundedTest(10000, true, \"product({{(on f in Boolean -> 1..3) f(true) + f(false) : true }})\", \"512\", \"10077696\");\n\t}",
"public static double teraBytesToBits(double num) { return (num*8*Math.exp(12)); }",
"public double sample_value() {\n checkHasParams();\n return -Math.log(Util.random()) / this.lambda;\n }",
"void runUsingEncoder(double xTarget, double yTarget, double inputPower);",
"public static void sample() {\n\t\tlcd.clear();\n\t\tint counter =0;\n\t\t//run 100 samples\n\t\twhile(counter<100) {\n\t\t\tmyColorSample.fetchSample(sampleColor, 0); \n\t\t\tfloat r = sampleColor[0]*1000; \n\t\t\tfloat g = sampleColor[1]*1000; \n\t\t\tfloat b = sampleColor[2]*1000; \n\t\t\tSystem.out.print(r +\",\");\n\t\t\tSystem.out.print(g+\",\");\n\t\t\tSystem.out.println(b);\n\t\t\tcounter ++;\n\t\t}\t\t\n\t}",
"public void generateR(){\n\t\t\tdo{\n\t\t\t\tr = new BigInteger(80, new Random());\n\t\t\t}while(!(q.gcd(r).equals(BigInteger.ONE)&&r.compareTo(q)<0&&r.compareTo(BigInteger.ONE)>=0));\n\t}",
"@Test\n @Tag(\"bm1000\")\n public void testKB2() {\n CuteNetlibCase.doTest(\"KB2.SIF\", \"-1.74990012991E+03\", \"0.0\", NumberContext.of(7, 4));\n }",
"private Binomial(int n) {\n N = n;\n }",
"protected BernoulliBayesianEstimator(\n BayesianParameter<Double,BernoulliDistribution,BetaDistribution> parameter )\n {\n super( parameter );\n }",
"@Test\n\tpublic void testProductWithLotsOfSamplesV5() {\n\t\trunBoundedTest(10000, true, \"product({{(on f in Boolean -> 1..100) f(true) + f(false) : true }})\", \"(1+1)^10000\", \"(100+100)^10000\");\n\t}",
"@Test\n @Tag(\"bm1000\")\n public void testCAPRI() {\n CuteNetlibCase.doTest(\"CAPRI.SIF\", \"2690.0129137681624\", null, NumberContext.of(7, 4));\n }",
"public XorShiftRandom() {\n\t\tthis(System.nanoTime());\n\t}",
"@Test\n public void testNegativeB() {\n assertEquals(-1, PiGenerator.powerMod(2, -1, 23));\n }",
"BigInteger getPower_consumption();",
"@Test\n @Tag(\"bm1000\")\n public void testSC50A() {\n CuteNetlibCase.doTest(\"SC50A.SIF\", \"-64.57507705856449\", \"0.0\", NumberContext.of(7, 4));\n }",
"public static void main(String[] args) {\n\r\n\t\tRandom rr=new Random();\r\n\t\t\r\n\t\tSystem.out.println(Math.random());//[0,1)\r\n\t\t \r\n\t\t// 第一种情况 int(强转之后最终的值一定是0)\r\n\t\t// 第二种情况 int(强转之后将小数点舍去 1-5)\r\n\t\tSystem.out.println((int)Math.random()*5);//0.99*5永远到不了5\r\n\t\tSystem.out.println((int)(Math.random()*5+1));//[1,5.)\r\n\t\t\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\t\r\n\t\tfor(int i=0;i<=20;i++){\r\n\t\t\tSystem.out.print(i%7+\"-\");\r\n\t\t\t\r\n\t\t}\r\n\t\t//1-M的随机产生\r\n\t\t//(int)(Math.random()*M+1)\r\n\t\t\r\n\t\t\r\n\t\t//产生0 1的概率不同 Math.random()<p?0:1\r\n\t\tSystem.out.println(\"----\"+rr.rand01p());\r\n\t\tSystem.out.println(\"----\"+rr.rand01());\r\n\t\tfor(int i=0;i<=11;i++){\r\n\t\t\tSystem.out.print(i%6+\"-\");\r\n\t\t \t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(rr.rand106());\r\n\t}",
"@Test\n @Tag(\"bm1000\")\n public void testBOEING1() {\n CuteNetlibCase.doTest(\"BOEING1.SIF\", \"-335.2135675071266\", \"286.9746573387996\", NumberContext.of(7, 4));\n }",
"public void initEncoderTxData()\n\t{\n\t\tfor(counter_i=0;counter_i<sampleBit;counter_i++)\n\t\t{\n\t\t\thighLevel[counter_i] = (short) (audioAM * (-Math.sin(Math.PI * counter_i /sampleBit * 2)));\n\t\t\tlowLevel[counter_i] = (short) (audioAM * (Math.sin(Math.PI * counter_i /sampleBit * 2)));\n\t\t}\n\t}",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"@Test\n public void testMean() {\n System.out.println(\"mean\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(7, instance.mean(), 1E-7);\n }",
"public static byte[] getGenotipo(int f,int nB){\n byte g[] = new byte[nB];\n int aux,nf = f;\n int cont = 0;\n for(int i =nB-1; i>=0;i--){\n aux = (int) Math.pow(2, i);\n if(nf >= aux){\n nf = nf - aux;\n g[cont] = 1;\n }\n else\n g[cont] = 0;\n cont ++;\n }\n return g;\n }",
"public static void main(String[] args){\n int s = 80;\n int n = (int) Math.pow(10, 7);\n Integer[] a = new Integer[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++){\n a[i] = (int) (n*rand.nextDouble());\n }\n double binTime = binSearchT(s, a);\n double linTime = linSearchT(s, a);\n System.out.println(\"binTime: \"+ binTime);\n System.out.println(\"linTime: \"+ linTime);\n\n }",
"@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 testGROW22() {\n CuteNetlibCase.doTest(\"GROW22.SIF\", \"-1.608343364825636E8\", \"0.0\", NumberContext.of(7, 4));\n }",
"public static double sample(double a, double b, Random random) {\n assert (b > 0.0);\n return a - b * Math.log(random.nextDouble());\n }",
"public int\n setBitRate(int bitRate);",
"static BigInteger randomPositiveBigInteger(int numBits) {\n BigInteger result;\n do {\n result = randomNonNegativeBigInteger(numBits);\n } while (result.signum() == 0);\n return result;\n }",
"public static boolean bernoulli(double[] parameters) {\r\n double p ;\r\n p = parameters[0];\r\n return uniform() < p;\r\n }",
"@Test\n @Tag(\"bm1000\")\n public void testBOEING2() {\n CuteNetlibCase.doTest(\"BOEING2.SIF\", \"-3.1501872802E+02\", \"-73.36896910872208\", NumberContext.of(7, 4));\n }",
"public static double petaBitsToBits(double num) { return gigaBitsToBits(petaBitsToGigaBits(num)); }",
"public static void singleRunTest(){ \t\n BlueRand random = new BlueRand(\"sample/input/a.jpg\", \"sample/input/b.jpg\");\n random.setOutputFile(\"sample/output/singleRun_ab.txt\");\n random.setOutputImage(\"sample/output/singleRun_ab.bmp\");\n random.considerTwoLSB(false);\n try {\n\t ArrayList<Byte> output = random.generateRandom();\n\t System.out.println(\"Single run finished. Bytes generated: \" + output.size());\n } catch(BlueRandException e){\n \te.printStackTrace();\n }\n }",
"public io.envoyproxy.envoy.type.v3.FractionalPercent.Builder getRandomSamplingBuilder() {\n \n onChanged();\n return getRandomSamplingFieldBuilder().getBuilder();\n }",
"static double randomDouble(int maxExponent) {\n double result = RANDOM_SOURCE.nextDouble();\n result = Math.scalb(result, RANDOM_SOURCE.nextInt(maxExponent + 1));\n return RANDOM_SOURCE.nextBoolean() ? result : -result;\n }",
"@Test(timeout = 4000)\n public void test024() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }",
"@Test\n public void testQuantile() {\n System.out.println(\"quantile\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0, instance.quantile(0), 1E-7);\n assertEquals(0, instance.quantile(0.001), 1E-7);\n assertEquals(0, instance.quantile(0.01), 1E-7);\n assertEquals(2, instance.quantile(0.1), 1E-7);\n assertEquals(3, instance.quantile(0.2), 1E-7);\n assertEquals(13, instance.quantile(0.9), 1E-7);\n assertEquals(22, instance.quantile(0.99), 1E-7);\n assertEquals(30, instance.quantile(0.999), 1E-7);\n }",
"@Test\n public void testLogP() {\n System.out.println(\"logP\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(Math.log(0.027), instance.logp(0), 1E-7);\n assertEquals(Math.log(0.0567), instance.logp(1), 1E-7);\n assertEquals(Math.log(0.07938), instance.logp(2), 1E-7);\n assertEquals(Math.log(0.09261), instance.logp(3), 1E-7);\n assertEquals(Math.log(0.05033709), instance.logp(10), 1E-7);\n }",
"public Builder setSamplingProbability(double value) {\n \n samplingProbability_ = value;\n onChanged();\n return this;\n }",
"@Test\n @Tag(\"bm1000\")\n public void testBRANDY() {\n CuteNetlibCase.doTest(\"BRANDY.SIF\", \"1518.509896488128\", null, NumberContext.of(7, 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 }",
"public Rng() {\n\t\tr = new Random();\n\t}",
"@Test\n public void testBloomfilter() {\n Random rnd = new Random(0);\n final int filterSize = 100;\n final int expected = 1000;\n SimpleBloomFilter<Number160> bloomFilter = new SimpleBloomFilter<Number160>(filterSize, expected);\n for (int i = 0; i < expected; i++) {\n bloomFilter.add(new Number160(rnd));\n }\n bloomFilter.add(Number160.MAX_VALUE);\n\n // convert and back\n ByteBuf buf = Unpooled.buffer(filterSize + SimpleBloomFilter.SIZE_HEADER);\n bloomFilter.encode(buf); \n SimpleBloomFilter<Number160> bloomFilter2 = new SimpleBloomFilter<Number160>(buf);\n Assert.assertEquals(true, bloomFilter2.contains(Number160.MAX_VALUE));\n Assert.assertEquals(false, bloomFilter2.contains(Number160.ONE));\n Assert.assertEquals(bloomFilter, bloomFilter2);\n }",
"@Test(timeout = 4000)\n public void test122() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"Y#:')*#rI\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numInstances();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }",
"@Test\n public void testLargeA() {\n assertEquals(18, PiGenerator.powerMod(123456, 2, 23));\n }",
"public static void test2() {\n\n LargerRandomNumberBigDecimal value = new LargerRandomNumberBigDecimal();\n\n for (int i = 0; i < 50; i++) {\n\n System.out.println(\"value = \" + value.getNextLargerRand());\n }\n }",
"public void SetLearnRate (double alpha) { this.alpha = alpha; }",
"C5537g mo4096b(int i);"
] | [
"0.6040454",
"0.5915275",
"0.57593286",
"0.56670713",
"0.56547123",
"0.5547262",
"0.5543663",
"0.551752",
"0.54150623",
"0.5382826",
"0.53419113",
"0.52654886",
"0.5246545",
"0.52244407",
"0.52217656",
"0.5221326",
"0.5221183",
"0.52032995",
"0.51869595",
"0.5161789",
"0.5149807",
"0.51337177",
"0.51185673",
"0.5114037",
"0.5099027",
"0.50720125",
"0.5065681",
"0.5059514",
"0.5056808",
"0.50560117",
"0.5052021",
"0.5035075",
"0.5029611",
"0.5028818",
"0.5024678",
"0.502088",
"0.5011752",
"0.50067604",
"0.50006044",
"0.49973562",
"0.4989817",
"0.4987684",
"0.4977755",
"0.49753332",
"0.49685618",
"0.49662393",
"0.4965029",
"0.49603626",
"0.4958224",
"0.4944373",
"0.49429765",
"0.49408957",
"0.49396655",
"0.49339947",
"0.49323028",
"0.49291208",
"0.49224648",
"0.4919658",
"0.49188527",
"0.49150732",
"0.49142608",
"0.4910056",
"0.48813882",
"0.48805314",
"0.48723248",
"0.48721996",
"0.48698002",
"0.48663667",
"0.4864895",
"0.48584086",
"0.48563173",
"0.48495722",
"0.48473454",
"0.48469865",
"0.48345825",
"0.48338687",
"0.4823416",
"0.48209175",
"0.48119605",
"0.48086315",
"0.4806237",
"0.48009333",
"0.47993723",
"0.4795596",
"0.47950006",
"0.47945744",
"0.47941107",
"0.47816017",
"0.47783265",
"0.4774809",
"0.47732118",
"0.47684464",
"0.47677657",
"0.47637552",
"0.47577104",
"0.4755994",
"0.47470278",
"0.47412473",
"0.47396103",
"0.4737205"
] | 0.681178 | 0 |
compiles a single java source file, and resolve references | public Header [] compilationUnit(Header [] loaded, final int depth)
{
try
{
this.depth = depth;
String trunc = sources.getPath();
list = loaded == null?new Header[0]:loaded;
countToken = 0;
Find.notePass(null);
lookAhead();
// read package name
String myPackage = null;
if (nextSymbol == Keyword.PACKAGESY)
{
lookAhead();
myPackage = qualident();
matchKeyword(Keyword.SEMICOLONSY);
}
Header header = new Header(new File(Parser.jdkSource).getPath(), trunc, myPackage, depth);
Vector imported = new Vector();
imported.add("java.lang.");
// read import statements
while (nextSymbol == Keyword.IMPORTSY)
imported.add(importDeclaration());
header.imports = new String[imported.size()];
for(int l = 0; l < imported.size(); l++)
header.imports[l] = (String)imported.get(l);
trunc = trunc.substring(0, sources.getPath().lastIndexOf(".java"));
String basename = trunc.substring(trunc.lastIndexOf('\\') + 1);
scopeStack = header.scopes;
while(nextSymbol != Keyword.EOFSY)
typeDeclaration(header.base, basename);
matchKeyword(Keyword.EOFSY);
if (Errors.count() != 0)
return null;
// write valid header
header.write(trunc + ".h");
// append compiled file to list
Header [] newList = new Header[(list != null?list.length:0) + 1];
for(int i = 0; i < newList.length - 1; i++)
newList[i] = list[i];
newList[newList.length - 1] = header;
list = newList;
connectClasses(list);
// resolve superclasses and interfaces
for(int i = 0; i < header.scopes.size() && list != null; i++)
{
Vector v = new Vector();
Scope scope = (Scope)header.scopes.get(i);
for(Iterator iter = scope.iterator(); iter.hasNext();)
{
Basic b = (Basic)iter.next();
if (b instanceof ClassType)
v = getExtendImplement((ClassType)b);
}
while(v.size() > 0 && list != null)
{
connectClasses(list);
list = loadSource((String)v.get(0), list, header, force);
v.remove(0);
}
}
if (Errors.count() != 0 || header.depth > 0 || list == null)
return list;
// process imports
for(int i = 0; i < imported.size() && list != null; i++)
{
String st = (String)imported.get(i);
if (!st.endsWith("."))
{
connectClasses(list);
list = loadSource(st.substring(st.lastIndexOf('.') + 1), list, header, force);
}
}
if (Errors.count() != 0 || header.depth > 0 || list == null)
return list;
connectClasses(list);
// process unresolved references
for(int i = 0; i < header.scopes.size() && list != null; i++)
{
Scope scope = (Scope)header.scopes.get(i);
Iterator step = scope.iterator();
while(step.hasNext() && list != null)
{
Basic x = (Basic)step.next();
if (x instanceof ClassType)
{
boolean inner = false;
ClassType y = (ClassType)x;
while(y.unresolved.size() > 0 && list != null)
{
Iterator it = y.unresolved.iterator();
if (!it.hasNext())
break;
String name = (String)it.next();
it = null;
y.unresolved.remove(name);
String [] s = name.split("\\.");
Scope [] z = null;
z = Find.find(s[0], scope, true);
if (z.length == 0)
{
list = loadSource(s[0], list, header, force);
connectClasses(list);
}
try {
if (s.length > 1)
{
ClassType [] classes = null;
classes = Find.findClass(s[0], 0, scope);
if (classes.length == 0)
{
classes = new ClassType[1];
classes[0] = y;
}
for(int k = 1; k < s.length && classes.length > 0; k++)
{
Basic[] b = classes[0].scope.get(s[k]);
for (int j = 0; j < b.length; j++)
if (b[j] instanceof VariableType)
{
VariableType v = (VariableType) b[j];
if (v.type.type == Keyword.NONESY)
{
classes = Find.findClass(v.type.ident.string, 0, scope);
if (classes.length == 0)
{
y.unresolved.add(v.type.ident.string);
//y.unresolved.add(name);
}
}
else
classes = new ClassType[0];
break;
}
else if (b[j] instanceof MethodType)
{
MethodType v = (MethodType) b[j];
if (v.type.type == Keyword.NONESY)
{
classes = Find.findClass(v.type.ident.string, 0, scope);
if (classes.length == 0)
{
y.unresolved.add(v.type.ident.string);
//y.unresolved.add(name);
}
}
else
classes = new ClassType[0];
break;
}
else if (b[j] instanceof ClassType)
{
classes = new ClassType[1];
classes[0] = (ClassType) b[j];
break;
}
}
}
} catch(Exception ee){error("nullpointer " + s[0] + '.' + s[1]);}
}
}
}
}
if (depth > 0)
return list;
if (Errors.count() != 0 || list == null)
return null;
connectClasses(list);
Find.notePass(this);
// resolve operator tree to Forth-code
FileOutputStream file = null, starter = null;
try
{
file = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + ".fs");
starter = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + ".start.fs");
System.out.println("translate " + header.name);
for(int k = 0; k < header.scopes.size(); k++)
{
Scope scope = (Scope)header.scopes.get(k);
boolean module = (k == 0);
for(Iterator iter = scope.iterator(); iter.hasNext();)
{
Basic b = (Basic)iter.next();
if (b instanceof ClassType && (b.modify & Keyword.INTERFACESY.value) == 0)
{
if (gc.startsWith("m"))
CodeRCmodified.codeClass( (ClassType) b, file, starter, module);
else
Code3color.codeClass( (ClassType) b, file, starter, module);
module = false;
}
}
}
file.close();
starter.close();
}
catch(IOException ex1) { ex1.printStackTrace(); }
Find.notePass(this);
}
catch(Exception failed)
{ error(failed.getMessage() + " aborted"); }
return (Errors.count() != 0)?null:list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void compileToJava();",
"private static void compileFile(String path) throws IOException {\n File f = new File(path);\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n File[] files = {f};\n Iterable<? extends JavaFileObject> compilationUnits =\n fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files));\n compiler.getTask(null, fileManager, null, null, null, compilationUnits).call();\n fileManager.close();\n }",
"private void compileJavaFiles(File binDir, File javaFile) throws Exception {\n\t\tPathAssert.assertFileExists(\"Java Source\", javaFile);\n\t\tJavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n\t\tLinkedList<File> classpath = ClassPathUtil.getClassPath();\n\t\tclasspath.add(0, binDir);\n\t\tStringBuilder cp = new StringBuilder();\n\t\tClassPathUtil.appendClasspath(cp, classpath);\n\t\tif (compiler.run(null, System.out, System.err, \"-cp\", cp.toString(), javaFile.getAbsolutePath()) != 0) {\n\t\t\tthrow new Exception(\"Exception while compiling file\");\n\t\t}\n\t}",
"final void compileTargetFile(ResolveFile file) {\n try {\n // Use ANTLR4 to build the AST\n ModuleDec targetModule = createModuleAST(file);\n\n // Add this file to our compile environment\n myCompileEnvironment.constructRecord(file, targetModule);\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_DEBUG)) {\n myStatusHandler.info(null, \"Begin Compiling: \" + targetModule.getName().getName());\n }\n\n // Create a dependencies graph and search for import\n // dependencies.\n DefaultDirectedGraph<ModuleIdentifier, DefaultEdge> g = new DefaultDirectedGraph<>(DefaultEdge.class);\n g.addVertex(new ModuleIdentifier(targetModule));\n findDependencies(g, targetModule, file.getParentPath());\n\n // Perform different compilation tasks to each file\n for (ModuleIdentifier m : getCompileOrder(g)) {\n // Print the entire ModuleDec\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_PRINT_MODULE)\n && m.equals(new ModuleIdentifier(targetModule))) {\n RawASTOutputPipeline rawASTOutputPipe = new RawASTOutputPipeline(myCompileEnvironment,\n mySymbolTable);\n rawASTOutputPipe.process(m);\n }\n\n // Output AST to Graphviz dot file. (Only for argument files)\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_EXPORT_AST)\n && m.equals(new ModuleIdentifier(targetModule))) {\n GraphicalASTOutputPipeline astOutputPipe = new GraphicalASTOutputPipeline(myCompileEnvironment,\n mySymbolTable);\n astOutputPipe.process(m);\n }\n\n // Type and populate symbol table\n AnalysisPipeline analysisPipe = new AnalysisPipeline(myCompileEnvironment, mySymbolTable);\n analysisPipe.process(m);\n\n // Translate source file to target file\n if (myCompileEnvironment.flags.isFlagSet(AbstractTranslator.FLAG_TRANSLATE)\n && m.equals(new ModuleIdentifier(targetModule))) {\n TranslatorPipeline translatorPipeline = new TranslatorPipeline(myCompileEnvironment, mySymbolTable);\n translatorPipeline.process(m);\n }\n\n // Generate VCs\n if (myCompileEnvironment.flags.isFlagSet(VCGenerator.FLAG_VERIFY_VC)\n && m.equals(new ModuleIdentifier(targetModule))) {\n VCGenPipeline vcGenPipeline = new VCGenPipeline(myCompileEnvironment, mySymbolTable);\n vcGenPipeline.process(m);\n List<VerificationCondition> vcs = vcGenPipeline.getVerificationConditions();\n\n // Invoke Automated Prover (if requested)\n if (myCompileEnvironment.flags.isFlagSet(CongruenceClassProver.FLAG_PROVE)\n && m.equals(new ModuleIdentifier(targetModule))) {\n ProverPipeline proverPipeline = new ProverPipeline(myCompileEnvironment, mySymbolTable);\n proverPipeline.process(m);\n }\n\n // Invoke nProver (if requested)\n if (myCompileEnvironment.flags.isFlagSet(GeneralPurposeProver.FLAG_PROVE)\n && m.equals(new ModuleIdentifier(targetModule))) {\n NProverPipeline nproverPipeline = new NProverPipeline(myCompileEnvironment, mySymbolTable, vcs);\n nproverPipeline.process(m);\n }\n }\n\n // Complete compilation for this module\n myCompileEnvironment.completeRecord(m);\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_DEBUG)) {\n myStatusHandler.info(null, \"Done Compiling: \" + m.toString());\n }\n }\n } catch (Throwable e) {\n Throwable cause = e;\n while (cause != null && !(cause instanceof CompilerException)) {\n cause = cause.getCause();\n }\n\n if (cause == null) {\n // All exceptions should extend the CompilerException class.\n if (e instanceof RuntimeException) {\n throw (RuntimeException) e;\n }\n throw new MiscErrorException(\"Unknown Exception\", e);\n } else {\n CompilerException see = (CompilerException) cause;\n myStatusHandler.error(see.getErrorLocation(), see.getMessage());\n if (myCompileEnvironment.flags.isFlagSet(ResolveCompiler.FLAG_DEBUG_STACK_TRACE)) {\n myStatusHandler.printStackTrace(see);\n }\n myStatusHandler.stopLogging();\n }\n }\n }",
"public abstract void compile();",
"private static int compile(String filename) throws Exception {\n\t\tInputStream inp = new BufferedInputStream(new FileInputStream(filename));\n\t\tParser parser = new Parser(inp);\n\t\tjava_cup.runtime.Symbol parseTree = null;\n\t\ttry {\n\t\t\tparseTree = parser.parse();\n\t\t} catch (Throwable e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new Error(e.toString());\n\t\t} finally {\n\t\t\tinp.close();\n\t\t}\n\t\t\n\t\tDecls tree = (Decls) parseTree.value;\n\t\t\n\t\tSemantic semant = new Semantic();\n\t\tsemant.checkProg(tree);\n\t\tif (semant.hasError()) {\n\t\t\tsemant.printErrors();\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t//System.out.println(\"Semant: OK\");\n\t\t\tLabel.fcount = 0;\n\t\t\t\n\t\t\tLabel topLabel = new Label(\"main\");\n\t\t\tLevel topLevel = new Level();\n\t\t\tTranslate translate = new Translate();\n\t\t\ttranslate.transProg(tree, topLabel, topLevel);\n\t\t\tList<CompileUnit> units = translate.getUnits();\n\t\t\t\n\t\t\t//=============================== Optimize =================================\n\t\t\tAnalyzer analyzer = new Analyzer();\n\t\t\tLabelEliminator le = new LabelEliminator();\n\t\t\t\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\t//System.out.println(u.getQuads().get(0));\n\t\t\t\tu.replaceBranches(analyzer);\n\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\tu.findLiveness(analyzer);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (CompileUnit u: units) {\n\t\t\t\tList<Quad> qs = u.getQuads();\n\t\t\t\tfor (Quad q: qs) {\n\t\t\t\t\tif (q instanceof MoveL)\n\t\t\t\t\t\t((MoveL)q).src.used = true;\n\t\t\t\t}\n\t\t\t\tGotoCompression.process(u);\n\t\t\t}\n\t\t\t\n\t\t\tLocalCopyPropagation lcp = new LocalCopyPropagation();\n\t\t\tDeadCodeEliminator dce = new DeadCodeEliminator();\n\t\t\tAvailableExpressionAnalyzer aea = new AvailableExpressionAnalyzer();\n\t\t\tCommonExpressionEliminator cse = new CommonExpressionEliminator();\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\tList<Quad> oldQuads = new LinkedList<Quad>();\n\t\t\t\t//int cnt = 0;\n\t\t\t\tdo {\n\t\t\t\t\toldQuads.clear();\n\t\t\t\t\toldQuads.addAll(u.getQuads());\n\t\t\t\t\t\n\t\t\t\t\tdo {\n\t\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\t\taea.analyze(u.getBasicBlocks());\n\t\t\t\t\t\t//System.out.println(++cnt);\n\t\t\t\t\t}\n\t\t\t\t\twhile (cse.eliminate(u));\n\n\t\t\t\t\tfor (BasicBlock bb : u.getBasicBlocks()) {\n\t\t\t\t\t\tlcp.process(bb);\n\t\t\t\t\t}\n\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\tdce.process(u);\n\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\twhile (le.eliminate(u));\n\t\t\t\t}\n\t\t\t\twhile (!u.getQuads().equals(oldQuads));\n\t\t\t}\n\t\t\t\n\t\t\t//========================================================================\n\t\t\tCodegen codegen = new Codegen();\n\t\t\tcodegen.gen(new Assem(\".data\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl args\"));\n\t\t\tcodegen.gen(new Assem(\"!args:\\t.space %\", (Translate.maxArgc + 1) * 4));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tfor (DataFrag df: translate.getDataFrags())\n\t\t\t\tif (df.label.used)\n\t\t\t\t\tcodegen.gen(df.gen());\n\t\t\t\n\t\t\tcodegen.gen(new Assem(\".text\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl main\"));\n\t\t\t\n\t\t\tfor (CompileUnit u: units)\n\t\t\t\tcodegen.gen(u, new LinearScan(u, analyzer));/**/\n\n\t\t\t//System.out.println((System.nanoTime() - start) / 1000000 + \" ms\");\n\t\t\t//PrintStream out = System.out;\n\t\t\tPrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(\"assem.s\")));\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############### CODE GEN ###############\");\n\t\t\tout.println(\"########################################\");\n\t\t\tcodegen.flush(out);\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############# RUNTIME CODE #############\");\n\t\t\tout.println(\"########################################\");\n\t\t\t//Scanner scanner = new Scanner(new FileInputStream(new File(\"runtime.s\")));\n\t\t\t//while (scanner.hasNextLine()) {\n\t\t\t//\tout.println(scanner.nextLine());\n\t\t\t//}\n\t\t\t//scanner.close();\n\t\t\tout.close();\n\t\t\treturn 0;\n\t\t}\n\t}",
"public boolean compile(String name, String source) {\n\t return compile(source);\n\t}",
"protected void compile() throws FileNotFoundException, DebuggerCompilationException{\n String[] compileArgs = new String[5];\n String cOutFile = Integer.toString(handle);//filename + Integer.toString(handle);\n String outArg = cOutFile;\n compileArgs[0] = ocamlCompileC;\n compileArgs[1] = \"-g\";\n compileArgs[2] = filename;\n compileArgs[3] = \"-o\";\n compileArgs[4] = cOutFile;\n outFile = cOutFile;\n\n /* Start the ocamlc compiler */\n Process compileProcess;\n try{\n compileProcess = runtime.exec(compileArgs);\n }catch(IOException e){\n System.out.println(\"HERE\");\n throw new DebuggerCompilationException();\n //}catch(FileNotFoundException f){\n // throw new FileNotFoundException();\n }\n OutputStreamWriter compileWriter = new OutputStreamWriter(compileProcess.getOutputStream());\n\n InputStream processInputStream = compileProcess.getInputStream();\n\n /* Create a DebugListener to read the output */\n DebugListener compileReader = new DebugListener(processInputStream, this.observers, handle);\n\n compileReader.start();\n \n try{\n Thread.sleep(2000);\n }catch(Exception e){\n\n }\n\n }",
"private static void compileAndRun(String fileName, String code) {\n\n if(verboseCompiling) println(\"Deleting old temp files...\", warning);\n new File(fileName + \".java\").delete();\n new File(fileName + \".class\").delete();\n\n if(verboseCompiling) println(\"Creating source file...\", progErr);\n file = new File(fileName + \".java\");\n\n if(verboseCompiling) println(\"Writing code to source file...\", progErr);\n try {\n new FileWriter(file).append(code).close();\n } catch (IOException i) {\n println(\"Had an IO Exception when trying to write the code. Stack trace:\", error);\n i.printStackTrace();\n return; //Exit on error\n }\n\n if(verboseCompiling) println(\"Compiling code...\", progErr);\n //This should only ever be called if the JDK isn't installed. How you'd get here, I don't know.\n if (compiler == null) {\n println(\"Fatal Error: JDK not installed. Go to java.sun.com and install.\", error);\n return;\n }\n\n //Tries to compile. Success code is 0, so if something goes wrong, report.\n int result = -1;\n if (compileOptions.trim().equals(\"\"))\n result = compiler.run(null, out, err, file.getAbsolutePath());\n else\n //result = compiler.run(null, out, err, compileOptions, file.getAbsolutePath());\n result = compiler.run(null, out, err, \"-cp\", \"/Users/student/Desktop/bluecove-2.1.0.jar\", file.getAbsolutePath());\n //ArrayList<String> files = new ArrayList<>();\n //files.add(fileName);\n //boolean result = compiler.getTask(null, null, new ErrorReporter(), null, files, null).call();\n if (result != 0) {\n displayLog();\n //println(\"end record\", error); //End recording and pull out the message\n\n //println(\"Error type: \" + result,error);\n println(\"Failed to compile.\", warning);\n return; //Return on error\n }\n\n if(verboseCompiling) println(\"Attempting to run code...\", progErr);\n try {\n //Makes sure the JVM resets if it's already running.\n if(JVMrunning) \n kill();\n\n //Clears terminal window on main method call.\n if(clearOnMethod)\n outputText.setText(\"\");\n\n //Some String constants for java path and OS-specific separators.\n String separator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"java.home\")\n + separator + \"bin\" + separator + \"java\";\n\n //Creates a new process that executes the source file.\n ProcessBuilder builder = null;\n if(runOptions.trim().equals(\"\")) \n builder = new ProcessBuilder(path, fileName);\n else \n builder = new ProcessBuilder(path, runOptions, fileName);\n\n //Everything should be good now. Everything past this is on you. Don't mess it up.\n println(\"Build succeeded on \" + java.util.Calendar.getInstance().getTime().toString(), progErr);\n println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\", progErr); \n\n //Tries to run compiled code.\n JVM = builder.start();\n JVMrunning = true;\n\n //Links runtime out/err to our terminal window. No support for input yet.\n Reader errorReader = new InputStreamReader(JVM.getErrorStream());\n Reader outReader = new InputStreamReader(JVM.getInputStream());\n //Writer inReader = new OutputStreamWriter(JVM.getOutputStream());\n\n redirectErr = redirectIOStream(errorReader, err);\n redirectOut = redirectIOStream(outReader, out);\n //redirectIn = redirectIOStream(null, inReader);\n } catch (IOException e) {\n //JVM = builder.start() can throw this.\n println(\"IOException when running the JVM.\", progErr);\n e.printStackTrace();\n displayLog();\n return;\n }\n }",
"private static void test1() throws ParseException, IOException {\n\t\n\tFile classFile = new File(\"/home/sebastian/workspace3.7/yuigwt/java-tools/org/sgx/gwtjavatools/delegate/JYUIDelegateMethods.java\");\n\t\n// InputStream in = ParserTest.class.getClassLoader().getResourceAsStream(\"/java-tools/org/sgx/gwtjavatools/delegate/JYUIDelegateMethods.java\");//new FileInputStream(\"test.java\");\n\n\tFileInputStream in = new FileInputStream(classFile); \n\t\n CompilationUnit cu;\n try {\n // parse the file\n cu = JavaParser.parse(in);\n } finally {\n in.close();\n }\n\n // visit and print the methods names\n new MethodVisitor().visit(cu, null);\n\n // prints the resulting compilation unit to default system output\n// System.out.println(cu.toString());\n}",
"public void compile(MindFile f) {\n \t\t\n \t}",
"protected Object compileAndLoad() throws IOException {\n String generatedSource = printJCodeModel();\n return compileAndLoadSource(generatedSource, TEST_CLASS_NAME);\n }",
"public boolean compile(String source) {\n\t return compile(source, true);\n\t}",
"public Script tryCompile(Node node) {\n return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), false);\n }",
"public void run() throws Exception {\n\t\tJavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n\t\tStandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n\t\tPath tempFolder = Files.createTempDirectory(\"gwt-jackson-apt-tmp\", new FileAttribute[0]);\n\t\tfileManager.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(tempFolder.toFile()));\n\t\tfileManager.setLocation(StandardLocation.SOURCE_OUTPUT, Arrays.asList(tempFolder.toFile()));\n\t\tCompilationTask task = compiler.getTask(\n\t\t\t\tnew PrintWriter(System.out), \n\t\t\t\tfileManager, \n\t\t\t\tnull, \n\t\t\t\tnull, \n\t\t\t\tnull, \n\t\t\t\tfileManager.getJavaFileObjects(\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicTest.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicBaseInterface.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicBaseClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicChildClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicChildClass2.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/SecondPolymorphicBaseClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/SecondPolymorphicChildClass.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/SimpleGenericBeanObject.java\"),\n\t\t\t\t\t\tnew File(\"src/test/java/org/dominokit/jacksonapt/processor/PolymorphicGenericClass.java\")));\n\n\n\t\ttask.setProcessors(Arrays.asList(new ObjectMapperProcessor()));\n\t\ttask.call();\n\t}",
"public WorkResult execute() {\n source = new SimpleFileCollection(source.getFiles());\n classpath = new SimpleFileCollection(Lists.newArrayList(classpath));\n\n for (File file : source) {\n if (!file.getName().endsWith(\".java\")) {\n throw new InvalidUserDataException(String.format(\"Cannot compile non-Java source file '%s'.\", file));\n }\n }\n configure(compiler);\n return compiler.execute();\n }",
"public void compileScript( TemplateCompilerContext context )\r\n\t{\r\n\t\t// Compile to bytes\r\n\t\tCompilationUnit unit = new CompilationUnit();\r\n\t\tunit.addSource( context.getPath(), context.getScript().toString() );\r\n\t\tunit.compile( Phases.CLASS_GENERATION );\r\n\r\n\t\t// Results\r\n\t\t@SuppressWarnings( \"unchecked\" )\r\n\t\tList< GroovyClass > classes = unit.getClasses();\r\n\t\tAssert.isTrue( classes.size() > 0, \"Expecting 1 or more classes\" );\r\n\r\n\t\tClassLoader parent = Thread.currentThread().getContextClassLoader();\r\n\t\tif( parent == null )\r\n\t\t\tparent = GroovyTemplateCompiler.class.getClassLoader();\r\n\r\n\t\t// Define the class\r\n\t\t// TODO Configurable class loader\r\n\t\tDefiningClassLoader classLoader = new DefiningClassLoader( parent );\r\n\t\tClass< ? > first = null;\r\n\t\tfor( GroovyClass cls : classes )\r\n\t\t{\r\n\t\t\tClass< ? > clas = classLoader.defineClass( cls.getName(), cls.getBytes() );\r\n\t\t\tif( first == null )\r\n\t\t\t\tfirst = clas; // TODO Are we sure that the first one is always the right one?\r\n\t\t}\r\n\r\n\t\t// Instantiate the first\r\n\t\tGroovyObject object = (GroovyObject)Util.newInstance( first );\r\n\t\tClosure closure = (Closure)object.invokeMethod( \"getClosure\", null );\r\n\r\n\t\t// The old way:\r\n//\t\tClass< GroovyObject > groovyClass = new GroovyClassLoader().parseClass( new GroovyCodeSource( getSource(), getName(), \"x\" ) );\r\n\r\n\t\tcontext.setTemplate( new GroovyTemplate( closure ) );\r\n\t}",
"private JavaCompiler.CompilationTask getCompilationTask(File file)\n\t{\n\t\tDiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);\n\n Iterable<? extends JavaFileObject> compilationUnit\n = fileManager.getJavaFileObjectsFromFiles(Arrays.asList(file));\n return compiler.getTask(null, fileManager, diagnostics, null, null, compilationUnit);\n\t}",
"public void compile(String str) throws PaleoException {\n\t\trunProcess(\"javac paleo/\" + str + \".java\");\n\t\tif (erreur.length() != 0) {\n\t\t\tthrow new JavacException(erreur.toString());\n\t\t}\n\t}",
"private UnifiedAst precompile(PrecompilationContext precompilationContext)\n\t\t\tthrows UnableToCompleteException {\n\t\ttry {\n\t\t\t// (0) Assert preconditions\n\t\t\tif (precompilationContext.getEntryPoints().length\n\t\t\t\t\t+ precompilationContext\n\t\t\t\t\t\t\t.getAdditionalRootTypes().length == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"entry point(s) required\");\n\t\t\t}\n\t\t\tboolean singlePermutation = precompilationContext\n\t\t\t\t\t.getPermutations().length == 1;\n\t\t\tPrecompilationMetricsArtifact precompilationMetrics = precompilationContext\n\t\t\t\t\t.getPrecompilationMetricsArtifact();\n\t\t\t/*\n\t\t\t * Do not introduce any new pass here unless it is logically a part\n\t\t\t * of one of the 6 defined stages and is physically located in that\n\t\t\t * stage.\n\t\t\t */\n\t\t\t// (1) Initialize local state\n\t\t\tjprogram = new JProgram(compilerContext.getMinimalRebuildCache());\n\t\t\t// Synchronize JTypeOracle with compile optimization behavior.\n\t\t\tjprogram.typeOracle.setOptimize(options\n\t\t\t\t\t.getOptimizationLevel() > OptionOptimize.OPTIMIZE_LEVEL_DRAFT);\n\t\t\tjsProgram = new JsProgram();\n\t\t\t// (2) Construct and unify the unresolved Java AST\n\t\t\tCompilationState compilationState = constructJavaAst(\n\t\t\t\t\tprecompilationContext);\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tJsniRestrictionChecker.exec(logger, jprogram);\n\t\t\tJsInteropRestrictionChecker.exec(logger, jprogram,\n\t\t\t\t\tgetMinimalRebuildCache());\n\t\t\tlogTypeOracleMetrics(precompilationMetrics, compilationState);\n\t\t\tMemory.maybeDumpMemory(\"AstOnly\");\n\t\t\tAstDumper.maybeDumpAST(jprogram);\n\t\t\t// TODO(stalcup): is in wrong place, move to optimization stage\n\t\t\tConfigurationProperties configurationProperties = new ConfigurationProperties(\n\t\t\t\t\tmodule);\n\t\t\tEnumNameObfuscator.exec(jprogram, logger, configurationProperties,\n\t\t\t\t\toptions);\n\t\t\t// (3) Normalize the unresolved Java AST\n\t\t\t// Replace default methods by static implementations.\n\t\t\tDevirtualizeDefaultMethodForwarding.exec(jprogram);\n\t\t\t// Replace calls to native overrides of object methods.\n\t\t\tReplaceCallsToNativeJavaLangObjectOverrides.exec(jprogram);\n\t\t\tFixAssignmentsToUnboxOrCast.exec(jprogram);\n\t\t\tif (options.isEnableAssertions()) {\n\t\t\t\tAssertionNormalizer.exec(jprogram);\n\t\t\t} else {\n\t\t\t\tAssertionRemover.exec(jprogram);\n\t\t\t}\n\t\t\tif (module != null && options.isRunAsyncEnabled()) {\n\t\t\t\tReplaceRunAsyncs.exec(logger, jprogram);\n\t\t\t\tConfigurationProperties config = new ConfigurationProperties(\n\t\t\t\t\t\tmodule);\n\t\t\t\tCodeSplitters.pickInitialLoadSequence(logger, jprogram, config);\n\t\t\t}\n\t\t\tImplementClassLiteralsAsFields.exec(jprogram, shouldOptimize());\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tlogAstTypeMetrics(precompilationMetrics);\n\t\t\t// (4) Construct and return a value.\n\t\t\tEvent createUnifiedAstEvent = SpeedTracerLogger\n\t\t\t\t\t.start(CompilerEventType.CREATE_UNIFIED_AST);\n\t\t\tUnifiedAst result = new UnifiedAst(options,\n\t\t\t\t\tnew AST(jprogram, jsProgram), singlePermutation,\n\t\t\t\t\tRecordRebinds.exec(jprogram));\n\t\t\tcreateUnifiedAstEvent.end();\n\t\t\treturn result;\n\t\t} catch (Throwable e) {\n\t\t\tthrow CompilationProblemReporter.logAndTranslateException(logger,\n\t\t\t\t\te);\n\t\t}\n\t}",
"private boolean doCompile(String sourceName, String destName,\n PrintStream out, PrintStream err)\n throws DecacFatalError, LocationException {\n AbstractProgram prog = doLexingAndParsing(sourceName, err);\n\n if (prog == null) {\n LOG.info(\"Parsing failed\");\n return true;\n }\n assert(prog.checkAllLocations());\n if (compilerOptions.getParseOnly()) {\n prog.decompile(System.out);\n return false;\n }\n\n\n prog.verifyProgram(this);\n assert(prog.checkAllDecorations());\n\n if (compilerOptions.getVerificationOnly()) {\n return false;\n }\n\n addComment(\"start main program\");\n prog.codeGenProgram(this);\n addComment(\"end main program\");\n LOG.debug(\"Generated assembly code:\" + nl + program.display());\n LOG.info(\"Output file assembly file is: \" + destName);\n\n FileOutputStream fstream = null;\n try {\n fstream = new FileOutputStream(destName);\n } catch (FileNotFoundException e) {\n throw new DecacFatalError(\"Failed to open output file: \" + e.getLocalizedMessage());\n }\n\n LOG.info(\"Writing assembler file ...\");\n\n program.display(new PrintStream(fstream));\n LOG.info(\"Compilation of \" + sourceName + \" successful.\");\n return false;\n }",
"public static void main(String[] args) {\n File file = new File(\"./src/testcode.c\");\n \n Compiler compiler = new Compiler(file);\n compiler.compile();\n }",
"@Override\r\n\tpublic void decompile( String root, String packege, String className )\r\n\t{\r\n\t\tlog = new StringBuffer( );\r\n\t\tsource = \"\"; //$NON-NLS-1$\r\n\t\tFile workingDir = new File( root + \"/\" + packege ); //$NON-NLS-1$\r\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream( );\r\n\t\tByteArrayOutputStream errors = new ByteArrayOutputStream( );\r\n\t\tPrintWriter errorsP = new PrintWriter( new OutputStreamWriter( errors ) );\r\n\t\t// errorsP.println(\"\\n\\n\\n/***** DECOMPILE LOG *****\\n\");\r\n\t\tint status = 0;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tstart = System.currentTimeMillis( );\r\n\t\t\terrorsP.println( \"\\tJad reported messages/errors:\" ); //$NON-NLS-1$\r\n\t\t\tProcess p = Runtime.getRuntime( ).exec( buildCmdLine( className ), new String[]{}, workingDir );\r\n\t\t\tStreamRedirectThread outRedirect = new StreamRedirectThread( \"output_reader\", //$NON-NLS-1$\r\n\t\t\t\t\tp.getInputStream( ),\r\n\t\t\t\t\tbos );\r\n\t\t\tStreamRedirectThread errRedirect = new StreamRedirectThread( \"error_reader\", //$NON-NLS-1$\r\n\t\t\t\t\tp.getErrorStream( ),\r\n\t\t\t\t\terrors );\r\n\t\t\toutRedirect.start( );\r\n\t\t\terrRedirect.start( );\r\n\t\t\tstatus = p.waitFor( ); // wait for jad to finish\r\n\t\t\toutRedirect.join( ); // wait until output stream content is fully\r\n\t\t\t// copied\r\n\t\t\terrRedirect.join( ); // wait until error stream content is fully\r\n\t\t\t// copied\r\n\t\t\tif ( outRedirect.getException( ) != null )\r\n\t\t\t\texcList.add( outRedirect.getException( ) );\r\n\t\t\tif ( errRedirect.getException( ) != null )\r\n\t\t\t\texcList.add( errRedirect.getException( ) );\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\texcList.add( e );\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tbos.flush( );\r\n\t\t\t\tbos.close( );\r\n\t\t\t\terrorsP.println( \"\\tExit status: \" + status ); //$NON-NLS-1$\r\n\t\t\t\t// errorsP.print(\" *************************/\");\r\n\t\t\t\terrors.flush( );\r\n\t\t\t\terrorsP.close( );\r\n\t\t\t}\r\n\t\t\tcatch ( Exception e )\r\n\t\t\t{\r\n\t\t\t\texcList.add( e ); // will never get here...\r\n\t\t\t}\r\n\t\t\ttime = System.currentTimeMillis( ) - start;\r\n\t\t}\r\n\r\n\t\tsource = UnicodeUtil.decode( bos.toString( ) );\r\n\r\n\t\tlog = new StringBuffer( errors.toString( ) );\r\n\t\t// logExceptions();\r\n\t\t// result = new DecompiledClassFile(classFile, source.toString());\r\n\t}",
"@Override synchronized public void resolve()\n{\n if (isResolved()) return;\n\n RebaseMain.logD(\"START RESOLVE\");\n for (RebaseJavaFile jf : file_nodes) {\n RebaseMain.logD(\"FILE: \" + jf.getFile().getFileName());\n }\n\n clearResolve();\n\n RebaseJavaTyper jt = new RebaseJavaTyper(base_context);\n RebaseJavaResolver jr = new RebaseJavaResolver(jt);\n jt.assignTypes(this);\n jr.resolveNames(this);\n\n all_types = new HashSet<RebaseJavaType>(jt.getAllTypes());\n\n setResolved(true);\n}",
"public void compileStarted() { }",
"public void compileStarted() { }",
"String compile() throws IOException {\n\t\tString line = \"\";\n\t\tString[] command = {\n\t\t\t\tjavacPath,\n\t\t\t\tsavedFilePath\n\t\t};\n\t\tProcessBuilder pb=new ProcessBuilder(command);\n\t\tpb.redirectErrorStream(true);\n\t\tProcess process=pb.start();\n\t\tBufferedReader inStreamReader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(process.getInputStream())); \n\n\t\tline = inStreamReader.readLine();\n\t\tif(line == null) {\n\t\t\tline = \"\";\n\t\t\tcompiled = true;\n\t\t}\n\t\treturn line;\n\t}",
"private void copyAndResolve() throws IOException {\n if (abort) {\n LOG.debug(\"Nothing to resolve on the backend.\");\n return;\n }\n // Step one is to see if there are any classes in the distributed cache\n if (!jConf.getBoolean(PIG_SCHEMA_TUPLE_ENABLED, SCHEMA_TUPLE_ON_BY_DEFAULT)) {\n LOG.info(\"Key [\" + PIG_SCHEMA_TUPLE_ENABLED +\"] was not set... will not generate code.\");\n return;\n }\n // Step two is to copy everything from the distributed cache if we are in distributed mode\n if (!isLocal) {\n copyAllFromDistributedCache();\n }\n // Step three is to see if the file needs to be resolved\n // If there is a \"$\" in the name, we know that it is an inner\n // class and thus doesn't need to be instantiated directly.\n for (File f : codeDir.listFiles()) {\n String name = f.getName().split(\"\\\\.\")[0];\n if (!name.contains(\"$\")) {\n filesToResolve.add(name);\n LOG.info(\"Added class to list of class to resolve: \" + name);\n }\n }\n // Step four is to actually try and resolve the classes\n resolveClasses();\n }",
"protected void compileSFile(IModuleToolContext context, File srcFile, File outFile, String cflags) throws IOException {\n\t\tString command = AsInvocation.getAsCommand(context) + \" -o $\" + EcobuildFileUtil.getCanonicalPath(outFile) + \"$ \" + srcFile.getName();\n\t\tnew AsInvocation(context, context.getModuleSourceFolder(), command, context.getLogger()).invoke();\n\t}",
"@Override\n\tpublic void compile() {\n\t\t\n\t}",
"String generateCode(\n InputSource input, String filename,\n ProgrammingLanguage programmingLanguage,\n SourceResolver resolver\n ) throws Exception;",
"public boolean compile() {\n String sourceFile = source.getAbsolutePath();\n String destFile;\n try {\n destFile = destFilename(sourceFile);\n } catch (InvalidNameException e) {\n LOG.fatal(\"Wrong extension name (not .deca)\");\n System.err.println(\"Error : source file extension is not .deca\");\n return true;\n }\n\n PrintStream err = System.err;\n PrintStream out = System.out;\n LOG.debug(\"Compiling file \" + sourceFile + \" to assembly file \" + destFile);\n try {\n return doCompile(sourceFile, destFile, out, err);\n } catch (LocationException e) {\n e.display(err);\n return true;\n } catch (DecacFatalError e) {\n err.println(e.getMessage());\n return true;\n } catch (StackOverflowError e) {\n LOG.debug(\"stack overflow\", e);\n err.println(\"Stack overflow while compiling file \" + sourceFile + \".\");\n return true;\n } catch (Exception e) {\n LOG.fatal(\"Exception raised while compiling file \" + sourceFile\n + \":\", e);\n err.println(\"Internal compiler error while compiling file \" + sourceFile + \", sorry.\");\n return true;\n } catch (AssertionError e) {\n LOG.fatal(\"Assertion failed while compiling file \" + sourceFile\n + \":\", e);\n err.println(\"Internal compiler error while compiling file \" + sourceFile + \", sorry.\");\n return true;\n }\n }",
"public void source(String path) throws Exception;",
"public PyCode compile(String script) {\n return null;\n }",
"public void parseFile(String fileLocation) {\n\t\tString sourceCode = null;\n\t\ttry {\n\t\t\tsourceCode = FileUtils.readFileToString(new File(fileLocation), \"ISO-8859-1\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// just in case somehow things escape the try-catch statement\n\t\tif(sourceCode == null) {\n\t\t\tthrow new IllegalStateException(\"[ERROR]: source code is null!\");\n\t\t}\n\n\t\t// create parser and set properties\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setUnitName(fileLocation);\n\t\tparser.setEnvironment(null, null, null, true);\n\t\tparser.setSource(sourceCode.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\tparser.setStatementsRecovery(true);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n//\t\tfor (Comment comment : (List<Comment>) cu.getCommentList()) {\n//\t\t\tcomment.accept(new ASTRefactor.CommentVisitor(cu, sourceCode));\n//\t\t}\n\n\t\tcu.accept(new ASTVisitor() {\n\t\t\tpublic boolean visit(AnonymousClassDeclaration node) {\n\t\t\t\tJavaClass co = new JavaClass();\n\n\t\t\t\tif(configProperties.get(\"AnonymousClassDeclaration\")) {\n\t\t\t\t\tITypeBinding binding = node.resolveBinding();\n\n\t\t\t\t\tint startLine = cu.getLineNumber(node.getStartPosition());\n\t\t\t\t\tint endLine = cu.getLineNumber(node.getStartPosition() + node.getLength() - 1);\n\n\t\t\t\t\tco.setIsAnonymous(binding.isAnonymous());\n\t\t\t\t\tco.setColumnNumber(cu.getColumnNumber(node.getStartPosition()));\n\t\t\t\t\tco.setEndLine(endLine);\n\t\t\t\t\tco.setLineNumber(startLine);\n\n\t\t\t\t\tSystem.out.println(startLine);\n\n\t\t\t\t\tco.setNumberOfCharacters(node.getLength());\n\t\t\t\t\tco.setFileName(fileLocation);\n\n\t\t\t\t\tList<String> genericParametersList = new ArrayList<>();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif(binding.isGenericType()) {\n\t\t\t\t\t\t\tco.setIsGenericType(binding.isGenericType());\n\t\t\t\t\t\t\tfor(Object o : binding.getTypeParameters()) {\n\t\t\t\t\t\t\t\tgenericParametersList.add(o.toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tco.setIsGenericType(false);\n\t\t\t\t\t}\n\t\t\t\t\tco.setGenericParametersList(genericParametersList);\n\n\t\t\t\t\tco.setHasComments(hasComments);\n\t\t\t\t\tco.setSourceCode(getClassSourceCode(fileLocation, startLine, endLine));\n\t\t\t\t\tco.setStartCharacter(node.getStartPosition());\n\t\t\t\t\tco.setEndCharacter(node.getStartPosition() + node.getLength() - 1);\n\t\t\t\t\tco.setImportList(importList);\n\t\t\t\t\tco.setPackage(packageObject);\n\t\t\t\t\tco.setIsAnonymous(true);\n\t\t\t\t}\n\n\t\t\t\tentityStack.push(co);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic void endVisit(AnonymousClassDeclaration node) {\n\t\t\t\tif(configProperties.get(\"AnonymousClassDeclaration\")) {\n\t\t\t\t\tJavaClass temp = (JavaClass) entityStack.pop();\n\n\t\t\t\t\ttemp.setIsInnerClass(true);\n\n\t\t\t\t\ttemp.setComplexities();\n\t\t\t\t\ttemp.setMethodDeclarationNames();\n\t\t\t\t\ttemp.setMethodInvocationNames();\n\n\t\t\t\t\tif(!containingClass.isEmpty()) {\n\t\t\t\t\t\ttemp.setContainingClass(containingClass);\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tentityStack.peek().addEntity(temp, Entity.EntityType.CLASS);\n\t\t\t\t\t} catch (EmptyStackException e) {\n\t\t\t\t\t\t// should not be possible\n\t\t\t\t\t}\n\n\t\t\t\t\tfileModel.addJavaClass(temp);\n\n\t\t\t\t\thasComments = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic boolean visit(CatchClause node) {\n\t\t\t\tif(inMethod && configProperties.get(\"CatchClause\")) {\n\t\t\t\t\tSimpleName name = node.getException().getName();\n\n\t\t\t\t\tSuperEntityClass cco = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t);\n\t\t\t\t\tcco.setType(node.getException().getType());\n\t\t\t\t\tentityStack.peek().addEntity(cco, Entity.EntityType.CATCH_CLAUSE);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(ConditionalExpression node){\n\t\t\t\tif(inMethod && configProperties.get(\"ConditionalExpression\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.CONDITIONAL_EXPRESSION\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(DoStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"DoStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.DO_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(EnhancedForStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"EnhancedForStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.FOR_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(FieldDeclaration node) {\n\t\t\t\tif(configProperties.get(\"FieldDeclaration\")) {\n\t\t\t\t\tType nodeType = node.getType();\n\n\t\t\t\t\tfor(Object v : node.fragments()) {\n\t\t\t\t\t\tSimpleName name = ((VariableDeclarationFragment) v).getName();\n\n\t\t\t\t\t\t// get fully qualified name\n\t\t\t\t\t\tITypeBinding binding = node.getType().resolveBinding();\n\t\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfullyQualifiedName = binding.getQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tSuperEntityClass fdEntity = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\t\tnodeType,\n\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif(nodeType.isArrayType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.ARRAY);\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GLOBAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isParameterizedType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GENERICS);\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GLOBAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isPrimitiveType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.PRIMITIVE);\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GLOBAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isSimpleType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.SIMPLE);\n\t\t\t\t\t\t\tentityStack.peek().addEntity(fdEntity, Entity.EntityType.GLOBAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"Something is missing \" + nodeType);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(ForStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"ForStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t), Entity.EntityType.FOR_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(IfStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"IfStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t), Entity.EntityType.IF_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(ImportDeclaration node) {\n\t\t\t\tif(configProperties.get(\"ImportDeclaration\")) {\n\t\t\t\t\tName name = node.getName();\n\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = name.getFullyQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\timportList.add(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(InfixExpression node){\n\t\t\t\tif(inMethod && configProperties.get(\"InfixExpression\")) {\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tnode.getOperator().toString(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getLeftOperand().getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getLeftOperand().getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.INFIX_EXPRESSION\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(MethodDeclaration node) {\n\t\t\t\tinMethod = true;\n\t\t\t\tMethodDeclarationObject md = new MethodDeclarationObject();\n\n\t\t\t\tif(configProperties.get(\"MethodDeclaration\")) {\n\t\t\t\t\tSimpleName name = node.getName();\n\t\t\t\t\tboolean isStatic = false;\n\t\t\t\t\tboolean isAbstract = false;\n\n\t\t\t\t\t// get fully qualified name\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = name.getFullyQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t}\n\n\t\t\t\t\t// is method declaration abstract?\n\t\t\t\t\tint mod = node.getModifiers();\n\t\t\t\t\tif(Modifier.isAbstract(mod)) {\n\t\t\t\t\t\tisAbstract = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// is method declaration static?\n\t\t\t\t\tif(Modifier.isStatic(mod)) {\n\t\t\t\t\t\tisStatic = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tIMethodBinding binding = node.resolveBinding();\n\n\t\t\t\t\t// get type of each parameter\n\t\t\t\t\tList<String> parameterTypes = new ArrayList<>();\n\t\t\t\t\tfor(Object obj : node.parameters()) {\n\t\t\t\t\t\tITypeBinding tb = ((SingleVariableDeclaration) obj).getType().resolveBinding();\n\t\t\t\t\t\tString fqn;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfqn = tb.getQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfqn = name.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparameterTypes.add(fqn);\n\t\t\t\t\t}\n\n\t\t\t\t\tmd.setColumnNumber(cu.getColumnNumber(name.getStartPosition()));\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmd.setDeclaringClass(binding.getDeclaringClass().getQualifiedName());\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tmd.setDeclaringClass(null);\n\t\t\t\t\t}\n\t\t\t\t\tmd.setEndCharacter(node.getStartPosition() + node.getLength() - 1);\n\t\t\t\t\tmd.setEndLine(cu.getLineNumber(node.getStartPosition() + node.getLength() - 1));\n\t\t\t\t\tmd.setFullyQualifiedName(fullyQualifiedName);\n\n\t\t\t\t\tmd.setIsAbstract(isAbstract);\n\t\t\t\t\tmd.setIsConstructor(node.isConstructor());\n\n\t\t\t\t\t// to avoid API from setting constructor return type to void\n\t\t\t\t\tif(node.isConstructor()) {\n\t\t\t\t\t\tmd.setReturnType(null);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmd.setReturnType(binding.getReturnType().getQualifiedName());\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tmd.setReturnType(null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// get generic parameters\n\t\t\t\t\tList<String> genericParametersList = new ArrayList<>();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif(binding.isGenericMethod()) {\n\t\t\t\t\t\t\tmd.setIsGenericType(binding.isGenericMethod());\n\t\t\t\t\t\t\tfor(Object o : binding.getTypeParameters()) {\n\t\t\t\t\t\t\t\tgenericParametersList.add(o.toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tmd.setIsGenericType(false);\n\t\t\t\t\t}\n\n\t\t\t\t\tmd.setGenericParametersList(genericParametersList);\n\t\t\t\t\tmd.setIsStatic(isStatic);\n\t\t\t\t\tmd.setIsVarargs(node.isVarargs());\n\t\t\t\t\tmd.setLineNumber(cu.getLineNumber(name.getStartPosition()));\n\t\t\t\t\tmd.setName(name.toString());\n\t\t\t\t\tmd.setNumberOfCharacters(node.getLength());\n\t\t\t\t\tmd.setParametersList(node.parameters());\n\t\t\t\t\tmd.setParameterTypesList(parameterTypes);\n\t\t\t\t\tmd.setStartCharacter(name.getStartPosition());\n\n\t\t\t\t\tif(node.thrownExceptionTypes().size() > 0) {\n\t\t\t\t\t\tfor(Object o : node.thrownExceptionTypes()) {\n\t\t\t\t\t\t\tmd.addThrowsException(o.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tentityStack.push(md);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic void endVisit(MethodDeclaration node) {\n\t\t\t\tMethodDeclarationObject temp = (MethodDeclarationObject) entityStack.pop();\n\n\t\t\t\tif(configProperties.get(\"MethodDeclaration\")) {\n\t\t\t\t\ttemp.setComplexities();\n\t\t\t\t\ttemp.setMethodDeclarationNames();\n\t\t\t\t\ttemp.setMethodInvocationNames();\n\t\t\t\t\tentityStack.peek().addEntity(temp, Entity.EntityType.METHOD_DECLARATION);\n\t\t\t\t}\n\n\t\t\t\tinMethod = false;\n\t\t\t}\n\n\t\t\tpublic boolean visit(MethodInvocation node) {\n\t\t\t\tif(configProperties.get(\"MethodInvocation\")) {\n\t\t\t\t\tSimpleName name = node.getName();\n\n\t\t\t\t\t// get fully qualified name\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = name.getFullyQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t}\n\n\t\t\t\t\t// get declaring class\n\t\t\t\t\tIMethodBinding binding = node.resolveMethodBinding();\n\t\t\t\t\tString declaringClass;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdeclaringClass = binding.getDeclaringClass().getQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tdeclaringClass = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// get calling class\n\t\t\t\t\tString callingClass;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcallingClass = node.getExpression().resolveTypeBinding().getQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tcallingClass = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// get argument types\n\t\t\t\t\tList<String> argumentTypes = new ArrayList<>();\n\t\t\t\t\tfor(Object t : node.arguments()) {\n\t\t\t\t\t\tITypeBinding tb = ((Expression)t).resolveTypeBinding();\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\targumentTypes.add(tb.getQualifiedName());\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\targumentTypes.add(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tMethodInvocationObject mio = new MethodInvocationObject();\n\t\t\t\t\tmio.setName(name.toString());\n\t\t\t\t\tmio.setFullyQualifiedName(fullyQualifiedName);\n\t\t\t\t\tmio.setDeclaringClass(declaringClass);\n\t\t\t\t\tmio.setCallingClass(callingClass);\n\t\t\t\t\tmio.setArguments(node.arguments());\n\t\t\t\t\tmio.setArgumentTypes(argumentTypes);\n\t\t\t\t\tmio.setLineNumber(cu.getLineNumber(name.getStartPosition()));\n\t\t\t\t\tmio.setEndLine(cu.getLineNumber(node.getStartPosition() + node.getLength() - 1));\n\t\t\t\t\tmio.setStartCharacter(name.getStartPosition());\n\t\t\t\t\tmio.setEndCharacter(node.getStartPosition() + node.getLength() - 1);\n\t\t\t\t\tmio.setColumnNumber(cu.getColumnNumber(name.getStartPosition()));\n\t\t\t\t\tentityStack.peek().addEntity(mio, Entity.EntityType.METHOD_INVOCATION);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(PackageDeclaration node){\n\t\t\t\tif(configProperties.get(\"PackageDeclaration\")) {\n\t\t\t\t\tName name = node.getName();\n\n\t\t\t\t\t// get fully qualified name\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = name.getFullyQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tpackageObject = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\tnode.getName().toString(),\n\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(SingleVariableDeclaration node) {\n\t\t\t\tif(configProperties.get(\"SingleVariableDeclaration\")) {\n\t\t\t\t\tSimpleName name = node.getName();\n\n\t\t\t\t\t// get fully qualified name\n\t\t\t\t\tITypeBinding binding = node.getType().resolveBinding();\n\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfullyQualifiedName = binding.getQualifiedName();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t}\n\n\t\t\t\t\tSuperEntityClass svdEntity = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\tnode.getType(),\n\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t);\n\n\t\t\t\t\tif(node.getType().isArrayType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.ARRAY);\n\t\t\t\t\t}\n\t\t\t\t\telse if(node.getType().isParameterizedType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.GENERICS);\n\t\t\t\t\t}\n\t\t\t\t\telse if(node.getType().isPrimitiveType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.PRIMITIVE);\n\t\t\t\t\t}\n\t\t\t\t\telse if(node.getType().isSimpleType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.SIMPLE);\n\t\t\t\t\t}\n\t\t\t\t\telse if(node.getType().isUnionType()) {\n\t\t\t\t\t\tentityStack.peek().addEntity(svdEntity, Entity.EntityType.UNION);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"Something is missing \" + node.getType());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(SwitchStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"SwitchStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tSuperEntityClass sso = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t);\n\n\t\t\t\t\tList<SuperEntityClass> switchCaseList = new ArrayList<>();\n\n\t\t\t\t\tfor(Object s : node.statements()) {\n\t\t\t\t\t\tif(s instanceof SwitchCase) {\n\t\t\t\t\t\t\tString expression;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\texpression = ((SwitchCase) s).getExpression().toString();\n\t\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\t\texpression = \"Default\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitchCaseList.add(\n\t\t\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texpression,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(((SwitchCase) s).getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(((SwitchCase)s).getStartPosition())\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}\n\t\t\t\t\t}\n\n\t\t\t\t\tsso.addEntities(switchCaseList, Entity.EntityType.SWITCH_CASE);\n\t\t\t\t\tentityStack.peek().addEntity(sso, Entity.EntityType.SWITCH_STATEMENT);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(ThrowStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"ThrowStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.THROW_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(TryStatement node) {\n\t\t\t\tif(inMethod && configProperties.get(\"TryStatement\")) {\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Try Statement\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.TRY_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(TypeDeclaration node) {\n\t\t\t\tJavaClass co = new JavaClass();\n\n\t\t\t\tif(configProperties.get(\"TypeDeclaration\")) {\n\t\t\t\t\tif(node.isInterface()) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint startLine = cu.getLineNumber(node.getStartPosition());\n\t\t\t\t\t\tint endLine = cu.getLineNumber(node.getStartPosition() + node.getLength() - 1);\n\n\t\t\t\t\t\tITypeBinding binding = node.resolveBinding();\n\n\t\t\t\t\t\t// get fully qualified name\n\t\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfullyQualifiedName = node.getName().getFullyQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfullyQualifiedName = node.getName().toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(containingClass.isEmpty()) {\n\t\t\t\t\t\t\tcontainingClass = node.getName().toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tco.setIsAnonymous(binding.isAnonymous());\n\t\t\t\t\t\tco.setColumnNumber(cu.getColumnNumber(node.getStartPosition()));\n\t\t\t\t\t\tco.setEndLine(endLine);\n\t\t\t\t\t\tco.setLineNumber(startLine);\n\t\t\t\t\t\tco.setName(node.getName().toString());\n\t\t\t\t\t\tco.setNumberOfCharacters(node.getLength());\n\t\t\t\t\t\tco.setFileName(fileLocation);\n\t\t\t\t\t\tco.setFullyQualifiedName(fullyQualifiedName);\n\n\t\t\t\t\t\t// get generic parameters\n\t\t\t\t\t\tList<String> genericParametersList = new ArrayList<>();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif(binding.isGenericType()) {\n\t\t\t\t\t\t\t\tco.setIsGenericType(binding.isGenericType());\n\t\t\t\t\t\t\t\tfor(Object o : binding.getTypeParameters()) {\n\t\t\t\t\t\t\t\t\tgenericParametersList.add(o.toString());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tco.setIsGenericType(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tco.setGenericParametersList(genericParametersList);\n\n\t\t\t\t\t\tco.setHasComments(hasComments);\n\t\t\t\t\t\tco.setImportList(importList);\n\t\t\t\t\t\tco.setPackage(packageObject);\n\t\t\t\t\t\tco.setSourceCode(getClassSourceCode(fileLocation, startLine, endLine));\n\t\t\t\t\t\tco.setStartCharacter(node.getStartPosition());\n\t\t\t\t\t\tco.setEndCharacter(node.getStartPosition() + node.getLength() - 1);\n\n\t\t\t\t\t\tif(node.getSuperclassType() != null) {\n\t\t\t\t\t\t\tco.setSuperClass(node.getSuperclassType().toString());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(node.superInterfaceTypes().size() > 0) {\n\t\t\t\t\t\t\tfor(Object o : node.superInterfaceTypes()) {\n\t\t\t\t\t\t\t\tco.addImplementsInterface(o.toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tint mod = node.getModifiers();\n\t\t\t\t\t\tif(Modifier.isAbstract(mod)) {\n\t\t\t\t\t\t\tco.setIsAbstract(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tco.setIsAbstract(false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tentityStack.push(co);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic void endVisit(TypeDeclaration node) {\n\t\t\t\tJavaClass temp = (JavaClass) entityStack.pop();\n\n\t\t\t\tif(!node.isInterface() && configProperties.get(\"TypeDeclaration\")) {\n\t\t\t\t\t// check if current class is an inner class\n\t\t\t\t\tboolean isInnerClass = true;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tentityStack.peek();\n\t\t\t\t\t} catch (EmptyStackException e) {\n\t\t\t\t\t\tisInnerClass = false;\n\t\t\t\t\t}\n\t\t\t\t\ttemp.setIsInnerClass(isInnerClass);\n\n\t\t\t\t\ttemp.setComplexities();\n\t\t\t\t\ttemp.setMethodDeclarationNames();\n\t\t\t\t\ttemp.setMethodInvocationNames();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif(!containingClass.isEmpty()) {\n\t\t\t\t\t\t\ttemp.setContainingClass(containingClass);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tentityStack.peek().addEntity(temp, Entity.EntityType.CLASS);\n\n\t\t\t\t\t} catch (EmptyStackException e) {\n\t\t\t\t\t\tcontainingClass = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tfileModel.addJavaClass(temp);\n\t\t\t\t}\n\n\t\t\t\thasComments = false;\n\t\t\t}\n\n\t\t\tpublic boolean visit(VariableDeclarationStatement node) {\n\t\t\t\tif(configProperties.get(\"VariableDeclarationStatement\")) {\n\t\t\t\t\tType nodeType = node.getType();\n\n\t\t\t\t\tfor(Object v : node.fragments()) {\n\t\t\t\t\t\tSimpleName name = ((VariableDeclarationFragment) v).getName();\n\n\t\t\t\t\t\t// get fully qualified name\n\t\t\t\t\t\tITypeBinding binding = node.getType().resolveBinding();\n\t\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfullyQualifiedName = binding.getQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tSuperEntityClass vdsEntity = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\t\tnodeType,\n\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif(nodeType.isArrayType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdsEntity, Entity.EntityType.ARRAY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isParameterizedType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdsEntity, Entity.EntityType.GENERICS);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isPrimitiveType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdsEntity, Entity.EntityType.PRIMITIVE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isSimpleType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdsEntity, Entity.EntityType.SIMPLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"Something is missing \" + nodeType);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(VariableDeclarationExpression node) {\n\t\t\t\tif(configProperties.get(\"VariableDeclarationExpression\")) {\n\t\t\t\t\tType nodeType = node.getType();\n\n\t\t\t\t\tfor(Object v : node.fragments()) {\n\t\t\t\t\t\tSimpleName name = ((VariableDeclarationFragment) v).getName();\n\n\t\t\t\t\t\t// get fully qualified name\n\t\t\t\t\t\tITypeBinding binding = node.getType().resolveBinding();\n\t\t\t\t\t\tString fullyQualifiedName;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfullyQualifiedName = binding.getQualifiedName();\n\t\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\t\tfullyQualifiedName = name.toString();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tSuperEntityClass vdeEntity = new SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\tname.toString(),\n\t\t\t\t\t\t\t\t\t\tfullyQualifiedName,\n\t\t\t\t\t\t\t\t\t\tnodeType,\n\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(name.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(name.getStartPosition())\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif(nodeType.isArrayType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdeEntity, Entity.EntityType.ARRAY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isParameterizedType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdeEntity, Entity.EntityType.GENERICS);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isPrimitiveType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdeEntity, Entity.EntityType.PRIMITIVE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(nodeType.isSimpleType()) {\n\t\t\t\t\t\t\tentityStack.peek().addEntity(vdeEntity, Entity.EntityType.SIMPLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"Something is missing \" + nodeType);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(WhileStatement node){\n\t\t\t\tif(inMethod && configProperties.get(\"WhileStatement\")) {\n\t\t\t\t\tString name;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tname = node.getExpression().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tname = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tentityStack.peek().addEntity(\n\t\t\t\t\t\t\t\t\tnew SuperEntityClass(\n\t\t\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getLineNumber(node.getStartPosition()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tcu.getColumnNumber(node.getStartPosition())\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tEntity.EntityType.WHILE_STATEMENT\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic boolean visit(WildcardType node) {\n\t\t\t\tif(inMethod && configProperties.get(\"WildcardType\")) {\n\t\t\t\t\tSuperEntityClass wo = new SuperEntityClass();\n\t\t\t\t\two.setName(\"Wildcard\");\n\n\t\t\t\t\tString bound;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbound = node.getBound().toString();\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tbound = \"none\";\n\t\t\t\t\t}\n\n\t\t\t\t\two.setBound(bound);\n\t\t\t\t\two.setType(((ParameterizedType) node.getParent()).getType());\n\t\t\t\t\two.setLineNumber(cu.getLineNumber(node.getStartPosition()));\n\t\t\t\t\two.setColumnNumber(cu.getColumnNumber(node.getStartPosition()));\n\t\t\t\t\tentityStack.peek().addEntity(wo, Entity.EntityType.WILDCARD);\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t});\n\t}",
"public static void main(String[] args) {\n\n\t\t// File file=new File(\"./testClasses/binarysearch.java\");\n\t\tCharStream input = null;\n\t\tif (args.length > 0) {\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(args[0]);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(\"./testFiles/factorial.java\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tMiniJavaLexer lexer = new MiniJavaLexer(input);\n\t\tMiniJavaParser parser = new MiniJavaParser(new BufferedTokenStream(\n\t\t\t\tlexer));\n\t\tParseTree tree = parser.program();\n\t\tTrees.inspect(tree, parser);\n\n\t\t// ---------PrintVisitor-------------\n\t\tPrintVisitor pv = new PrintVisitor();\n\t\tpv.visitMiniJava(tree);\n\n\t\t// --------SymbolTableVisitor--------\n\t\tSymbolTableVisitor symbolTableVisitor = new SymbolTableVisitor();\n\t\tSymbolTable visitedST = (SymbolTable) symbolTableVisitor.visit(tree);\n\t\tif (symbolTableVisitor.getErrorFlag()) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(BGSTYLE\n\t\t\t\t\t\t\t+ RED\n\t\t\t\t\t\t\t+ \"THE PROGRAM COTAINS ERRORS! \\n CHECK CONSOLE AND PARSE TREE WINDOW FOR MORE INFO!\");\n\t\t} else {\n\t\t\tvisitedST.printTable();\n\t\t\tvisitedST.resetTable();\n\n\t\t\t// ------TypeCheckVisitor\n\t\t\tTypeCheckVisitor tcv = new TypeCheckVisitor(visitedST);\n\t\t\ttcv.visit(tree);\n\t\t\tif (tcv.getErrorCount() > 0) {\n\t\t\t\tSystem.err.println(\"The Program contains \"\n\t\t\t\t\t\t+ tcv.getErrorCount() + \" Type Errors!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"TypeChecking Done With No Errors!\");\n\t\t\t}\n\t\t}\n\n\t}",
"public boolean compile(String source, boolean generate) {\n\t CompilerOptions options = getDefaultCompilerOptions();\n\t\tICompilerRequestor requestor = this;\n\t\tIErrorHandlingPolicy policy = DefaultErrorHandlingPolicies.exitAfterAllProblems();\n\t IProblemFactory problemFactory = new DefaultProblemFactory(Locale.getDefault());\n\t Source[] units = new Source[1];\n\t units[0] = new Source(source);\n\t units[0].setName();\t\t\n\t options.generateClassFiles = generate;\t \n\t\torg.eclipse.jdt.internal.compiler.Compiler compiler = new org.eclipse.jdt.internal.compiler.Compiler(\n\t\t\t\tnew CompilerAdapterEnvironment(environment, units[0]), \n\t\t\t\tpolicy, options, requestor, problemFactory);\n\t\t\n\t\tcompiler.compile(units);\n\t\treturn getResult().hasErrors();\n\t}",
"private boolean compileMethod(String codeDirectory){\n String fileToCompile = new String();\n int compilationResult = 0;\n CodeCompile compileObject = new CodeCompile();\n compilationResult = compileObject.CompileJavaCode(codeDirectory,errorImage);\n return (boolean) (compilationResult==0);\n }",
"@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}",
"public static void main(String[] args) throws IOException {\n\n _project _sc = _project.of();\n //reads from a maven-central jar file\n _downloadArchiveConsumer.of(\"https://search.maven.org/remotecontent?filepath=com/github/javaparser/javaparser-core/3.15.18/javaparser-core-3.15.18-sources.jar\",\n (ZipEntry ze, InputStream is)-> {\n if( ze.getName().endsWith(\".java\")){\n _sc.add( _codeUnit.of(is) );\n }\n });\n System.out.println( _sc.size() );\n\n _project _src = _githubProject.of(\"https://github.com/edefazio/bincat\").load();\n //_sources _src = _sources.of();\n //_downloadArchive _da = _downloadArchive.of(url, (ZipEntry ze,InputStream is)-> {\n // if( ze.getName().endsWith(\".java\")){\n // _src.add( _codeUnit.of(is) );\n // }\n //});\n /*\n try( InputStream inputStream = url.openStream();\n ZipInputStream zis = new ZipInputStream(inputStream) ) {\n\n byte[] buffer = new byte[2048];\n\n while (zis.available() > 0) {\n ZipEntry ze = zis.getNextEntry();\n System.out.println(\"reading \" + ze.getName());\n\n if( ze.isDirectory() ){\n ze.\n } else if( ze.)\n\n if (!ze.isDirectory() && ze.getName().endsWith(\".java\")) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int len;\n while ((len = zis.read(buffer)) > 0) {\n baos.write(buffer, 0, len);\n }\n try {\n System.out.println(\"adding\" + ze.getName());\n _src.add(_codeUnit.of(baos.toString()));\n } catch (Exception e) {\n throw new _ioException(\"could not read from entry \" + ze.getName());\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n */\n\n System.out.println( \"finished reading \"+ _src.size());\n }",
"protected void beginToCompile(org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits, String[] bindingKeys) {\n int sourceLength = sourceUnits.length;\n int keyLength = bindingKeys.length;\n int maxUnits = sourceLength + keyLength;\n this.totalUnits = 0;\n this.unitsToProcess = new CompilationUnitDeclaration[maxUnits];\n int index = 0;\n // walks the source units\n this.requestedSources = new HashtableOfObject();\n for (int i = 0; i < sourceLength; i++) {\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = sourceUnits[i];\n CompilationUnitDeclaration parsedUnit;\n CompilationResult unitResult = new CompilationResult(sourceUnit, index++, maxUnits, this.options.maxProblemsPerUnit);\n try {\n if (this.options.verbose) {\n this.out.println(Messages.bind(Messages.compilation_request, new String[] { String.valueOf(index++ + 1), String.valueOf(maxUnits), new String(sourceUnit.getFileName()) }));\n }\n // diet parsing for large collection of units\n if (this.totalUnits < this.parseThreshold) {\n parsedUnit = this.parser.parse(sourceUnit, unitResult);\n } else {\n parsedUnit = this.parser.dietParse(sourceUnit, unitResult);\n }\n // initial type binding creation\n this.lookupEnvironment.buildTypeBindings(parsedUnit, /*no access restriction*/\n null);\n addCompilationUnit(sourceUnit, parsedUnit);\n this.requestedSources.put(unitResult.getFileName(), sourceUnit);\n worked(1);\n } finally {\n // no longer hold onto the unit\n sourceUnits[i] = null;\n }\n }\n // walk the binding keys\n this.requestedKeys = new HashtableOfObject();\n for (int i = 0; i < keyLength; i++) {\n BindingKeyResolver resolver = new BindingKeyResolver(bindingKeys[i], this, this.lookupEnvironment);\n resolver.parse(/*pause after fully qualified name*/\n true);\n // If it doesn't have a type name, then it is either an array type, package or base type, which will definitely not have a compilation unit.\n // Skipping it will speed up performance because the call will open jars. (theodora)\n CompilationUnitDeclaration parsedUnit = resolver.hasTypeName() ? resolver.getCompilationUnitDeclaration() : null;\n if (parsedUnit != null) {\n char[] fileName = parsedUnit.compilationResult.getFileName();\n Object existing = this.requestedKeys.get(fileName);\n if (existing == null)\n this.requestedKeys.put(fileName, resolver);\n else if (existing instanceof ArrayList)\n ((ArrayList) existing).add(resolver);\n else {\n ArrayList list = new ArrayList();\n list.add(existing);\n list.add(resolver);\n this.requestedKeys.put(fileName, list);\n }\n } else {\n char[] key = resolver.hasTypeName() ? // binary binding\n resolver.getKey().toCharArray() : // package binding or base type binding\n CharOperation.concatWith(resolver.compoundName(), '.');\n this.requestedKeys.put(key, resolver);\n }\n worked(1);\n }\n // binding resolution\n this.lookupEnvironment.completeTypeBindings();\n }",
"public Script tryCompile(Node node, ASTInspector inspector) {\n return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), inspector, false);\n }",
"@Override\n public CompilationSource createCompilationSource(String name) {\n File sourceFile = getSourceFile(name);\n if (sourceFile == null || !sourceFile.exists()) {\n return null;\n }\n\n return new FileSource(name, sourceFile);\n }",
"private void getCompilationUnits(String filePath) {\n File file = new File(filePath);\n\n for(File f : file.listFiles()) {\n if(f.isFile() && f.getName().endsWith(\".java\")) {\n FileInputStream in = null;\n try {\n\n in = new FileInputStream(f);\n CompilationUnit cu = JavaParser.parse(in);\n compilationUnits.add(cu);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"FileNotFoundException from getCompilationUnits method\");\n e.printStackTrace();\n } catch (Exception e) {\n System.out.println(\"Exception from getCompilationUnits method\");\n e.printStackTrace();\n } finally {\n try {\n\n in.close();\n\n } catch (IOException e) {\n System.out.println(\"IOException from getCompilationUnits method\");\n e.printStackTrace();\n }\n }\n }\n }\n }",
"protected void compile(String[] args) {\n String[] commandArray = null;\n File tmpFile = null;\n\n try {\n String myos = System.getProperty(\"os.name\");\n\n\n if (myos.toLowerCase().indexOf(\"windows\") >= 0 \n && args.length > 250) {\n PrintWriter out = null;\n try {\n tmpFile = new File(\"jikes\"+(new Random(System.currentTimeMillis())).nextLong());\n out = new PrintWriter(new FileWriter(tmpFile));\n for (int i = 0; i < args.length; i++) {\n out.println(args[i]);\n }\n out.flush();\n commandArray = new String[] { command, \n \"@\" + tmpFile.getAbsolutePath()};\n } catch (IOException e) {\n throw new BuildException(\"Error creating temporary file\", e);\n } finally {\n if (out != null) {\n try {out.close();} catch (Throwable t) {}\n }\n }\n } else {\n commandArray = new String[args.length+1];\n commandArray[0] = command;\n System.arraycopy(args,0,commandArray,1,args.length);\n }\n \n try {\n Execute exe = new Execute(jop);\n exe.setAntRun(project);\n exe.setWorkingDirectory(project.getBaseDir());\n exe.setCommandline(commandArray);\n exe.execute();\n } catch (IOException e) {\n throw new BuildException(\"Error running Jikes compiler\", e);\n }\n } finally {\n if (tmpFile != null) {\n tmpFile.delete();\n }\n }\n }",
"public BdsVm compile() {\n\t\tif (bdsvm != null) throw new RuntimeException(\"Code already compiled!\");\n\n\t\t// Initialize\n\t\tbdsvm = new BdsVm();\n\t\tcode = new ArrayList<>();\n\t\tbdsvm.setDebug(debug);\n\t\tbdsvm.setVerbose(verbose);\n\t\tinit();\n\n\t\t// Read file and parse each line\n\t\tlineNum = 1;\n\t\tfor (String line : code().split(\"\\n\")) {\n\t\t\t// Remove comments and labels\n\t\t\tif (isCommentLine(line)) continue;\n\n\t\t\t// Parse label, if any.Keep the rest of the line\n\t\t\tline = label(line);\n\t\t\tif (line.isEmpty()) continue;\n\n\t\t\t// Decode instruction\n\t\t\tOpCode opcode = opcode(line);\n\t\t\tString param = null;\n\t\t\tif (opcode.hasParam()) param = param(line);\n\t\t\t// Add instruction\n\t\t\taddInstruction(opcode, param);\n\t\t\tlineNum++;\n\t\t}\n\n\t\tbdsvm.setCode(code);\n\t\tif (debug) System.err.println(\"# Assembly: Start\\n\" + bdsvm.toAsm() + \"\\n# Assembly: End\\n\");\n\t\treturn bdsvm;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic FlatConnector<T> interpret(List<String> srcfiles) {\n\t\ttry {\t\t\t\n\t\t\t// Find all available component expressions.\n\t\t\tStack<ReoFile<T>> stack = new Stack<ReoFile<T>>();\t\n\t\t\tList<String> parsed = new ArrayList<String>();\n\t\t\tQueue<String> components = new LinkedList<String>();\n\t\t\t\n\t\t\tfor (String file : srcfiles) {\n\t\t\t\tString filename = new File(file).getName().replaceFirst(\"[.][^.]+$\", \"\");\n\t\t\t\tReoFile<T> program = parse(new ANTLRFileStream(file));\n\t\t\t\tif (program != null) {\n\t\t\t\t\tif (!program.getName().endsWith(filename))\n\t\t\t\t\t\tthrow new CompilationException(program.getToken(), \"Component must have name \" + filename + \".\");\n\t\t\t\t\tstack.push(program);\n\t\t\t\t\tparsed.add(program.getName());\n\t\t\t\t\tcomponents.addAll(program.getImports());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.err.println(\"[error] Cannot parse \" + new File(file).getName() + \".\");\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t\n\t\t\twhile (!components.isEmpty()) {\n\t\t\t\tString comp = components.poll();\n\t\t\t\tif (!parsed.contains(comp)) {\n\t\t\t\t\tparsed.add(comp);\n\t\t\t\t\tReoFile<T> program = findComponent(comp);\n\t\t\t\t\tif (program != null) {\n\t\t\t\t\t\tif (!program.getName().equals(comp))\n\t\t\t\t\t\t\tthrow new CompilationException(program.getToken(), \"Component must have name \" + comp.substring(comp.lastIndexOf(\".\") + 1) + \".\");\n\t\t\t\t\t\tstack.push(program);\n\t\t\t\t\t\tList<String> newComponents = program.getImports();\n\t\t\t\t\t\tnewComponents.removeAll(parsed);\n\t\t\t\t\t\tcomponents.addAll(newComponents);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(\"[error] Component \" + comp + \" cannot be found.\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Evaluate these component expressions.\n\t\t\tDefinitions definitions = new Definitions();\n\t\t\tString name = null;\t\t\n\t\t\twhile (!stack.isEmpty()) {\n\t\t\t\tReoFile<T> program = stack.pop();\n\t\t\t\tname = program.getName();\n\t\t\t\tExpression cexpr = program.getComponent().evaluate(definitions);\n\t\t\t\tdefinitions.put(name, cexpr);\n\t\t\t}\n\t\t\t\n\t\t\t// Get the instance from the main component.\t\t\n\t\t\tExpression expr = definitions.get(name);\t\t\n\t\t\tif (expr instanceof ReoSystemValue<?>) {\t\t\t\t\n\t\t\t\tReoSystemValue<T> main = (ReoSystemValue<T>)expr;\n\t\t\t\tValueList values = new ValueList();\n\t\t\t\tfor (String x : params) values.add(new StringValue(x));\n\t\t\t\tSignatureConcrete sign = main.getSignature().evaluate(values, null);\n\t\t\t\t\n\t\t\t\tAssembly<T> main_p = main.instantiate(values, null);\n\t\t\t\t\n\t\t\t\tComponentList<T> instances = main_p.getInstances();\n\t\t\t\t\n\t\t\t\tinstances.insertNodes(true, false);\n\t\t\t\t\n\t\t\t\treturn new FlatConnector<T>(instances.getComponents(), name, sign.keySet());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.print(e.getMessage());\n\t\t} catch (CompilationException e) {\n\t\t\tSystem.out.println(new Message(MessageType.ERROR, e.getToken(), e.getMessage()));\n\t\t}\t\t\n\n\t\treturn null;\n\t}",
"private boolean compilationRequired( String module, File output )\n throws MojoExecutionException\n {\n GwtModule gwtModule = readModule( module );\n if ( gwtModule.getEntryPoints().length == 0 )\n {\n // No entry-point, this is a secondary module : compiling this one will fail\n // with '[ERROR] Module has no entry points defined'\n return false;\n }\n\n if ( force )\n {\n return true;\n }\n\n String modulePath = gwtModule.getPath();\n String outputTarget = modulePath + \"/\" + modulePath + \".nocache.js\";\n\n // Require compilation if no js file present in target.\n if ( !new File( output, outputTarget ).exists() )\n {\n return true;\n }\n\n // js file allreay exists, but may not be up-to-date with project source files\n SingleTargetSourceMapping singleTargetMapping = new SingleTargetSourceMapping( \".java\", outputTarget );\n StaleSourceScanner scanner = new StaleSourceScanner();\n scanner.addSourceMapping( singleTargetMapping );\n\n Collection<File> compileSourceRoots = new HashSet<File>();\n classpathBuilder.addSourcesWithActiveProjects( getProject(), compileSourceRoots, SCOPE_COMPILE );\n classpathBuilder.addResourcesWithActiveProjects( getProject(), compileSourceRoots, SCOPE_COMPILE );\n for ( File sourceRoot : compileSourceRoots )\n {\n if ( !sourceRoot.isDirectory() )\n {\n continue;\n }\n try\n {\n if ( !scanner.getIncludedSources( sourceRoot, output ).isEmpty() )\n {\n getLog().debug( \"found stale source in \" + sourceRoot + \" compared with \" + output );\n return true;\n }\n }\n catch ( InclusionScanException e )\n {\n throw new MojoExecutionException( \"Error scanning source root: \\'\" + sourceRoot + \"\\' \"\n + \"for stale files to recompile.\", e );\n }\n }\n return false;\n }",
"private void resolve(String[] sourceCompilationUnits, String[] encodings, String[] bindingKeys, FileASTRequestor astRequestor, int apiLevel, Map compilerOptions, int flags) {\n astRequestor.compilationUnitResolver = this;\n this.bindingTables = new DefaultBindingResolver.BindingTables();\n CompilationUnitDeclaration unit = null;\n try {\n int length = sourceCompilationUnits.length;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits = new org.eclipse.jdt.internal.compiler.env.ICompilationUnit[length];\n int count = 0;\n for (int i = 0; i < length; i++) {\n char[] contents = null;\n String encoding = encodings != null ? encodings[i] : null;\n String sourceUnitPath = sourceCompilationUnits[i];\n try {\n contents = Util.getFileCharContent(new File(sourceUnitPath), encoding);\n } catch (IOException e) {\n continue;\n }\n if (contents == null) {\n // go to the next unit\n continue;\n }\n sourceUnits[count++] = new org.eclipse.jdt.internal.compiler.batch.CompilationUnit(contents, sourceUnitPath, encoding);\n }\n beginToCompile(sourceUnits, bindingKeys);\n // process all units (some more could be injected in the loop by the lookup environment)\n for (int i = 0; i < this.totalUnits; i++) {\n if (resolvedRequestedSourcesAndKeys(i)) {\n // cleanup remaining units\n for (; i < this.totalUnits; i++) {\n this.unitsToProcess[i].cleanUp();\n this.unitsToProcess[i] = null;\n }\n break;\n }\n unit = this.unitsToProcess[i];\n try {\n // this.process(...) is optimized to not process already known units\n super.process(unit, i);\n // requested AST\n char[] fileName = unit.compilationResult.getFileName();\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit source = (org.eclipse.jdt.internal.compiler.env.ICompilationUnit) this.requestedSources.get(fileName);\n if (source != null) {\n // convert AST\n CompilationResult compilationResult = unit.compilationResult;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = compilationResult.compilationUnit;\n char[] contents = sourceUnit.getContents();\n AST ast = AST.newAST(apiLevel);\n ast.setFlag(flags | AST.RESOLVED_BINDINGS);\n ast.setDefaultNodeFlag(ASTNode.ORIGINAL);\n ASTConverter converter = new ASTConverter(/*need to resolve bindings*/\n compilerOptions, true, this.monitor);\n BindingResolver resolver = new DefaultBindingResolver(unit.scope, null, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, this.fromJavaProject);\n ast.setBindingResolver(resolver);\n converter.setAST(ast);\n CompilationUnit compilationUnit = converter.convert(unit, contents);\n compilationUnit.setTypeRoot(null);\n compilationUnit.setLineEndTable(compilationResult.getLineSeparatorPositions());\n ast.setDefaultNodeFlag(0);\n ast.setOriginalModificationCount(ast.modificationCount());\n // pass it to requestor\n astRequestor.acceptAST(new String(source.getFileName()), compilationUnit);\n worked(1);\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedSources.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n // requested binding\n Object key = this.requestedKeys.get(fileName);\n if (key != null) {\n if (key instanceof BindingKeyResolver) {\n reportBinding(key, astRequestor, unit);\n worked(1);\n } else if (key instanceof ArrayList) {\n Iterator iterator = ((ArrayList) key).iterator();\n while (iterator.hasNext()) {\n reportBinding(iterator.next(), astRequestor, unit);\n worked(1);\n }\n }\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedKeys.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n } finally {\n // cleanup compilation unit result\n unit.cleanUp();\n }\n // release reference to processed unit declaration\n this.unitsToProcess[i] = null;\n this.requestor.acceptResult(unit.compilationResult.tagAsAccepted());\n }\n // remaining binding keys\n DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, null, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, true);\n Object[] keys = this.requestedKeys.valueTable;\n for (int j = 0, keysLength = keys.length; j < keysLength; j++) {\n BindingKeyResolver keyResolver = (BindingKeyResolver) keys[j];\n if (keyResolver == null)\n continue;\n Binding compilerBinding = keyResolver.getCompilerBinding();\n IBinding binding = compilerBinding == null ? null : resolver.getBinding(compilerBinding);\n // pass it to requestor\n astRequestor.acceptBinding(((BindingKeyResolver) this.requestedKeys.valueTable[j]).getKey(), binding);\n worked(1);\n }\n } catch (OperationCanceledException e) {\n throw e;\n } catch (AbortCompilation e) {\n this.handleInternalException(e, unit);\n } catch (Error e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } catch (RuntimeException e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } finally {\n // disconnect ourselves from ast requestor\n astRequestor.compilationUnitResolver = null;\n }\n }",
"private void traverseSourceFiles(IResource[] members) {\n\t\tfor (int index = 0; index < members.length; index++) {\n\t\t\tif (monitor.isCanceled()) { // return if cancel is requested\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tIResource resource = members[index];\n\t\t\tif (resource instanceof IContainer) {\n\t\t\t\tIContainer container = (IContainer) resource;\n\t\t\t\tIResource[] newMembers = null;\n\t\t\t\ttry {\n\t\t\t\t\tnewMembers = container.members();\n\t\t\t\t} catch (CoreException e) {\n\t\t\t\t\tSystem.out.println(\"Could not access members \"\n\t\t\t\t\t\t\t+ \"of the container \" + container.getFullPath()\n\t\t\t\t\t\t\t+ \".\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttraverseSourceFiles(newMembers);\n\t\t\t}\n\t\t\tif (resource instanceof IFile) {\n\t\t\t\tastEngine = new ASTEngine((IFile) resource, this, mode, pattern);\n\t\t\t\tastEngine.traverseSource();\n\t\t\t\tmonitor.worked(1);\n\t\t\t}\n\t\t}\n\t}",
"void setCompiled(CompilationUnitDeclaration cud,\n Map<String, String> binaryTypeToSourceFileMap) {\n assert (state == State.FRESH || state == State.ERROR);\n this.cud = cud;\n fileNameRefs = computeFileNameRefs(cud, binaryTypeToSourceFileMap);\n state = State.COMPILED;\n }",
"public interface PsiJavaReference extends PsiMultipleTargetsReference {\n void processVariants(PsiScopeProcessor processor);\n\n JavaResolveResult advancedResolve(boolean incompleteCode);\n JavaResolveResult[] multiResolve(boolean incompleteCode);\n\n}",
"Map<String, Equation> compile(File file) throws IOException;",
"public String[] compile(String[] names) throws IOException {\n String[] compiled = super.compile(names);\n for (int j=0;j<names.length;j++) {\n syncSources(names[j]);\n }\n return compiled;\n }",
"@POST\n\t@Path(\"/execute/{id}\")\n\tpublic Response execute(@PathParam(\"id\") String id, String source) throws Exception {\n\t\t// Persist\n\t\tString target = persist(id, source);\n\t\t\n\t\t// Alter stdout\n\t\tPrintStream stdout = System.out;\n\t\tPrintStream stderr = System.err;\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream capture = new PrintStream(baos);\n\t\t\n\t\ttry {\n\t\t\tSystem.setOut(capture);\n\t\t\tSystem.setErr(capture);\n\t\n\t\t\t// Compile source file.\n\t\t\tJavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n\t\t\tint result = compiler.run(null, capture, capture, Paths.get(target.toString(), \"/Main.java\").toString());\n\t\t\t\n\t\t\tif (result == 0) { // Successful compile, execute.\n\t\t\t\t// Load and instantiate compiled class.\n\t\t\t\tWhitelistClassLoader classLoader = new WhitelistClassLoader(\n\t\t\t\t\t\tURLClassLoader.newInstance(new URL[] { new URL(Paths.get(target).toUri() +\"/\") }));\n\t\t\n\t\t\t\t// Run\n\t\t\t\t// FIXME: Execute in separate JVM.\n\t\t\t\t// FIXME: Kill off if running for too long.\n\t\t String progClass = \"Main\";\n\t\t String[] args = {};\n\t\t Class<?> clazz = classLoader.loadClass(progClass);\n\t\t Class<?> mainArgType[] = { (new String[0]).getClass() };\n\t\t Method main = clazz.getMethod(\"main\", mainArgType);\n\t\t Object argsArray[] = { args };\n\t\t main.invoke(null, argsArray);\n\t\t\t}\n\t\t\t\n\t // Return output of last successful command\n\t\t\treturn Response.ok(baos.toString()).build();\n\t\t} finally {\n\t // Replace stdout\n\t System.out.flush();\n\t System.err.flush();\n\t \n\t System.setOut(stdout);\n\t System.setErr(stderr);\n\t\t}\n\t}",
"private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }",
"public static void main(String[] args)\r\n\t{\n\t\tSystem.out.println(\"Jon Heard's JVM Assembler\");\r\n\t\tSystem.out.println(\"version \" + VERSION);\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\tSystem.out.println(\" ('-help' or '-h' for help)\");\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\t/// Parse arguments\r\n\t\tboolean error = false;\r\n\t\tboolean helpTextPrinted = false;\r\n\t\tString sourceFileName = \"\";\t\t\r\n\t\tfor(String arg : args)\r\n\t\t{\r\n\t\t\tif(arg.startsWith(\"-\"))\r\n\t\t\t{\r\n\t\t\t\tif(arg.equals(\"-help\") || arg.equals(\"-h\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tprintHelpText();\r\n\t\t\t\t\thelpTextPrinted = true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\t\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(!sourceFileName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsourceFileName = arg;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(error || helpTextPrinted) return;\r\n\r\n\t\t/// Make sure we have a source file to load\r\n\t\tif(args.length < 1)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"ERROR: A sourcefile must be included.\");\r\n\t\t\tSystem.err.println(\"\\tExample: \");\r\n\t\t\tSystem.err.println(\"\\tjvmasm MySource.asm\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Make sure the source file exists\r\n\t\tFile sourceFile = new File(sourceFileName);\r\n\t\tif(!sourceFile.exists())\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"' does not exist.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Load the source file into a string\r\n\t\tString sourceData = UtilMethods.fileToString(sourceFileName);\r\n\t\tif(sourceData == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Unable to load the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Parse the source file into a ClassRep object\r\n\t\tClassParser parser = new ClassParser();\r\n\t\tClassRep classRep = parser.parseSource(sourceFileName, sourceData);\r\n\t\tif(classRep == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to parse source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/// Store the ClassRep into a class file\r\n\t\tString classFileName = classRep.getName() + \".class\";\r\n\t\tif(!UtilMethods.byteArrayToFile(\r\n\t\t\t\tclassRep.getJvmBytes(), classFileName))\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to write class file '\" + classFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t}",
"@InterfaceAudience.Public\n Reducer compileReduce(String source, String language);",
"private Path compileTestClass(\n String packageName, String classname, String classSource, Path destinationDir)\n throws FileCompiler.FileCompilerException {\n // TODO: The use of FileCompiler is temporary. Should be replaced by use of SequenceCompiler,\n // which will compile from source, once it is able to write the class file to disk.\n Path sourceFile;\n try {\n sourceFile = javaFileWriter.writeClassCode(packageName, classname, classSource);\n } catch (RandoopOutputException e) {\n throw new RandoopBug(\"Output error during flaky-test filtering\", e);\n }\n FileCompiler fileCompiler = new FileCompiler();\n fileCompiler.compile(sourceFile, destinationDir);\n return sourceFile;\n }",
"public void execute()\n throws BuildException\n {\n if (_resinHome == null)\n throw new BuildException(\"resinHome is required by jspc\");\n\n if (_rootDirectory == null)\n throw new BuildException(\"rootDirectory is required by jspc\");\n\n File resinJar = new File(_resinHome,\n \"lib\" + File.separatorChar + \"resin.jar\");\n\n if (! resinJar.exists())\n throw new BuildException(\"resinHome '\"\n + _resinHome\n + \"' does not appear to be valid\");\n\n Java java = new Java(this);\n java.setFailonerror(true);\n java.setFork(true);\n java.setJar(resinJar);\n\n List<String> args = new ArrayList<String>();\n args.add(\"jspc\");\n args.add(\"-app-dir\");\n args.add(_rootDirectory.getPath());\n\n for (String arg : args)\n java.createArg().setLine(arg);\n\n log(java.getCommandLine().toString(), _level.intValue());\n\n java.executeJava();\n }",
"private void buildClassPath() throws InterruptedException, IOException, CheckedAnalysisException {\n IClassPathBuilder builder = classFactory.createClassPathBuilder(bugReporter);\n\n for (String path : project.getFileArray()) {\n builder.addCodeBase(classFactory.createFilesystemCodeBaseLocator(path), true);\n }\n for (String path : project.getAuxClasspathEntryList()) {\n builder.addCodeBase(classFactory.createFilesystemCodeBaseLocator(path), false);\n }\n\n builder.scanNestedArchives(analysisOptions.scanNestedArchives);\n\n builder.build(classPath, progress);\n\n appClassList = builder.getAppClassList();\n\n if (PROGRESS) {\n System.out.println(appClassList.size() + \" classes scanned\");\n }\n\n // If any of the application codebases contain source code,\n // add them to the source path.\n // Also, use the last modified time of application codebases\n // to set the project timestamp.\n for (Iterator<? extends ICodeBase> i = classPath.appCodeBaseIterator(); i.hasNext();) {\n ICodeBase appCodeBase = i.next();\n\n if (appCodeBase.containsSourceFiles()) {\n String pathName = appCodeBase.getPathName();\n if (pathName != null) {\n project.addSourceDir(pathName);\n }\n }\n\n project.addTimestamp(appCodeBase.getLastModifiedTime());\n }\n\n }",
"public interface JavaCode {\n\n /**\n * Get an unique identification code for an object\n * TODO: This method is not reliable as hash codes are not unique, should use an UUID generator singleton instead.\n *\n * @param obj the object\n * @return the unique identification code\n */\n static int getUniqueID(Object obj) {\n return obj.hashCode();\n }\n\n /**\n * Compiles this code. If an object implements both {@link JavaCode}\n * and {@link JavaExpression}, only one of this method and\n * {@link JavaExpression#compileExpression(Subroutine, JavaScope)} should be called.\n *\n * @param subroutine the subroutine which this code belongs to\n * @param parent the parent scope of this code\n * @throws JTAException if an error occurs\n */\n void compileCode(Subroutine subroutine, JavaScope parent) throws JTAException;\n}",
"private boolean buildFile(IFile file) {\n \t\t/* \n \t\t * We want to compile each source file in .gf with these commands:\n \t\t * i --retain HelloEng.gf\n \t\t * ss -strip -save\n \t\t * \n \t\t * Shell command: echo \"ss -strip -save\" | gf -retain HelloEng.gf\n \t\t */\n \t\tString filename = file.getName();\n \t\tString buildDir = getBuildDirectory(file);\n \t\t\n \t\tArrayList<String> command = new ArrayList<String>();\n \t\tcommand.add(gfPath);\n \t\tcommand.add(\"--retain\");\n \t\tif (USE_INDIVIDUAL_FOLDERS) {\n \t\t\tcommand.add(String.format(\"..%1$s..%1$s%2$s\", java.io.File.separator, filename));\n \t\t} else {\n \t\t\tcommand.add(\"..\" + java.io.File.separator + filename);\n \t\t}\n \t\t\n \t\ttry {\n \t\t\t// Check the build directory and try to create it\n \t\t\tFile buildDirFile = new File(buildDir);\n \t\t\tif (!buildDirFile.exists()) {\n \t\t\t\tbuildDirFile.mkdir();\n \t\t\t}\n \t\t\t\n \t\t\t// Piece together our GF process\n \t\t\tProcessBuilder b = new ProcessBuilder(command);\n \t\t\tb.directory(buildDirFile);\n //\t\t\tb.redirectErrorStream(true);\n \t\t\tProcess process = b.start();\n \t\t\t\n \t\t\t// Feed it our commands, then quit\n \t\t\tBufferedWriter processInput = new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));\n \t\t\tprocessInput.write(\"ss -strip -save\");\n \t\t\tprocessInput.newLine();\n \t\t\tprocessInput.flush();\n \t\t\tprocessInput.write(\"quit\");\n \t\t\tprocessInput.newLine();\n \t\t\tprocessInput.flush();\n \t\t\t\n //\t\t\tBufferedReader processError = new BufferedReader(new InputStreamReader(process.getErrorStream()));\n //\t\t\tString err_str;\n //\t\t\twhile ((err_str = processError.readLine()) != null) {\n//\t\t\t\tSystem.out.println(err_str);\n //\t\t\t}\n \t\t\tBufferedReader processOutput = new BufferedReader(new InputStreamReader(process.getInputStream()));\n \t\t\tString out_str;\n \t\t\twhile ((out_str = processOutput.readLine()) != null) {\n\t\t\t\tSystem.out.println(out_str);\n \t\t\t}\n \t\t\t\n \t\t\t// Tidy up\n \t\t\tprocessInput.close();\n //\t\t\tprocessOutput.close();\n \t\t\tprocess.waitFor();\n \t\t\treturn true;\n \t\t\t\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (InterruptedException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\treturn false;\t\t\n \t}",
"public boolean openAndCompile(final File file)\n {\n if(!this.openFile(file))\n {\n return false;\n }\n\n return this.compile();\n }",
"public static String run(Compilation compilation) throws Exception {\n\t\tfor (String code : compilation.jFiles) {\n\t\t\tClassFile classFile = new ClassFile();\n\t\t\tclassFile.getClassName();\n\t\t\tclassFile.readJasmin(new StringReader(code), \"\", false);\n\t\t\tPath outputPath = tempDir.resolve(classFile.getClassName() + \".class\");\n\t\t\ttry (OutputStream output = Files.newOutputStream(outputPath)) {\n\t\t\t\tclassFile.write(output);\n\t\t\t}\n\t\t}\n\n\t\treturn runJavaClass(tempDir, JasminTemplate.MAIN_CLASS_NAME);\n\t}",
"private void compileResource(IResource resource, IProgressMonitor monitor) {\n\t\tif (resource instanceof IFile) {\n\n\t\t\tmonitor.subTask(Messages.AssemblyBuilder_Compiling + resource.getName());\n\n\t\t\tICompiler compiler = null;\n\t\t\tdeleteMarkers((IFile) resource);\n\n\t\t\tIPreferenceStore store = new PropertyStore(resource, AssemblyEditorPlugin.getDefault().getPreferenceStore(),\n\t\t\t\t\tAssemblyEditorPlugin.PLUGIN_ID);\n\n\t\t\tString ext = resource.getFileExtension();\n\t\t\tString[] customSettings = getCustomCompileOptions(resource);\n\t\t\tif (EXT_ASM.equalsIgnoreCase(ext) || EXT_INC.equalsIgnoreCase(ext)) {\n\t\t\t\tString compilername = customSettings[0] != null ? customSettings[0]\n\t\t\t\t\t\t: store.getString(PreferenceConstants.P_COMPILER);\n\n\t\t\t\tif (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_64TASS)) {\n\t\t\t\t\tcompiler = new TAssCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_AS65)) {\n\t\t\t\t\tcompiler = new As65Compiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_CA65)) {\n\t\t\t\t\tcompiler = new CA65Compiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_DASM)) {\n\t\t\t\t\tcompiler = new DAsmCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_SNAsm)) {\n\t\t\t\t\tcompiler = new SNAsmCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_TMPX)) {\n\t\t\t\t\tcompiler = new TMPxCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_XA)) {\n\t\t\t\t\tcompiler = new XACompiler();\n\t\t\t\t}\n\t\t\t} else if (EXT_MDC.equalsIgnoreCase(ext)) {\n\t\t\t\tcompiler = new MakeDiskCompiler();\n\t\t\t} else if (EXT_DIS.equalsIgnoreCase(ext)) {\n\t\t\t\tcompiler = new DiskImageBuilder();\n\t\t\t}\n\n\t\t\tif (compiler != null) {\n\t\t\t\tif (!EXT_INC.equalsIgnoreCase(ext)) {\n\t\t\t\t\tcompiler.compile(resource, new AssemblyErrorHandler(), monitor, store, null, customSettings[1]);\n\t\t\t\t\tString postProcessor = customSettings[2] != null ? customSettings[2]\n\t\t\t\t\t\t\t: store.getString(PreferenceConstants.P_POSTPROCESSORPATH);\n\t\t\t\t\tif (postProcessor != null && postProcessor.length() != 0) {\n\t\t\t\t\t\tIResource prg = resource.getParent().findMember(\n\t\t\t\t\t\t\t\tresource.getFullPath().removeFileExtension().addFileExtension(\"prg\").lastSegment());\n\t\t\t\t\t\tif (prg != null) {\n\t\t\t\t\t\t\tnew PostProcessorCompiler().compile(prg, new AssemblyErrorHandler(), monitor, store,\n\t\t\t\t\t\t\t\t\tcustomSettings[2], customSettings[3]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taddDependencies(resource, compiler, monitor);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Compile dependent resources\n\t\t\t */\n\t\t\tSet<String> dependencies = ResourceDependencies.getInstance().get(resource);\n\t\t\tif (dependencies != null) {\n\t\t\t\tfor (String dependent : dependencies) {\n\t\t\t\t\tIResource res = resource.getWorkspace().getRoot().findMember(dependent);\n\t\t\t\t\tif (res != null) {\n\t\t\t\t\t\t// System.out.println(\"Compiling dependent resource \"\n\t\t\t\t\t\t// + res.getName());\n\t\t\t\t\t\tthis.compileResource(res, monitor);\n\t\t\t\t\t}\n\t\t\t\t\tif (monitor.isCanceled()) {\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 parseFile(File file) throws IOException {\r\n if (file.isDirectory()) {\r\n for (File subFile : file.listFiles()) {\r\n if (subFile.isDirectory() || subFile.getName().endsWith(\".java\")) {\r\n parseFile(subFile);\r\n }\r\n }\r\n } else {\r\n parseSourceCode(new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8));\r\n }\r\n }",
"public ProcessingResult processHtmlAndJava(String htmlFragment, String... javaFragments) throws Exception {\n \t\tcompiler = new JavaSourceCompiler();\r\n \r\n Object fixture = null;\r\n \r\n for (String javaFragment : javaFragments) {\r\n \tfixture = compile(javaFragment);\t\r\n\t\t}\r\n \r\n return process(htmlFragment, fixture);\r\n }",
"protected void onCompileInternal() {\r\n\t}",
"private Header [] loadSource(String name, Header [] list, Header header, final boolean force)\r\n {\r\n int pos;\r\n int depth = header.depth;\r\n File file = null;\r\n\r\n name = name.trim();\r\n\r\n for(pos = 0; pos < list.length && list[pos] != header; pos++);\r\n\r\n String path = list[pos].name.substring(0, list[pos].name.lastIndexOf('\\\\'));\r\n\r\n // look in sdk's root directory\r\n if ((file = getFile(Parser.jdkSource, name)) != null)\r\n {\r\n if (Parser.jdkSource.compareToIgnoreCase(path) != 0)\r\n depth++;\r\n }\r\n\r\n // look in package\r\n if (file == null)\r\n {\r\n file = getFile(path, name);\r\n }\r\n\r\n // look in imports\r\n for (int j = 0; j < header.imports.length && file == null; j++)\r\n {\r\n String st = header.imports[j];\r\n int last = st.lastIndexOf('.') + 1;\r\n\r\n if (st.substring(last).compareToIgnoreCase(name) == 0)\r\n st = st.substring(0, last);\r\n\r\n if (st.endsWith(\".\"))\r\n st = st.substring(0, st.length() - 1);\r\n\r\n for (int k = -1; (k = st.indexOf('.')) >= 0; )\r\n st = st.substring(0, k) + '\\\\' + st.substring(k + 1);\r\n\r\n st = jdkSource + '\\\\' + st;\r\n\r\n file = getFile(st, name);\r\n\r\n if (file != null)\r\n depth++;\r\n }\r\n\r\n if (file != null)\r\n {\r\n String st = file.getAbsolutePath();\r\n\r\n // already loaded?\r\n for(int k = 0; k < list.length; k++)\r\n if (list[k].name.compareToIgnoreCase(st) == 0)\r\n {\r\n file = null;\r\n return list;\r\n }\r\n\r\n if (file != null)\r\n {\r\n File desc = new File(st.substring(0, st.lastIndexOf('.') + 1) + 'h');\r\n File fs = new File(st.substring(0, st.lastIndexOf('.') + 1) + \"fs\");\r\n\r\n st = file.getAbsolutePath();\r\n for(int i = 0; i < built.size(); i++)\r\n if (((String)built.get(i)).compareToIgnoreCase(st) == 0)\r\n {\r\n file = desc;\r\n break;\r\n }\r\n\r\n if ((!desc.exists() || !fs.exists() || fs.length() == 0 || fs.lastModified() < file.lastModified() || force) && file != desc)\r\n {\r\n Header [] hh \t= new Pass(file, built, force, gc).compilationUnit(list, depth); // compile\r\n\r\n return hh;\r\n }\r\n else\r\n {\r\n Header [] newList = new Header[list.length + 1];\r\n\r\n for (int k = 0; k < newList.length - 1; k++)\r\n newList[k] = list[k];\r\n System.out.println(desc.getAbsolutePath() + \" will be read!\");\r\n newList[newList.length - 1] = new Header(desc.getAbsolutePath(), depth); // load header\r\n list = newList;\r\n }\r\n }\r\n }\r\n\r\n return list;\r\n }",
"private static List<String> getJavasSourceCodeFiels(Map<String,Object> map){\r\n \t\t\r\n \t\t\r\n \t\tSystem.out.println(\"............\");\r\n \t\tLinkedList<String> list = new LinkedList<String>();\r\n \t\tfor(String key : map.keySet()){\r\n \t\t\tObject o = map.get(key);\r\n \r\n \t\t\t//package...\r\n \t\t\tif(o instanceof IPackageFragment){\r\n \t\t\t\t//System.out.println(\"Package --> \" + key);\r\n \t\t\t\tkey = key.substring(0,key.indexOf('[')).trim();\r\n \t\t\t\tkey = PACKAGE + \"(\" + key + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t\t//class...\r\n \t\t\tif(o instanceof ICompilationUnit){\r\n \t\t\t\t//System.out.println(\"Class --> \" + key);\r\n \t\t\t\tString classname = key.substring(0,key.indexOf('[')).trim();\r\n \t\t\t\tString packagename = key.substring(key.indexOf(PACKAGE),key.indexOf('\\n',key.indexOf(PACKAGE)));\r\n \t\t\t\tkey = CLASS_WITH_MEMBERS + \"(\" + packagename + \",\" + classname + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}//method\r\n \t\t\tif(o instanceof IMethod){\r\n \t\t\t\tSystem.out.println(\"Methode --> \" + key);\r\n \t\t\t\tkey = METHOD + \"(\" + getQueryFromMethod((IMethod)o) + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(o instanceof IField){\r\n \t\t\t\tSystem.out.println(\"Attribut --> \" + key);\r\n \t\t\t\tkey = FIELD + \"(\" + getQueryFromField((IField)o) + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn list;\r\n \t\t\r\n \t\t\r\n \t\t/*\r\n \t\tfor(String key : map.keySet()){\r\n \t\t\tObject o = map.get(key);\r\n \t\t\t//if(o instanceof ISourceAttribute)\r\n \t\t\t\t//System.out.println(\"attribute\");\r\n \t\t\t//if(o instanceof ISourceMethod)\r\n \t\t\t\t//System.out.println(\"methode\");\r\n \t\t\tif(o instanceof IPackageFragment) \r\n \t\t\t\tSystem.out.println(\"Package\");\r\n \t\t\tif(o instanceof ICompilationUnit)\r\n \t\t\t\tSystem.out.println(\"sour code file\");\r\n \t\t\t\t\r\n \t\t\t//\"oldquery or class('voller packagename', klassenname)\"\r\n \t\t\t\t\r\n \t\t\t\t\r\n \t\t\tif(o instanceof IField)\r\n \t\t\t\tSystem.out.println(\"Attribut\");\r\n \t\t\tif(o instanceof IType)\r\n \t\t\t\tSystem.out.println(\"classe also class ... in einem file\");\r\n \t\t\tif(o instanceof IMethod)\r\n \t\t\t\tSystem.out.println(\"Methode\");\r\n \t\t\tif(o instanceof IPackageFragmentRoot) \r\n \t\t\t\tSystem.out.println(\"jar package / src Ordner\");\r\n \t\t\tif(o instanceof IProject)\r\n \t\t\t\tSystem.out.println(\"Projekt Ordner\");\r\n \t\t\tif(o instanceof IClassFile)\r\n \t\t\t\tSystem.out.println(\"ClassFile\");\r\n \t\t\tif(o instanceof IAdaptable) //trieft auch auf viele ander sachen zu\r\n \t\t\t\tSystem.out.println(\"Libaraycontainer\");\r\n \t\t\tif(o instanceof IFile)\r\n \t\t\t\tSystem.out.println(\"file\"); //je nach ausgewlter ansicht knnen file auch *.java datein sein\r\n \t\t\tif(o instanceof IFolder)\r\n \t\t\t\tSystem.out.println(\"folder\");\r\n \t\t\tSystem.out.println(o.getClass());\r\n \t\t\t\r\n \t\r\n \t\t}\r\n \t\treturn null;\r\n \t\t*/\r\n \t}",
"public boolean mustCompile() {\n return true;\n }",
"public void compileScript() {\n // find and prepare by extension\n //\n log.info(\"Compiling script...\");\n Timer engineTimer = new Timer();\n \n engine = EngineHelper.findByFileExtension(scriptExtension, dependencyJarFiles != null && !dependencyJarFiles.isEmpty());\n \n if (engine == null) {\n throw new BlazeException(\"Unable to find script engine for file extension \" + scriptExtension + \". Maybe bad file extension or missing dependency?\");\n }\n\n log.debug(\"Using script engine {}\", engine.getClass().getCanonicalName());\n \n if (!engine.isInitialized()) {\n engine.init(context);\n }\n \n script = engine.compile(context);\n \n log.info(\"Compiled script in {} ms\", engineTimer.stop().millis());\n }",
"public String build(String buildPath, boolean verbose)\n throws RunnerException {\n \n // run the preprocessor\n editor.status.progressUpdate(20);\n String primaryClassName = preprocess(buildPath);\n\n // compile the program. errors will happen as a RunnerException\n // that will bubble up to whomever called build().\n Compiler compiler = new Compiler();\n if (compiler.compile(this, buildPath, primaryClassName, verbose)) {\n size(buildPath, primaryClassName);\n return primaryClassName;\n }\n return null;\n }",
"public boolean compile()\n {\n if(this.compiling.get())\n {\n return false;\n }\n\n this.componentEditor.removeAllTemporaryModification();\n\n final String text = this.componentEditor.getText();\n final Matcher matcher = CompilerEditorPanel.PATTERN_CLASS_DECLARATION.matcher(text);\n\n if(!matcher.find())\n {\n this.printMessage(\"No class declaration !\");\n return false;\n }\n\n final String className = matcher.group(1);\n\n if(this.classManager.isResolved(className))\n {\n this.classManager.newClassLoader();\n }\n\n this.compiling.set(true);\n this.actionCompile.setEnabled(false);\n this.printMessage(className);\n this.informationMessage.append(\"\\ncompiling ...\");\n final byte[] data = text.getBytes();\n final ByteArrayInputStream stream = new ByteArrayInputStream(data);\n this.classManager.compileASMs(this.eventManager, stream);\n return true;\n }",
"private void parse() {\n try {\n SimpleNode rootNode = jmm.parseClass(sourcefile);\n assert rootNode.is(JJTPROGRAM);\n\n SimpleNode classNode = rootNode.jjtGetChild(0);\n assert classNode.is(JJTCLASSDECLARATION);\n\n data.classNode = classNode;\n } catch (FileNotFoundException e) {\n throw new CompilationException(e);\n } catch (ParseException e) {\n throw new CompilationException(\"Parsing Error: \" + e.getMessage(), e);\n }\n }",
"public interface XpCompilerContext {\n\n JavaCompiler getJavaCompiler();\n TagLibraryRegistry getTagLibraryRegistry();\n File getJavaDirectory();\n OutputStream getOut();\n\n}",
"public static void compile(\n String[] arguments)\n throws ParserException, LexerException {\n\n // default destination directory is current working directory\n File destinationDirectory = new File(System.getProperty(\"user.dir\"));\n\n // default destination package is anonymous\n String destinationPackage = \"\";\n\n // default option values\n boolean generateCode = true;\n Verbosity verbosity = Verbosity.INFORMATIVE;\n Strictness strictness = Strictness.STRICT;\n\n // parse command line arguments\n ArgumentCollection argumentCollection\n = new ArgumentCollection(arguments);\n\n // handle option arguments\n for (OptionArgument optionArgument : argumentCollection\n .getOptionArguments()) {\n\n switch (optionArgument.getOption()) {\n\n case DESTINATION:\n destinationDirectory = new File(optionArgument.getOperand());\n break;\n\n case PACKAGE:\n destinationPackage = optionArgument.getOperand();\n break;\n\n case GENERATE:\n generateCode = true;\n break;\n\n case NO_CODE:\n generateCode = false;\n break;\n\n case LENIENT:\n strictness = Strictness.LENIENT;\n break;\n\n case STRICT:\n strictness = Strictness.STRICT;\n break;\n\n case QUIET:\n verbosity = Verbosity.QUIET;\n break;\n\n case INFORMATIVE:\n verbosity = Verbosity.INFORMATIVE;\n break;\n\n case VERBOSE:\n verbosity = Verbosity.VERBOSE;\n break;\n\n case VERSION:\n System.out.println(\"ObjectMacro, part of SableCC version \"\n + Version.VERSION);\n return;\n\n case HELP:\n System.out.println(\"Usage: objectmacro \"\n + Option.getShortHelpMessage() + \" file.objectmacro\");\n System.out.println(\"Options:\");\n System.out.println(Option.getLongHelpMessage());\n return;\n default:\n throw new InternalException(\n \"unhandled option \" + optionArgument.getOption());\n }\n }\n\n switch (verbosity) {\n case INFORMATIVE:\n case VERBOSE:\n System.out.println();\n System.out.println(\n \"ObjectMacro, part of SableCC version \" + Version.VERSION);\n System.out.println(\n \"by Etienne M. Gagnon <[email protected]> and other contributors.\");\n System.out.println();\n break;\n }\n\n // handle text arguments\n if (argumentCollection.getTextArguments().size() == 0) {\n System.out.println(\"Usage: objectmacro \"\n + Option.getShortHelpMessage() + \" file.objectmacro\");\n return;\n }\n else if (argumentCollection.getTextArguments().size() > 1) {\n throw CompilerException.invalidArgumentCount();\n }\n\n // check argument\n TextArgument textArgument\n = argumentCollection.getTextArguments().get(0);\n\n if (!textArgument.getText().endsWith(\".objectmacro\")) {\n throw CompilerException\n .invalidObjectmacroSuffix(textArgument.getText());\n }\n\n File macroFile = new File(textArgument.getText());\n\n if (!macroFile.exists()) {\n throw CompilerException.missingMacroFile(textArgument.getText());\n }\n\n if (!macroFile.isFile()) {\n throw CompilerException.macroNotFile(textArgument.getText());\n }\n\n ObjectMacroFront.compile(macroFile, destinationDirectory,\n destinationPackage, generateCode, strictness, verbosity);\n }",
"public void run() {\n // Initialize\n imports = new HashSet<>();\n lines = new ArrayList<>();\n\n // Read and merge source files\n final File folder = new File(\"src\");\n recurseOverFolder(folder);\n\n // Output to file\n outputFile();\n }",
"private void runBuild(LinkedList<String> featureArgs, IFolder sourceFolder,\r\n\t\t\tIFolder buildFolder) {\r\n\r\n\t\tCPPWrapper cpp = new CPPWrapper();\r\n\r\n\t\tLinkedList<String> compilerArgs = new LinkedList<String>(featureArgs);\r\n\t\tLinkedList<String> fileList = new LinkedList<String>();\r\n\t\ttry {\r\n\t\t\tcreateBuildFolder(buildFolder);\r\n\t\t\tprepareFilesConfiguration(featureArgs, fileList, sourceFolder,\r\n\t\t\t\t\tbuildFolder, cpp);\r\n\r\n\t\t\t// If the typeChefAnalyzes conclude that the user don't want to\r\n\t\t\t// proceeed the compilation in case of error or the user only\r\n\t\t\t// wants preprocess files, return without\r\n\t\t\t// doing it.\r\n\t\t\tif (!continueCompilationFlag) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcompilerArgs.addAll(fileList);\r\n\t\t\tcompilerArgs.add(\"-o\");\r\n\t\t\tcompilerArgs.add(buildFolder.getLocation().toOSString()\r\n\t\t\t\t\t+ File.separator + buildFolder.getName());\r\n\t\t\tcpp.runCompiler(compilerArgs);\r\n\t\t} catch (CoreException e) {\r\n\t\t\tFeatureAnalyzer.getDefault().logError(e);\r\n\t\t}\r\n\t}",
"public static void compile(final File source, final String destinationFolder) throws IOException, ParsingException {\n try (InputStream input = new FileInputStream(source);\n OutputStream output = new FileOutputStream(getDestinationFileName(source, destinationFolder).toFile())) {\n compile(input, output);\n }\n }",
"public void testClasspathFileChange() throws JavaModelException {\n IPath projectPath = env.addProject(\"Project\");\n //$NON-NLS-1$\n env.removePackageFragmentRoot(projectPath, \"\");\n //$NON-NLS-1$\n IPath root = env.addPackageFragmentRoot(projectPath, \"src\");\n env.addExternalJars(projectPath, Util.getJavaClassLibs());\n //$NON-NLS-1$\n env.setOutputFolder(projectPath, \"bin\");\n IPath classTest1 = //$NON-NLS-1$ //$NON-NLS-2$\n env.addClass(//$NON-NLS-1$ //$NON-NLS-2$\n root, //$NON-NLS-1$ //$NON-NLS-2$\n \"p1\", //$NON-NLS-1$ //$NON-NLS-2$\n \"Test1\", //$NON-NLS-1$\n \"package p1;\\n\" + //$NON-NLS-1$\n \"public class Test1 extends Zork1 {}\");\n // not yet on the classpath\n //$NON-NLS-1$\n IPath src2Path = env.addFolder(projectPath, \"src2\");\n //$NON-NLS-1$\n IPath src2p1Path = env.addFolder(src2Path, \"p1\");\n //$NON-NLS-1$ //$NON-NLS-2$\n env.addFile(//$NON-NLS-1$ //$NON-NLS-2$\n src2p1Path, //$NON-NLS-1$ //$NON-NLS-2$\n \"Zork1.java\", //$NON-NLS-1$\n \"package p1;\\n\" + //$NON-NLS-1$\n \"public class Zork1 {}\");\n fullBuild();\n //$NON-NLS-1$ //$NON-NLS-2$\n expectingSpecificProblemFor(classTest1, new Problem(\"src\", \"Zork1 cannot be resolved to a type\", classTest1, 39, 44, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR));\n //----------------------------\n // Step 2\n //----------------------------\n //$NON-NLS-1$\n StringBuffer buffer = new StringBuffer(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\n //$NON-NLS-1$\n buffer.append(\"<classpath>\\n\");\n //$NON-NLS-1$\n buffer.append(\" <classpathentry kind=\\\"src\\\" path=\\\"src\\\"/>\\n\");\n // add src2 on classpath through resource change //$NON-NLS-1$\n buffer.append(\" <classpathentry kind=\\\"src\\\" path=\\\"src2\\\"/>\\n\");\n String[] classlibs = Util.getJavaClassLibs();\n for (int i = 0; i < classlibs.length; i++) {\n //$NON-NLS-1$ //$NON-NLS-2$\n buffer.append(\" <classpathentry kind=\\\"lib\\\" path=\\\"\").append(classlibs[i]).append(\"\\\"/>\\n\");\n }\n //$NON-NLS-1$\n buffer.append(\" <classpathentry kind=\\\"output\\\" path=\\\"bin\\\"/>\\n\");\n //$NON-NLS-1$\n buffer.append(\"</classpath>\");\n boolean wasAutoBuilding = env.isAutoBuilding();\n try {\n // turn autobuild on\n env.setAutoBuilding(true);\n // write new .classpath, will trigger autobuild\n //$NON-NLS-1$\n env.addFile(projectPath, \".classpath\", buffer.toString());\n // ensures the builder did see the classpath change\n env.waitForAutoBuild();\n expectingNoProblems();\n } finally {\n env.setAutoBuilding(wasAutoBuilding);\n }\n }",
"private static boolean writeAndCompile(String className, String implement, String header, String expression) {\n\n\t\t// build the class\n\t\tString classData = String.format(classBase, className, implement, header, expression);\n\t\tString classFileName = className + \".java\";\n\n\t\t// write the .java file\n\t\ttry (PrintWriter out = new PrintWriter(path + classFileName)) {\n\t\t\tout.println(classData);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\n\t\t// compile the file\n\t\tJavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n\t\tint result;\n\n\t\tif (compiler == null) {\n\t\t\tSystem.out.println(\"No Compiler! Trying external tools..\");\n\n\t\t\ttry {\n\t\t\t\tcom.sun.tools.javac.Main javac = new com.sun.tools.javac.Main();\n\t\t\t\tresult = javac.compile(new String[] {path + classFileName});\n\t\t\t} catch (NoClassDefFoundError e) {\n\t\t\t\tSystem.out.println(\"No external tools found!\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t//return false;\n\t\t} else\n\t\t\tresult = compiler.run(null, null, null, path + classFileName);\n\n\t\t// delete the .java file, just because\n\t\ttry {\n\t\t\tnew File(path + classFileName).delete();\n\n\t\t// meh, we tried\n\t\t} catch (Exception e) {}\n\n\t\t// if result is 0, compilation was successful\n\t\treturn result == 0;\n\t}",
"private static void compile(\n File macroFile,\n File destinationDirectory,\n String destinationPackage,\n boolean generateCode,\n Strictness strictness,\n Verbosity verbosity)\n throws ParserException, LexerException {\n\n switch (verbosity) {\n case INFORMATIVE:\n case VERBOSE:\n System.out.println(\"Compiling \\\"\" + macroFile + \"\\\"\");\n break;\n }\n\n Start ast;\n\n try {\n FileReader fr = new FileReader(macroFile);\n BufferedReader br = new BufferedReader(fr);\n PushbackReader pbr = new PushbackReader(br, 1024);\n\n switch (verbosity) {\n case VERBOSE:\n System.out.println(\" Parsing\");\n break;\n }\n\n ast = new Parser(new CustomLexer(pbr)).parse();\n\n pbr.close();\n br.close();\n fr.close();\n }\n catch (IOException e) {\n throw CompilerException.inputError(macroFile.toString(), e);\n }\n\n ObjectMacroFront.globalIndex\n = ObjectMacroFront.verifySemantics(ast, strictness, verbosity);\n\n if (generateCode) {\n ObjectMacroFront.generateIntermediateFile(verbosity,\n destinationDirectory, macroFile);\n }\n\n }",
"@InterfaceAudience.Public\n Mapper compileMap(String source, String language);",
"protected void runLexer()\n\t{\n\t\tString args[] = {input.getAbsolutePath(), \"*.java\", output.getAbsolutePath(), \"0\", \"full\", \"-1\", \"1.0\", \"--in_place\", \"--metadata_light\"};\n\t\tExternalOperation.callScript(\"python2.7\", lexer, args);\n\t}",
"public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java Lexer [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n Lexer scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new Lexer(reader);\n while ( !scanner.zzAtEOF ) scanner.yylex();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }",
"void analyzeJavaProject(IProject project)\r\n\t\t\tthrows CoreException, JavaModelException, MalformedTreeException, BadLocationException {\n\t\tif (!project.isOpen() || !project.isNatureEnabled(\"org.eclipse.jdt.core.javanature\")) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tIJavaProject javaProject = JavaCore.create(project);\r\n\t\tIPackageFragment[] packages = javaProject.getPackageFragments();\r\n\t\tfor (IPackageFragment iPackage : packages) {\r\n\t\t\tif (iPackage.getKind() == IPackageFragmentRoot.K_SOURCE) {\r\n\t\t\t\tif (iPackage.getCompilationUnits().length < 1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\trenamePackageName(iPackage);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void assemble(String filePath) throws Exception {\n\n System.out.println(\"Starting\");\n System.out.println(\"Loading Parser . . .\");\n File inputFile= new File(filePath);\n Parser parser = new Parser(inputFile);\n\n System.out.println(\"Loading SymbolTable . . . \");\n SymbolTable symbolTable = new SymbolTable();\n\n System.out.println(\"Parser first pass . . . \");\n parser.firstPass(symbolTable);\n System.out.println(\"Parser second pass . . . \");\n parser.secondPass(symbolTable);\n\n System.out.println(\"Complete\");\n\n }",
"java.lang.String getSourceFile();",
"public static void main(String[] args) {\n\t\t\n\t\tString sourceNeo4jFolder = SOURCE_NEO4J_FOLDER;\n\t\tif (args.length > 0 && !args[0].isEmpty())\n\t\t\tsourceNeo4jFolder = args[0];\n\t\t\n\t\tString targetNeo4j4jFolder = TARGET_NEO4J_FOLDER;\n\t\tif (args.length > 1 && !args[1].isEmpty())\n\t\t\ttargetNeo4j4jFolder = args[1];\n\t\t\t\n\t\tLinker linker = new Compiler(sourceNeo4jFolder, targetNeo4j4jFolder);\t\t\t\n\t\tlinker.process();\n\t}",
"public abstract ILanguageProtocol makeInterpreter(String source, String replQualifiedName, String... salixPath) throws IOException, URISyntaxException, Exception;",
"private void compile(SSAProgram prog, String methodName, SSAStatement s) {\n // recommended for debuggability:\n sb.append(\" # \");\n if (s.getRegister() >= 0)\n sb.append(reg(s));\n sb.append(\": \");\n sb.append(s.toString());\n sb.append(\"\\n\");\n\n SSAStatement left, right;\n String special;\n StringBuilder built = new StringBuilder();\n\n left = s.getLeft();\n right = s.getRight();\n\n switch (s.getOp()) {\n // FILLIN (this is the actual code generator!)\n case Unify:\n case Alias:\n break; // Do nothing\n case Parameter:\n int paramPos = (Integer)s.getSpecial();\n if(paramPos > 3) {\n built.append(\" lw $\" + reg(s) + \", \" + (paramPos-3)*wordSize + \"($fp)\\n\"); \n }\n break; \n case Int:\n int intValue = (Integer)s.getSpecial();\n built.append(\" li $\" + reg(s) + \", \" + intValue + \"\\n\");\n break;\n case Print:\n callerSave(-1);\n built.append(crstores);\n built.append(moveRegister(\"a0\", reg(left)));\n built.append(\" jal minijavaPrint\\n\");\n built.append(crloads);\n break;\n case Boolean:\n boolean boolValue = (Boolean)s.getSpecial();\n if(boolValue) {\n built.append(\" li $\" + reg(s) + \", \" + 1 + \"\\n\");\n } else {\n built.append(\" move $\" + reg(s) + \", $zero\\n\");\n }\n break;\n case This:\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n break;\n case Arg:\n int argPos = (Integer)s.getSpecial();\n if(argPos > 3) {\n built.append(\" sw $\" + reg(left) + \", \" + (argPos-4)*wordSize + \"($sp)\\n\"); \n } else {\n built.append(moveRegister(reg(s) ,reg(left)));\n }\n break;\n case Null:\n built.append(\" move $\" + reg(s) + \", $zero\\n\");\n break;\n case NewObj:\n callerSave(freeReg(s));\n built.append(crstores);\n special = (String)s.getSpecial();\n built.append(\" la $a0, mj__v_\" + special + \"\\n\");\n built.append(\" li $a1, \" + objectSize(prog, prog.getClass(special)) + \"\\n\");\n built.append(\" jal minijavaNew\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case NewIntArray:\n callerSave(freeReg(s));\n built.append(crstores);\n built.append(moveRegister(\"a0\", reg(left)));\n built.append(\" jal minijavaNewArray\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case Label:\n special = (String)s.getSpecial();\n built.append(\" .\" + special + \":\\n\");\n break;\n case Goto:\n special = (String)s.getSpecial();\n built.append(\" j .\" + special + \"\\n\");\n break;\n case Branch:\n special = (String)s.getSpecial();\n built.append(\" bne $\" + reg(left) + \", $zero .\" + special +\"\\n\");\n break;\n case NBranch:\n // could change to beqz\n special = (String)s.getSpecial();\n built.append(\" beq $\" + reg(left) + \", $zero, .\" + special +\"\\n\");\n break;\n case Call:\n String clasName = left.getType().toString();\n SSACall call = (SSACall)s.getSpecial();\n String funcName = call.getMethod();\n Vtable vtab = getVtable(prog, prog.getClass(clasName));\n int methodOffset = vtab.methodOffsets.get(funcName);\n callerSave(freeReg(s));\n built.append(crstores);\n built.append(\" move $v0, $\" + reg(left) + \"\\n\");\n built.append(\" lw $v1, ($v0)\\n\");\n built.append(\" lw $v1, \" + (methodOffset*wordSize) + \"($v1)\\n\");\n built.append(\" jal $v1\\n\");\n built.append(\" move $\" + reg(s) + \", $v0\\n\");\n built.append(crloads);\n break;\n case Return:\n built.append(\" move $v0, $\" + reg(left) + \"\\n\");\n built.append(\" j .ret_\" + methodName + \"\\n\");\n break;\n case Member:\n special = (String)s.getSpecial();\n String clname = left.getType().toString();\n int memOffset;\n if(clname.equals(\"int[]\")) {\n memOffset = 0;\n } else {\n memOffset = fieldOffset(prog, prog.getClass(clname), special);\n }\n if(memOffset == 0) {\n built.append(\" lw $\" + reg(s) + \", ($\" + reg(left) + \")\\n\");\n } else {\n built.append(\" lw $\" + reg(s) + \", \" + (wordSize*memOffset) + \"($\" + reg(left) + \")\\n\");\n }\n break;\n case Index:\n built.append(\" mul $v1, $\" + reg(right) + \", 4\\n\");\n built.append(\" add $v1, $v1, 4\\n\");\n built.append(\" add $v1, $v1, $\" + reg(left) + \"\\n\");\n built.append(\" lw $\" + reg(s) + \", ($v1)\\n\");\n break;\n case VarAssg:\n built.append(moveRegister(reg(s), reg(left)));\n break;\n case MemberAssg:\n special = (String)s.getSpecial();\n String className = left.getType().toString();\n int memSOffset = fieldOffset(prog, prog.getClass(className), special);\n built.append(\" sw $\" + reg(right) + \", \" + (memSOffset*wordSize) + \"($\" + reg(left) + \")\\n\");\n built.append(moveRegister(reg(s), reg(right)));\n break;\n case IndexAssg:\n SSAStatement index = (SSAStatement)s.getSpecial();\n built.append(\" mul $v1, $\" + reg(index) + \", 4\\n\");\n built.append(\" add $v1, $v1, 4\\n\");\n built.append(\" add $v1, $v1, $\" + reg(left) + \"\\n\");\n built.append(\" sw $\" + reg(right) + \", ($v1)\\n\");\n built.append(moveRegister(reg(s), reg(right)));\n break;\n case Not:\n built.append(\" seq $\" + reg(s) + \", $zero , $\" + reg(left) + \"\\n\");\n break;\n case Eq:\n built.append(\" seq $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Ne:\n built.append(\" sne $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Lt:\n built.append(\" slt $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Le:\n built.append(\" sle $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Gt:\n built.append(\" sgt $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case Ge:\n built.append(\" sge $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break;\n case And:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n built.append(\" seq $\" + reg(s) + \", $\" + reg(s) + \", 2\\n\");\n break;\n case Or:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n built.append(\" sgt $\" + reg(s) + \", $\" + reg(s) + \", 0\\n\");\n break;\n case Plus:\n built.append(\" add $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Minus:\n built.append(\" sub $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Mul:\n built.append(\" mul $\" + reg(s) + \", $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n break; \n case Div: \n // can change this to one liner after verifying it works\n built.append(\" div $\" + reg(s) + \", $\"+ reg(left) + \", $\" + reg(right) + \"\\n\");\n //built.append(\" mflo $\" + reg(s) + \"\\n\");\n break; \n case Mod:\n // can change to one liner\n //built.append(\" div $\" + reg(left) + \", $\" + reg(right) + \"\\n\");\n //built.append(\" mfhi $\" + reg(s) + \"\\n\");\n built.append(\" rem $\" + reg(s) + \", $\"+ reg(left) + \", $\" + reg(right) + \"\\n\");\n \n break;\n case Store:\n int storeVal = (Integer)s.getSpecial();\n built.append(\" sw $\" + reg(left) + \", -\" + (storeVal+1)*wordSize + \"($fp)\\n\");\n break;\n case Load:\n int loadVal = (Integer)s.getSpecial();\n built.append(\" lw $\" + reg(s) + \", -\" + (loadVal+1)*wordSize + \"($fp)\\n\");\n break;\n default:\n throw new Error(\"Implement MIPS compiler for \" + s.getOp() + \"!\");\n }\n\n sb.append(built);\n }",
"public CompilationBuilder setRecompileGroovySource(boolean recompile) {\n\t\tcompilerConfiguration.setRecompileGroovySource(recompile);\n\t\treturn this;\n\t}",
"public static void pruebaVisitor(String path) {\n\t\ttry {\n\t\t\t/*in = new FileInputStream(f);\n\t\t\tfinal CSharpLexer lexer = new CSharpLexer(CharStreams.fromStream(in, StandardCharsets.UTF_8));\n\t\t\t\n\t // create an instance of myWeb\n\t\t\tCSharpParser parser = new CSharpParser(new CommonTokenStream(lexer));\n\t\t\t\t\n\t\t\tSystem.out.println(\" parser -> \" + parser.toString());\n\t\t\tParseTree tree = parser.compilation_unit();*/\n\t\t\t\n\t\t\tCSharpArchIdFactory factory = CSharpArchIdFactory.eINSTANCE;\n\t\t\tModel model = factory.createModel();\n\t\t\tmodel.setName(\"CSharpModel\");\n\t\t\tprocessFiles(path, model, \"eShopOnWeb-master\");\n\t\t\t\n\t\t\tSystem.out.println(\" modelo -> \" + model);\n\t\t\tResource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;\n\t Map<String, Object> m = reg.getExtensionToFactoryMap();\n\t m.put(\"model\", new XMIResourceFactoryImpl());\n\n\t // Obtain a new resource set\n\t ResourceSet resSet = new ResourceSetImpl();\n\n\t // create a resource\n\t Resource resource = resSet.createResource(URI\n\t .createURI(\"CSharpArchId.model\"));\n\t // Get the first model element and cast it to the right type, in my\n\t // example everything is hierarchical included in this first node\n\t resource.getContents().add(model);\n\t resource.save(Collections.EMPTY_MAP);\n\t \n\t EPLHandler handler = new EPLHandler(null);\n\t //handler.execute(null);\n\t \n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"protected void compileCFile(IModuleToolContext context, File srcFile, File outFile, String cflags) throws IOException {\n\t\tString command = LccInvocation.getLccCommand(context) + \" -A -c \" + cflags + \" -o $\" + EcobuildFileUtil.getCanonicalPath(outFile) + \"$ \" + srcFile.getName();\n\t\tnew LccInvocation(context, context.getModuleSourceFolder(), command, context.getLogger()).invoke();\n\t}",
"public CompilationUnitDeclaration resolve(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit, boolean verifyMethods, boolean analyzeCode, boolean generateCode) {\n return resolve(/* no existing compilation unit declaration*/\n null, sourceUnit, /*no node searcher*/\n null, verifyMethods, analyzeCode, generateCode);\n }",
"public CompilationResult compile(TestConfiguration configuration) {\n TestUtilities.ensureDirectoryExists(new File(configuration.getOptions().get(\"-d\")));\n\n final StringWriter javacOutput = new StringWriter();\n DiagnosticCollector<JavaFileObject> diagnostics = new\n DiagnosticCollector<JavaFileObject>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n Iterable<? extends JavaFileObject> javaFiles =\n fileManager.getJavaFileObjects(configuration.getTestSourceFiles().toArray(new File[]{}));\n\n\n\n //Even though the method compilergetTask takes a list of processors, it fails if processors are passed this way\n //with the message:\n //error: Class names, 'org.checkerframework.checker.interning.InterningChecker', are only accepted if\n // annotation processing is explicitly requested\n //Therefore, we now add them to the beginning of the options list\n final List<String> options = new ArrayList<String>();\n options.add(\"-processor\");\n options.add(PluginUtil.join(\",\", configuration.getProcessors()));\n List<String> nonJvmOptions = new ArrayList<String>();\n for (String option : configuration.getFlatOptions()) {\n if (! option.startsWith(\"-J-\")) {\n nonJvmOptions.add(option);\n }\n }\n options.addAll(nonJvmOptions);\n\n if (configuration.shouldEmitDebugInfo()) {\n System.out.println(\"Running test using the following invocation:\");\n System.out.println(\"javac \" + PluginUtil.join(\" \", options) + \" \"\n + PluginUtil.join(\" \", configuration.getTestSourceFiles()));\n }\n\n JavaCompiler.CompilationTask task =\n compiler.getTask(javacOutput, fileManager, diagnostics, options, new ArrayList<String>(), javaFiles);\n\n /*\n * In Eclipse, std out and std err for multiple tests appear as one\n * long stream. When selecting a specific failed test, one sees the\n * expected/unexpected messages, but not the std out/err messages from\n * that particular test. Can we improve this somehow?\n */\n final Boolean compiledWithoutError = task.call();\n javacOutput.flush();\n return new CompilationResult(compiledWithoutError, javacOutput.toString(), javaFiles,\n diagnostics.getDiagnostics());\n }",
"public void main(ArrayList<String> files) throws IOException {\n\t\tDesignParser.CLASSES = files;\n\t\t\n\t\tthis.model = new Model();\n\n\t\tfor (String className : CLASSES) {\n//\t\t\tSystem.out.println(\"====================\");\n\t\t\t// ASM's ClassReader does the heavy lifting of parsing the compiled\n\t\t\t// Java class\n//\t\t\tSystem.out.println(\"Analyzing: \" + className);\n//\t\t\tSystem.out.println(className + \"[\");\n\t\t\tClassReader reader = new ClassReader(className);\n\t\t\t\t\t\t\n\t\t\t// make class declaration visitor to get superclass and interfaces\n\t\t\tClassVisitor decVisitor = new ClassDeclarationVisitor(Opcodes.ASM5, this.model);\n\t\t\t\n\t\t\t// DECORATE declaration visitor with field visitor\n\t\t\tClassVisitor fieldVisitor = new ClassFieldVisitor(Opcodes.ASM5, decVisitor, this.model);\n\t\t\t\n\t\t\t// DECORATE field visitor with method visitor\n\t\t\tClassVisitor methodVisitor = new ClassMethodVisitor(Opcodes.ASM5, fieldVisitor, this.model);\n\t\t\t\n\t\t\t// TODO: add more DECORATORS here in later milestones to accomplish\n\t\t\t// specific tasks\n\t\t\tClassVisitor extensionVisitor = new ExtensionVisitor(Opcodes.ASM5, methodVisitor, this.model);\n\t\t\t\n\t\t\tClassVisitor implementationVisitor = new ImplementationVisitor(Opcodes.ASM5, extensionVisitor, this.model);\n\t\t\t\t\t\t\n\t\t\tClassVisitor usesVisitor = new UsesVisitor(Opcodes.ASM5, implementationVisitor, this.model);\n\t\t\t\n\t\t\tClassVisitor compositionVisitor = new CompositionVisitor(Opcodes.ASM5, usesVisitor, this.model);\n\t\t\t\n\t\t\t// Tell the Reader to use our (heavily decorated) ClassVisitor to\n\t\t\t// visit the class\n\t\t\treader.accept(compositionVisitor, ClassReader.EXPAND_FRAMES);\n//\t\t\tSystem.out.println(\"\\n]\");\n\t\t}\n//\t\tSystem.out.println(\"End Of Code\");\n\t}",
"public static void beautify(File input, File output) throws IOException,\n\t\t\tParseException {\n\t\tFileInputStream in = new FileInputStream(input);\n\n\t\tCompilationUnit cu;\n\t\ttry {\n\t\t\t// parse the file\n\t\t\tcu = JavaParser.parse(in);\n\n\t\t\torderImports(cu);\n\t\t} finally {\n\t\t\tin.close();\n\t\t}\n\n\t\t// prints the resulting compilation unit to default system output\n\t\tSystem.out.println(cu.toString());\n\t}"
] | [
"0.7577716",
"0.67316514",
"0.66414785",
"0.6333154",
"0.63189644",
"0.6256858",
"0.6254533",
"0.6232894",
"0.6139368",
"0.61387044",
"0.6110356",
"0.6008719",
"0.5975524",
"0.58748376",
"0.5823361",
"0.58140075",
"0.57494515",
"0.57279146",
"0.56896037",
"0.5658057",
"0.56354374",
"0.5629194",
"0.5627335",
"0.5622242",
"0.55698854",
"0.55698854",
"0.55383325",
"0.55255324",
"0.5494603",
"0.54890144",
"0.5462333",
"0.54091793",
"0.5405632",
"0.53711045",
"0.5368684",
"0.5354801",
"0.53493065",
"0.5330273",
"0.53300005",
"0.53220546",
"0.5317666",
"0.5316556",
"0.5316102",
"0.5313996",
"0.53057617",
"0.5297274",
"0.5260374",
"0.52464694",
"0.52185076",
"0.5210923",
"0.5198371",
"0.5198267",
"0.51962525",
"0.51927406",
"0.51821",
"0.51622605",
"0.5153973",
"0.5145515",
"0.5142602",
"0.5138289",
"0.513084",
"0.51286626",
"0.51192355",
"0.51188076",
"0.51166964",
"0.51153374",
"0.51068115",
"0.5104203",
"0.50915533",
"0.50886756",
"0.50867105",
"0.50773036",
"0.506438",
"0.50556225",
"0.50514287",
"0.50389135",
"0.5038346",
"0.50349253",
"0.50312734",
"0.5013648",
"0.500948",
"0.49999976",
"0.49971583",
"0.49967274",
"0.49816507",
"0.4949168",
"0.49450594",
"0.49439844",
"0.49430928",
"0.49418855",
"0.49408415",
"0.49403968",
"0.49321064",
"0.49266192",
"0.4925802",
"0.49194202",
"0.49038202",
"0.48977092",
"0.48894075",
"0.48858705"
] | 0.5700729 | 18 |
extract names of superclass and implemented interfaces | private Vector getExtendImplement(ClassType c)
{
String st;
Vector v = new Vector();
if (c.extend.name != null && c.extend.scope == null)
{
st = c.extend.name.string;
if (!c.unresolved.contains(st))
for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)
{
String s = (String)iter.next();
if (s.endsWith('.' + st))
{
st = s;
break;
}
}
v.add(st);
}
for(int j = 0; j < c.implement.length; j++)
if (c.implement[j].scope == null)
{
st = c.implement[j].name.string;
if (!c.unresolved.contains(st))
for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)
{
String s = (String)iter.next();
if (s.endsWith('.' + st))
{
st = s;
break;
}
}
if (!v.contains(st))
v.add(st);
}
return v;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getInterfaces();",
"char[][] getInterfaceNames();",
"String[] getImplementedInterfacesAsDisplayStrings();",
"public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }",
"TypeInfo[] interfaces();",
"public Collection<ClassTranslator> getInterfaces();",
"public String getInterfaceName();",
"@SuppressWarnings(\"unchecked\")\n public static Stream<String> supers(ClassNode node) {\n if (node.superName == null) { // Object, no interfaces or superclass\n return Stream.empty();\n }\n return Stream.concat(\n Stream.of(node.superName),\n ((List<String>) node.interfaces).stream()\n );\n }",
"public void buildSuperInterfacesInfo() {\n\t\twriter.writeSuperInterfacesInfo();\n\t}",
"private String getBaseInterface(OWLClass owlClass) {\n String baseInterfaceString = \"\";\n for (OWLClass superClass : inference.getSuperClasses(owlClass)) {\n if (inference.getOwlClasses().contains(superClass)) {\n baseInterfaceString += (baseInterfaceString.equals(\"\") ? \"\" : \", \") + names.getInterfaceName(superClass);\n }\n }\n if (baseInterfaceString.equals(\"\")) {\n return null;\n } else {\n return baseInterfaceString;\n }\n }",
"String getExtends();",
"Set<Interface> getInterfaces();",
"char[] getSuperclassName();",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"java.util.List<? extends org.jetbrains.r.classes.S4ClassInfo.S4SuperClassOrBuilder> \n getSuperClassesOrBuilderList();",
"public IEventType<T>[] getSuperTypes();",
"public Set<Class<?>> getUntestedInterfaces() {\n\t\tfinal Set<Class<?>> retval = new TreeSet<Class<?>>(\n\t\t\t\tCLASS_NAME_COMPARATOR);\n\n\t\tfor (final InterfaceInfo info : getInterfaceInfoMap().values()) {\n\t\t\t// no test and has methods\n\t\t\tif (info.getTests().isEmpty() && info.getName().getDeclaredMethods().length > 0) {\n\t\t\t\tretval.add(info.getName());\n\t\t\t}\n\t\t}\n\t\treturn retval;\n\t}",
"java.util.List<org.jetbrains.r.classes.S4ClassInfo.S4SuperClass> \n getSuperClassesList();",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"public static Collection<String> getFQClassNames(IType sigInterfaceType, String typeSignature) {\n\n\t\tSet<String> names = new HashSet<String>();\n\n\t\tgetFQTypeNames(sigInterfaceType, typeSignature, names);\n\n\t\treturn names;\n\t}",
"protected String subobjectInterfaceName(Subobject subobject) {\n return subobject.name();\n }",
"java.util.List<org.mojolang.mojo.lang.NominalType> \n getInheritsList();",
"public InterfaceName getInterfaceName() {\n\t\treturn ifpName;\n\t}",
"public void printDetailsInterfaces(Class clstype, int classdepth) {\n\t\tSystem.out.println(\"Class depth is: \" + classdepth + \" Class Name is: \" + clstype.getName());\n\t\t// Recurse to get super class details\n\t\tif (clstype.getSuperclass() != null) {\n\t\t\t// Get all the details\n\t\t\tprintDetailsInterfaces(clstype.getSuperclass(), classdepth + 1);\n\t\t}\n\t\t// Get all the interfaces that the input class implements.\n\t\tClass[] interfacesimp = clstype.getInterfaces();\n\t\tSystem.out.println(\"Printing the implemented interfaces\");\n\t\tfor (int i = 0; i < interfacesimp.length; i++) {\n\t\t\tprintDetailsInterfaces(interfacesimp[i], classdepth + 1);\n\t\t}\n\t}",
"HashMap<String, Set<URI>> getExternalSuperClasses();",
"org.omg.CORBA.Object _get_interface_def();",
"Name interfaceName(JFXClassDeclaration cDecl) {\n Name name = cDecl.getName();\n if (cDecl.generateClassOnly())\n return name;\n return names.fromString(name.toString() + interfaceSuffix);\n }",
"public static Set<String> getPluginNamesOfType(String interfaceName) { \n if (PLUGINS.get(interfaceName) != null) {\n return PLUGINS.get(interfaceName).keySet();\n }\n \n return null;\n }",
"public void buildImplementedInterfacesInfo() {\n\t\twriter.writeImplementedInterfacesInfo();\n\t}",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"interface I6 extends I5, I4 {\n}",
"public ClassTranslator getSuperclass();",
"public List getInterfaceExtensions();",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"private Map<Class<?>, InterfaceInfo> getInterfaceInfoMap() {\n\t\tif (interfaceInfoMap == null) {\n\t\t\tinterfaceInfoMap = new HashMap<Class<?>, InterfaceInfo>();\n\t\t\tfor (final Class<?> c : packageClasses) {\n\t\t\t\tif (isInterestingInterface(c)) {\n\t\t\t\t\tif (!interfaceInfoMap.containsKey(c)) {\n\t\t\t\t\t\tinterfaceInfoMap.put(c, new InterfaceInfo(c));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfinal Contract contract = c.getAnnotation(Contract.class);\n\t\t\t\t\tif (contract != null) {\n\t\t\t\t\t\tInterfaceInfo ii = interfaceInfoMap.get(contract\n\t\t\t\t\t\t\t\t.value());\n\t\t\t\t\t\tif (ii == null) {\n\t\t\t\t\t\t\tii = new InterfaceInfo(contract.value());\n\t\t\t\t\t\t\tinterfaceInfoMap.put(contract.value(), ii);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tii.add(c);\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn interfaceInfoMap;\n\t}",
"public Object[] getImplementations() {\n\t\tObject[] res = { HackProjectLearner.class };\n\t\treturn res;\n\t}",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"public int[] getInterfaces() {\n return interfaces;\n }",
"public String getSuperclass() {\n\t\treturn null;\n\t}",
"public String interfaceName() {\n return this.innerProperties() == null ? null : this.innerProperties().interfaceName();\n }",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"public Set<JavaType.ClassJavaType> superTypes() {\n ImmutableSet.Builder<JavaType.ClassJavaType> types = ImmutableSet.builder();\n JavaType.ClassJavaType superClassType = (JavaType.ClassJavaType) this.superClass();\n types.addAll(this.interfacesOfType());\n while (superClassType != null) {\n types.add(superClassType);\n TypeJavaSymbol superClassSymbol = superClassType.getSymbol();\n types.addAll(superClassSymbol.interfacesOfType());\n superClassType = (JavaType.ClassJavaType) superClassSymbol.superClass();\n }\n return types.build();\n }",
"public static String interfaceDecl()\n {\n read_if_needed_();\n \n return _interface_decl;\n }",
"public Iterator<IEventType<T>> getDeepSuperTypes();",
"java.util.List<? extends org.mojolang.mojo.lang.NominalTypeOrBuilder> \n getInheritsOrBuilderList();",
"public String toString()\n {\n StringBuffer sb = new StringBuffer();\n\n boolean fInterface = isInterface();\n String sMod = m_flags.toString(fInterface ? ACC_INTERFACE : ACC_CLASS);\n if (sMod.length() > 0)\n {\n sb.append(sMod)\n .append(' ');\n }\n\n sb.append(fInterface ? \"interface \" : \"class \")\n .append(m_clzName.getJavaName());\n\n ClassConstant clzSuper = m_clzSuper;\n if (clzSuper != null)\n {\n String sSuper = clzSuper.getValue();\n if (!sSuper.equals(DEFAULT_SUPER))\n {\n sb.append(\" extends \")\n .append(clzSuper.getJavaName());\n }\n }\n\n if (!m_tblInterface.isEmpty())\n {\n sb.append(fInterface? \" extends \" : \" implements \");\n Enumeration enmr = m_tblInterface.elements();\n boolean fTrailing = false;\n while (enmr.hasMoreElements())\n {\n if (fTrailing)\n {\n sb.append(\", \");\n }\n sb.append(((ClassConstant) enmr.nextElement()).getJavaName());\n fTrailing = true;\n }\n }\n\n return sb.toString();\n }",
"public void buildSubInterfacesInfo() {\n\t\twriter.writeSubInterfacesInfo();\n\t}",
"org.jetbrains.r.classes.S4ClassInfo.S4SuperClassOrBuilder getSuperClassesOrBuilder(\n int index);",
"org.jetbrains.r.classes.S4ClassInfo.S4SuperClass getSuperClasses(int index);",
"private static Stream<Class<?>> superTypes(Class<?> type) {\n Class<?>[] interfaces = type.getInterfaces();\n return Stream.concat(\n Arrays.stream(interfaces).flatMap(SqlObjectFactory::superTypes),\n Arrays.stream(interfaces));\n }",
"EPREFIX_TYPE getSuperType();",
"protected Collection<String> getInitialObjectNames() {\r\n \t\tif (initialObjectNames == null) {\r\n \t\t\tinitialObjectNames = new ArrayList<String>();\r\n \t\t\tfor (EClassifier eClassifier : reqif10Package.getEClassifiers()) {\r\n \t\t\t\tif (eClassifier instanceof EClass) {\r\n \t\t\t\t\tEClass eClass = (EClass)eClassifier;\r\n \t\t\t\t\tif (!eClass.isAbstract()) {\r\n \t\t\t\t\t\tinitialObjectNames.add(eClass.getName());\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tCollections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());\r\n \t\t}\r\n \t\treturn initialObjectNames;\r\n \t}",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"public ArrayList<InterfaceType> getAllInterfaces() {\n HashSet<InterfaceType> set = new HashSet<>();\n ArrayList<InterfaceType> list = new ArrayList<>();\n\n for (InterfaceType interfaceType : getInterfaces()) {\n for (InterfaceType type : interfaceType.getAllInterfaces()) {\n if (set.add(type)) list.add(type);\n }\n }\n\n return list;\n }",
"private static void getClassHierarchy(Class clazz) {\n List<String> classNames = new ArrayList<>();\n while (clazz != null) {\n classNames.add(clazz.getName());\n clazz = clazz.getSuperclass();\n }\n for (int i = classNames.size() - 1; i >= 0; i--) {\n System.out.println(classNames.get(i));\n if (i > 0) {\n System.out.println(\" ^\");\n System.out.println(\" |\");\n }\n }\n }",
"public void visit(ClassOrInterfaceDeclaration arg0, Object arg1) {\n\t \tclassName = arg0.getName();\n\t \tisInterface = arg0.toString().indexOf(\"interface\")!=-1;\n\t \tisAbstract = arg0.toString().indexOf(\"abstract\")!=-1;\n\t \tmyClasses.add(className);\n\t \tfor(Iterator<?> it = arg0.getImplements().iterator(); it.hasNext();)\n\t \t\tinheritance += className + \" ..|> \" + it.next() + \"\\n\";\n\t \tfor(Iterator<?> it = arg0.getExtends().iterator(); it.hasNext();)\n\t \t\tinheritance += className + \" ---|> \" +it.next() + \"\\n\";\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}",
"public String classSignature(ClassLoader loader) {\n\t\tString desc = \"\";\n\t\t\n\t\tList<Pair<String,List<Type.Reference>>> classes = type.components();\n\t\tif(classes.get(classes.size()-1).second().size() > 0) { \n\t\t\tdesc += \"<\"; \n\t\t\tfor(Type t : classes.get(classes.size()-1).second()) {\n\t\t\t\tif(t instanceof Type.Variable) {\n\t\t\t\t\tType.Variable tv = (Type.Variable) t;\n\t\t\t\t\tdesc += tv.variable() + \":\";\n\t\t\t\t\tType lb = tv.lowerBound();\n\t\t\t\t\t// The following check is needed to deal with the case\n\t\t\t\t\t// where the type bounds are only interfaces. In this\n\t\t\t\t\t// case, there must be an extra colon indicating the\n\t\t\t\t\t// absence of super class. It's actually really annoying\n\t\t\t\t\t// since it couples this code with ClassTable ... grrr.\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClazz tmp = loader.loadClass((Type.Clazz) lb);\n\t\t\t\t\t\tif (tmp.isInterface()) {\n\t\t\t\t\t\t\tdesc += \":\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdesc += ClassFile.descriptor(lb, true);\n\t\t\t\t\t} catch (ClassNotFoundException ce) {\n\t\t\t\t\t\tthrow new RuntimeException(\"Type bound \" + lb\n\t\t\t\t\t\t\t\t+ \" not found\");\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new RuntimeException(\"Type Variable required in Class Signature!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tdesc += \">\";\n\t\t}\n\t\tif (superClazz != null) {\n\t\t\tdesc += ClassFile.descriptor(superClazz, true);\n\t\t}\n\t\tfor (Type t : interfaces) {\n\t\t\tdesc += ClassFile.descriptor(t, true);\n\t\t}\n\t\treturn desc;\n\t}",
"public String getClazzName();",
"@Override\n\t\tpublic void visit(int version, int access, String name, String signature, String superName, String[] interfaces) \n\t\t{\n\t\t\tsuper.visit(version, Constants.ACC_PUBLIC, className, (String)null, this.superType.getInternalName(), interfaces);\n\t\t}",
"@JsonIgnore\n public List<String> getAncestorTypeNames() {\n if(ancestorDefs != null && !ancestorDefs.isEmpty()) {\n return ancestorDefs.values().stream().map(type -> type.asTypeString()).collect(Collectors.toList());\n } else if (ancestors != null) {\n return ancestors;\n } else {\n return new ArrayList<>();\n }\n }",
"public interface Text {\n \n /**\n * Method find name of class which object are instance\n * @return \n */\n String getStringClass();\n\n @Override\n public String toString();\n \n \n \n}",
"private List<JCExpression> makeAdditionalImports(DiagnosticPosition diagPos, List<ClassSymbol> baseInterfaces) {\n ListBuffer<JCExpression> additionalImports = new ListBuffer<JCExpression>();\n for (ClassSymbol baseClass : baseInterfaces) {\n if (baseClass.type != null && baseClass.type.tsym != null &&\n baseClass.type.tsym.packge() != syms.unnamedPackage) { // Work around javac bug. the visitImport of Attr \n // is casting to JCFieldAcces, but if you have imported an\n // JCIdent only a ClastCastException is thrown.\n additionalImports.append(toJava.makeTypeTree(baseClass.type, diagPos, false));\n additionalImports.append(toJava.makeTypeTree(baseClass.type, diagPos, true));\n }\n }\n return additionalImports.toList();\n }",
"interface NewInterface extends Interface1,Interface2,Interface3{\n\n\tpublic void getD();\n\n}",
"Interface_decl getInterface();",
"public ArrayList<String> getNamesOfClasses(OWLOntology ontology){\n\t\t\n\t\tArrayList<String> classes = new ArrayList<String>();\n\t\tfor (OWLClass cls : ontology.getClassesInSignature())\n\t\t\tclasses.add( cls.getIRI().getFragment() );\n\t\t\t\n\t\treturn classes;\n\t}",
"public void visit(int version, int access, String name, String signature,\n String superName, String[] interfaces) {\n //if (cv != null) {\n //cv.visit(version, access, name, signature, superName, interfaces);\n className = name;\n super.visit(version, access, name, signature, superName, interfaces);\n // in order to get the class name as the owner\n //}\n }",
"private static Class<?>[] getAllInterfacesForClass(Class<?> clazz) {\n return getAllInterfacesForClass(clazz, null);\n }",
"public abstract String getSimpleName( );",
"interface InterfaceChild extends InterfaceParent {\n default String introduce() {\n return \"InterfaceChild\";\n }\n}",
"public Interface[] getInterfaces(final String name) {\n final Outage out = getOutage(name);\n if (out == null) return null;\n return out.getInterface();\n }",
"private static void getFQTypeNames(IType sigInterfaceType, String typeSig, Set<String> names) {\n\n\t\t//removes array signature\n\t\ttypeSig = removeArraySignature(typeSig);\n\t\t\n\t\t//checks if it is a primitive type\n\t\tif (isPrimitive(typeSig)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString typeName = Signature.getSignatureSimpleName(Signature.getTypeErasure(typeSig));\n\t\tString qualifier = Signature.getSignatureQualifier(typeSig);\n\n\t\tString fqName;\n\t\tif (qualifier != null && qualifier.length() > 0) {\n\t\t\tfqName = qualifier + \".\" + typeName;\n\t\t}\n\t\telse {\n\t\t\tString resolvedQualifier = resolveQualifierFromTypeName(sigInterfaceType, typeName);\n\t\t\tif (resolvedQualifier != null) {\n\t\t\t\tfqName = resolvedQualifier + \".\" + typeName;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfqName = typeName;\n\t\t\t}\n\t\t}\n\n\t\tnames.add(fqName);\n\n\t\tfor (String argType : Signature.getTypeArguments(typeSig)) {\n\n\t\t\tgetFQTypeNames(sigInterfaceType, argType, names);\n\t\t}\n\n\t}",
"@Override \n public String toString() {\n return getName() + \"(\" + getClass().getName() + \")\";\n }",
"XClass getSuperclass();",
"private Stream<Element> superTypeForInheritDoc(JavacTask task, Element type) {\n TypeElement clazz = (TypeElement) type;\n Stream<Element> result = interfaces(clazz);\n result = Stream.concat(result, interfaces(clazz).flatMap(el -> superTypeForInheritDoc(task, el)));\n\n if (clazz.getSuperclass().getKind() == TypeKind.DECLARED) {\n Element superClass = ((DeclaredType) clazz.getSuperclass()).asElement();\n result = Stream.concat(result, Stream.of(superClass));\n result = Stream.concat(result, superTypeForInheritDoc(task, superClass));\n }\n\n return result;\n }",
"public static Iterable<String> getInterfacesImplementedByArrays() {\n return Collections.unmodifiableList(Arrays.asList(INTERFACES_IMPLEMENTED_BY_ARRAYS));\n }",
"private void interfaceDeclaration(Modifier modify, Scope scope, String basename)\r\n {\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n x.modify = (x.modify & ~Keyword.CLASSSY.value) | Keyword.INTERFACESY.value;\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n matchKeyword(Keyword.INTERFACESY);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modify.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modify.check(modify.interfaces | modify.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n x.extend = new ClassType(\"Object\");//!!!!!!!!!!!!!!!!!!!\r\n x.scope = new Scope(scope, Scope.heap, x.name.string);\r\n\r\n if ((modify.cur & modify.constructors) == 0)\r\n modify.cur |= Keyword.PUBLICSY.value & modify.access;\r\n\r\n interfaceBody(modify, x);\r\n\r\n unresolved = dummy;\r\n writeList(x);\r\n }",
"static private void\n ifaces(final Class<?> type, final ArrayBuilder<String> r) {\n if (type == Serializable.class) { return; }\n if (Modifier.isPublic(type.getModifiers())) {\n try { r.append(Reflection.getName(type).replace('$', '-')); }\n catch (final Exception e) {}\n }\n for (final Class<?> i : type.getInterfaces()) { ifaces(i, r); }\n }",
"public ITool getSuperClass();",
"public interface C0389gj extends C0388gi {\n}",
"public interface AbstractC2502fH1 extends IInterface {\n}",
"@Override\n public String toString() {\n return getClass().getSimpleName() + \"[\" + _name + \"]\";\n }",
"static String getTitle(Class<?> type) {\n while (type.isAnonymousClass()) {\n type = type.getSuperclass();\n }\n return type.getSimpleName();\n }",
"public Collection<Interface> getInterfaces() {\n\t\treturn this.interfaces;\n\t}",
"private Set<ExecutableElement> getHookMethodsFromInterfaces() {\n return component\n .getInterfaces()\n .stream()\n .map(DeclaredType.class::cast)\n .map(DeclaredType::asElement)\n .map(TypeElement.class::cast)\n .flatMap(typeElement -> ElementFilter\n .methodsIn(typeElement.getEnclosedElements())\n .stream())\n .filter(method -> hasAnnotation(method, HookMethod.class))\n .peek(this::validateHookMethod)\n .collect(Collectors.toSet());\n }",
"public interface Debug {\n String getClassName();\n}",
"public Enumeration getMethodNames()\n {\n final EnumerationUnion eu = new EnumerationUnion();\n if( methods != null )\n {\n eu.add( methods.keys() );\n }\n if( ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n eu.add( clazz.getMethodNames() );\n }\n }\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n eu.add( object.getMethodNames() );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n return eu;\n }",
"String getSimpleName();",
"String getSimpleName();",
"public interface B{\n String getName();\n}",
"public static Set<String> getJunctionNames() {\r\n return namedJunctionClasses.keySet();\r\n }",
"protected abstract void registerSuperTypes();",
"public Enumeration getPropertyNames()\n {\n final EnumerationUnion eu = new EnumerationUnion();\n if( properties != null )\n {\n eu.add( properties.keys() );\n }\n if( ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n eu.add( clazz.getPropertyNames() );\n }\n }\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n eu.add( object.getPropertyNames() );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n return eu;\n }",
"public static Set<Class<?>> getInterfaceClosure(Class<?> clazz) {\n Set<Class<?>> result = new HashSet<>();\n for (Class<?> classToDiscover = clazz; classToDiscover != null; classToDiscover = classToDiscover.getSuperclass()) {\n addInterfaces(classToDiscover, result);\n }\n return result;\n }",
"public abstract String[] names() throws TrippiException;",
"public String getEjbInterface();",
"public abstract List<AbstractNodeTypeImplementation> getImplementations();",
"public interface Classifier extends NamedDisplayElement {\n}",
"int getSuperClassesCount();",
"public Class getImplementedInterface()\n {\n // This method will be autogenerated for user classes.\n return G2__Base.class; \n }",
"@Override\n public String toString() {\n int t = 0;\n while (true) {\n final Class<?> type;\n switch (t++) {\n case 0: type = Hints.class; break;\n case 1: type = getValueClass(); break;\n default: return super.toString();\n }\n final String name = nameOf(type, this);\n if (name != null) {\n return name;\n }\n }\n }"
] | [
"0.72670364",
"0.7024988",
"0.69442004",
"0.66271675",
"0.64971316",
"0.62296915",
"0.61741936",
"0.61617064",
"0.61105233",
"0.591801",
"0.58865654",
"0.58704823",
"0.5829475",
"0.57658213",
"0.5755797",
"0.5747834",
"0.5718753",
"0.56863725",
"0.5658786",
"0.5658007",
"0.56467474",
"0.5638435",
"0.5634757",
"0.56231433",
"0.5603007",
"0.56020385",
"0.5592181",
"0.55817354",
"0.5552474",
"0.55332047",
"0.5528995",
"0.55150956",
"0.54999185",
"0.5496387",
"0.5485659",
"0.5477536",
"0.5473836",
"0.5471947",
"0.54542476",
"0.54462063",
"0.5424575",
"0.54102916",
"0.53848785",
"0.53451073",
"0.53445274",
"0.53370416",
"0.5290421",
"0.5272118",
"0.5271515",
"0.52559733",
"0.52558666",
"0.52470255",
"0.5245964",
"0.523162",
"0.522943",
"0.5223123",
"0.52188253",
"0.52151775",
"0.5213212",
"0.52022487",
"0.5195844",
"0.5192175",
"0.5190625",
"0.5185607",
"0.51736903",
"0.5171777",
"0.51641667",
"0.5155081",
"0.5151616",
"0.51414746",
"0.51357913",
"0.5134082",
"0.5133421",
"0.5119444",
"0.51169586",
"0.51160455",
"0.5109709",
"0.5106706",
"0.510405",
"0.509106",
"0.50808597",
"0.5069587",
"0.5051574",
"0.50475484",
"0.50468844",
"0.5035115",
"0.50337285",
"0.50337285",
"0.50315493",
"0.5023988",
"0.50204015",
"0.5020231",
"0.5009935",
"0.5009217",
"0.49975464",
"0.49922544",
"0.49792477",
"0.49762934",
"0.49625623",
"0.49604282"
] | 0.52808046 | 47 |
load header of dependent file or compile dependend file | private Header [] loadSource(String name, Header [] list, Header header, final boolean force)
{
int pos;
int depth = header.depth;
File file = null;
name = name.trim();
for(pos = 0; pos < list.length && list[pos] != header; pos++);
String path = list[pos].name.substring(0, list[pos].name.lastIndexOf('\\'));
// look in sdk's root directory
if ((file = getFile(Parser.jdkSource, name)) != null)
{
if (Parser.jdkSource.compareToIgnoreCase(path) != 0)
depth++;
}
// look in package
if (file == null)
{
file = getFile(path, name);
}
// look in imports
for (int j = 0; j < header.imports.length && file == null; j++)
{
String st = header.imports[j];
int last = st.lastIndexOf('.') + 1;
if (st.substring(last).compareToIgnoreCase(name) == 0)
st = st.substring(0, last);
if (st.endsWith("."))
st = st.substring(0, st.length() - 1);
for (int k = -1; (k = st.indexOf('.')) >= 0; )
st = st.substring(0, k) + '\\' + st.substring(k + 1);
st = jdkSource + '\\' + st;
file = getFile(st, name);
if (file != null)
depth++;
}
if (file != null)
{
String st = file.getAbsolutePath();
// already loaded?
for(int k = 0; k < list.length; k++)
if (list[k].name.compareToIgnoreCase(st) == 0)
{
file = null;
return list;
}
if (file != null)
{
File desc = new File(st.substring(0, st.lastIndexOf('.') + 1) + 'h');
File fs = new File(st.substring(0, st.lastIndexOf('.') + 1) + "fs");
st = file.getAbsolutePath();
for(int i = 0; i < built.size(); i++)
if (((String)built.get(i)).compareToIgnoreCase(st) == 0)
{
file = desc;
break;
}
if ((!desc.exists() || !fs.exists() || fs.length() == 0 || fs.lastModified() < file.lastModified() || force) && file != desc)
{
Header [] hh = new Pass(file, built, force, gc).compilationUnit(list, depth); // compile
return hh;
}
else
{
Header [] newList = new Header[list.length + 1];
for (int k = 0; k < newList.length - 1; k++)
newList[k] = list[k];
System.out.println(desc.getAbsolutePath() + " will be read!");
newList[newList.length - 1] = new Header(desc.getAbsolutePath(), depth); // load header
list = newList;
}
}
}
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void loadHeader() {\n\r\n\t}",
"public IAstPreprocessorIncludeDirective findInclude(ISourceFile file);",
"public IAstSourceFile findIncludeFile(String string);",
"public IAstSourceFile findIncludeFile(ISourceFile file);",
"public abstract Source load(ModuleName name);",
"private void loadNavHeader() {\n // name, website\n txtName.setText(\"Ashish Jain\");\n txtWebsite.setText(\"[email protected]\");\n\n navigationView.getMenu().getItem(3).setActionView(R.layout.menu_dot);\n }",
"@Incremental\n @InputFiles\n @PathSensitive(PathSensitivity.NAME_ONLY)\n protected FileCollection getHeaderDependencies() {\n return incrementalCompiler.getHeaderFiles();\n }",
"public void load(File source);",
"HttpRequest(){\n HttpHeader.getInstance().loadHeaderList(\"src/main/resources/headerList.txt\");\n }",
"private void setupHeader(final String filePath) throws IOException{\n\t\tFile headerFile = new File(filePath);\n\t\tString dataString = new String();\n\t\tBufferedReader reader = new BufferedReader(new FileReader(headerFile));\n\t\twhile((dataString = reader.readLine()) != null){\n\t\t\theaderText.append(dataString);\n\t\t\theaderText.append(System.lineSeparator());\n\t\t}\n\t\treader.close();\n\t}",
"public boolean isHeaderFile(String ext);",
"private void loadNavHeader() {\n // name, website\n txtName.setText(StoreData.LoadString(Constants.NAME,\"Anonymous\",getApplicationContext()));\n txtWebsite.setText(StoreData.LoadString(Constants.EMAIL,\"anonymous\",getApplicationContext()));\n urlProfileImg = StoreData.LoadString(Constants.IMGURL,\"\",getApplicationContext());\n // loading header background image\n Glide.with(this).load(urlNavHeaderBg)\n .crossFade()\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imgNavHeaderBg);\n\n // Loading profile image\n Glide.with(this).load(urlProfileImg)\n .crossFade()\n .placeholder(R.drawable.anonymous_profile_pic)\n .error(R.drawable.anonymous_profile_pic)\n .thumbnail(0.5f)\n .bitmapTransform(new CircleTransform(this))\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imgProfile);\n\n // showing dot next to notifications label\n navigationView.getMenu().getItem(3).setActionView(R.layout.menu_dot);\n }",
"private void loadNavHeader() {\n\t\t// name, Email\n\t\ttxtName.setText(\"Tester\");\n\t\ttxtEmail.setText(\"[email protected]\");\n\t}",
"abstract public void header();",
"void depend(@Nonnull String path);",
"public abstract void buildHeadSource(OutputStream out, SourceObjectDeclared o) throws IOException;",
"private void handleInclude() {\n definedGrammar.include(getGrammar(getAbsPath()));\n }",
"public IAstPreprocessorIncludeDirective findInclude(String string);",
"public void loadingLibrary(String libraryFilename);",
"public Header [] compilationUnit(Header [] loaded, final int depth)\r\n {\r\n\ttry\r\n\t{\r\n this.depth = depth;\r\n String trunc = sources.getPath();\r\n list = loaded == null?new Header[0]:loaded;\r\n countToken = 0;\r\n \r\n Find.notePass(null);\r\n \r\n lookAhead();\r\n\r\n // read package name\r\n String myPackage = null;\r\n if (nextSymbol == Keyword.PACKAGESY)\r\n {\r\n lookAhead();\r\n myPackage = qualident();\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }\r\n\r\n Header header = new Header(new File(Parser.jdkSource).getPath(), trunc, myPackage, depth);\r\n\r\n Vector imported = new Vector();\r\n imported.add(\"java.lang.\");\r\n\r\n // read import statements\r\n while (nextSymbol == Keyword.IMPORTSY)\r\n imported.add(importDeclaration());\r\n\r\n header.imports = new String[imported.size()];\r\n for(int l = 0; l < imported.size(); l++)\r\n header.imports[l] = (String)imported.get(l);\r\n\r\n trunc = trunc.substring(0, sources.getPath().lastIndexOf(\".java\"));\r\n String basename = trunc.substring(trunc.lastIndexOf('\\\\') + 1);\r\n\r\n scopeStack = header.scopes;\r\n\r\n while(nextSymbol != Keyword.EOFSY)\r\n typeDeclaration(header.base, basename);\r\n\r\n matchKeyword(Keyword.EOFSY);\r\n\r\n if (Errors.count() != 0)\r\n return null;\r\n\r\n // write valid header\r\n header.write(trunc + \".h\");\r\n\r\n // append compiled file to list\r\n Header [] newList = new Header[(list != null?list.length:0) + 1];\r\n\r\n for(int i = 0; i < newList.length - 1; i++)\r\n newList[i] = list[i];\r\n\r\n newList[newList.length - 1] = header;\r\n list = newList;\r\n connectClasses(list);\r\n\r\n // resolve superclasses and interfaces\r\n for(int i = 0; i < header.scopes.size() && list != null; i++)\r\n {\r\n Vector v = new Vector();\r\n Scope scope = (Scope)header.scopes.get(i);\r\n\r\n for(Iterator iter = scope.iterator(); iter.hasNext();)\r\n {\r\n Basic b = (Basic)iter.next();\r\n if (b instanceof ClassType)\r\n v = getExtendImplement((ClassType)b);\r\n }\r\n\r\n while(v.size() > 0 && list != null)\r\n {\r\n connectClasses(list);\r\n list = loadSource((String)v.get(0), list, header, force);\r\n v.remove(0);\r\n }\r\n }\r\n\r\n if (Errors.count() != 0 || header.depth > 0 || list == null)\r\n return list;\r\n\r\n // process imports\r\n for(int i = 0; i < imported.size() && list != null; i++)\r\n {\r\n String st = (String)imported.get(i);\r\n if (!st.endsWith(\".\"))\r\n {\r\n connectClasses(list);\r\n list = loadSource(st.substring(st.lastIndexOf('.') + 1), list, header, force);\r\n }\r\n }\r\n\r\n if (Errors.count() != 0 || header.depth > 0 || list == null)\r\n return list;\r\n\r\n connectClasses(list);\r\n // process unresolved references\r\n for(int i = 0; i < header.scopes.size() && list != null; i++)\r\n {\r\n Scope scope = (Scope)header.scopes.get(i);\r\n Iterator step = scope.iterator();\r\n while(step.hasNext() && list != null)\r\n {\r\n Basic x = (Basic)step.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n boolean inner = false;\r\n ClassType y = (ClassType)x;\r\n\r\n while(y.unresolved.size() > 0 && list != null)\r\n {\r\n Iterator it = y.unresolved.iterator();\r\n if (!it.hasNext())\r\n break;\r\n String name = (String)it.next();\r\n it = null;\r\n y.unresolved.remove(name);\r\n String [] s = name.split(\"\\\\.\");\r\n Scope [] z = null;\r\n\r\n z = Find.find(s[0], scope, true);\r\n\r\n if (z.length == 0)\r\n {\r\n list = loadSource(s[0], list, header, force);\r\n connectClasses(list);\r\n }\r\n try {\r\n if (s.length > 1)\r\n {\r\n ClassType [] classes = null;\r\n \r\n classes = Find.findClass(s[0], 0, scope);\r\n \r\n if (classes.length == 0)\r\n {\r\n classes = new ClassType[1];\r\n classes[0] = y;\r\n }\r\n for(int k = 1; k < s.length && classes.length > 0; k++)\r\n {\r\n Basic[] b = classes[0].scope.get(s[k]);\r\n for (int j = 0; j < b.length; j++)\r\n if (b[j] instanceof VariableType)\r\n {\r\n VariableType v = (VariableType) b[j];\r\n if (v.type.type == Keyword.NONESY)\r\n {\r\n classes = Find.findClass(v.type.ident.string, 0, scope);\r\n \r\n if (classes.length == 0)\r\n {\r\n y.unresolved.add(v.type.ident.string);\r\n //y.unresolved.add(name);\r\n }\r\n }\r\n else\r\n classes = new ClassType[0];\r\n break;\r\n }\r\n else if (b[j] instanceof MethodType)\r\n {\r\n MethodType v = (MethodType) b[j];\r\n if (v.type.type == Keyword.NONESY)\r\n {\r\n classes = Find.findClass(v.type.ident.string, 0, scope);\r\n \r\n if (classes.length == 0)\r\n {\r\n y.unresolved.add(v.type.ident.string);\r\n //y.unresolved.add(name);\r\n }\r\n }\r\n else\r\n classes = new ClassType[0];\r\n break;\r\n }\r\n else if (b[j] instanceof ClassType)\r\n {\r\n classes = new ClassType[1];\r\n classes[0] = (ClassType) b[j];\r\n break;\r\n }\r\n }\r\n }\r\n } catch(Exception ee){error(\"nullpointer \" + s[0] + '.' + s[1]);}\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (depth > 0)\r\n return list;\r\n\r\n if (Errors.count() != 0 || list == null)\r\n return null;\r\n\r\n connectClasses(list);\r\n \r\n Find.notePass(this);\r\n\r\n // resolve operator tree to Forth-code\r\n FileOutputStream file = null, starter = null;\r\n try\r\n {\r\n file = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + \".fs\");\r\n starter = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + \".start.fs\");\r\n System.out.println(\"translate \" + header.name);\r\n\r\n for(int k = 0; k < header.scopes.size(); k++)\r\n {\r\n Scope scope = (Scope)header.scopes.get(k);\r\n boolean module = (k == 0);\r\n for(Iterator iter = scope.iterator(); iter.hasNext();)\r\n {\r\n Basic b = (Basic)iter.next();\r\n if (b instanceof ClassType && (b.modify & Keyword.INTERFACESY.value) == 0)\r\n {\r\n if (gc.startsWith(\"m\"))\r\n CodeRCmodified.codeClass( (ClassType) b, file, starter, module);\r\n else\r\n Code3color.codeClass( (ClassType) b, file, starter, module);\r\n module = false;\r\n }\r\n }\r\n }\r\n\r\n file.close();\r\n starter.close();\r\n }\r\n catch(IOException ex1) { ex1.printStackTrace(); }\r\n \r\n Find.notePass(this);\r\n\t}\r\n\tcatch(Exception failed)\r\n\t{ error(failed.getMessage() + \" aborted\"); }\r\n \r\n return (Errors.count() != 0)?null:list;\r\n }",
"private static void load(){\n }",
"protected void addDynamicHeaders() {\n }",
"protected Object compileAndLoad() throws IOException {\n String generatedSource = printJCodeModel();\n return compileAndLoadSource(generatedSource, TEST_CLASS_NAME);\n }",
"Value require(String module);",
"File getLoadLocation();",
"public static void load() {\n }",
"private void loadNavHeader() {\n SharedPreferences prefs = getSharedPreferences(LOG_IN_PREFS_NAME, MODE_PRIVATE);\n userName = prefs.getString(\"userName\", \"No token generated\");\n userEmail = prefs.getString(\"email\", \"No token generated\");\n userAvatarName = prefs.getInt(\"userAvatar\", 0);\n\n // name, email, profileImage\n navHeaderUserName.setText(userName);\n navHeaderUserEmail.setText(userEmail);\n imgNavHeaderProfile.setImageResource(ProfileImageAssets.getProfileImages().get(userAvatarName));\n\n }",
"public Header [] addHeader(Header [] list, String name)\r\n {\r\n String st = null;\r\n for(int i = 0; i < built.size(); i++, st = null)\r\n {\r\n st = (String)built.get(i);\r\n String tail = st.substring(st.lastIndexOf('\\\\') + 1);\r\n tail = tail.substring(0, tail.indexOf('.'));\r\n if (tail.compareToIgnoreCase(name) == 0)\r\n break;\r\n }\r\n if (st != null)\r\n {\r\n Header [] newList = new Header[list.length + 1];\r\n\r\n for (int k = 0; k < newList.length - 1; k++)\r\n newList[k] = list[k];\r\n\r\n st = st.substring(0, st.lastIndexOf('.')) + \".h\";\r\n System.out.println(\"loading \" + st);\r\n newList[newList.length - 1] = new Header(st, depth + 1); // load header\r\n list = newList;\r\n\r\n connectClasses(list);\r\n }\r\n\r\n return list;\r\n }",
"public void libraryLoaded();",
"void depend(@Nonnull Path path);",
"@Override\n public FileCollection getCompileIncludePath() {\n return super.getCompileIncludePath().plus(getProjectLayout().files(new Callable<FileCollection>() {\n @Override\n public FileCollection call() {\n CppComponent tested = testedComponent.getOrNull();\n if (tested == null) {\n return getProjectLayout().files();\n }\n return ((DefaultCppComponent) tested).getAllHeaderDirs();\n }\n }));\n }",
"private HeaderUtil() {}",
"public String getSharedLoader(IPath baseDir);",
"String getSingleLinkerScriptFile();",
"language_dependent_definition getLanguage_dependent_definition();",
"private void include(\r\n @CheckForNull String parent, int line,\r\n @Nonnull String name, boolean quoted, boolean next)\r\n throws IOException,\r\n LexerException {\r\n if (name.startsWith(\"/\")) {\r\n VirtualFile file = filesystem.getFile(name);\r\n if (include(file))\r\n return;\r\n StringBuilder buf = new StringBuilder();\r\n buf.append(\"File not found: \").append(name);\r\n error(line, 0, buf.toString());\r\n return;\r\n }\r\n\r\n VirtualFile pdir = null;\r\n if (quoted) {\r\n if (parent != null) {\r\n VirtualFile pfile = filesystem.getFile(parent);\r\n pdir = pfile.getParentFile();\r\n }\r\n if (pdir != null) {\r\n VirtualFile ifile = pdir.getChildFile(name);\r\n if (include(ifile))\r\n return;\r\n }\r\n if (include(quoteincludepath, name))\r\n return;\r\n } else {\r\n int idx = name.indexOf('/');\r\n if (idx != -1) {\r\n String frameworkName = name.substring(0, idx);\r\n String headerName = name.substring(idx + 1);\r\n String headerPath = frameworkName + \".framework/Headers/\" + headerName;\r\n if (include(frameworkspath, headerPath))\r\n return;\r\n }\r\n }\r\n\r\n if (include(sysincludepath, name))\r\n return;\r\n\r\n StringBuilder buf = new StringBuilder();\r\n buf.append(\"File not found: \").append(name);\r\n buf.append(\" in\");\r\n if (quoted) {\r\n buf.append(\" .\").append('(').append(pdir).append(')');\r\n for (String dir : quoteincludepath)\r\n buf.append(\" \").append(dir);\r\n }\r\n for (String dir : sysincludepath)\r\n buf.append(\" \").append(dir);\r\n error(line, 0, buf.toString());\r\n }",
"public static void load(FileIO fileIO) \r\n\t{\n\t\t\r\n\t}",
"private void loadAssembly () {\r\n Factory assemblyFactory = new AssemblyFactory(mySimulation);\r\n int response = INPUT_CHOOSER.showDialog(null, \"Assembly file\");\r\n if (response == JFileChooser.APPROVE_OPTION) {\r\n assemblyFactory.loadFile(INPUT_CHOOSER.getSelectedFile());\r\n }\r\n }",
"public void LoadFromFile(String fileName) throws IOException {\n BufferedReader bufferedReader = null;\n FileReader fileReader = null;\n String currentLine;\n Integer index = 0;\n Integer invalidModules = 0;\n\n\n try {\n fileReader = new FileReader(fileName);\n bufferedReader = new BufferedReader(fileReader);\n\n // Read the first line which indicates DRCov version\n // eg : DRCOV VERSION: 1\n currentLine = bufferedReader.readLine();\n logger.debug(\"First line : {} \", currentLine);\n Matcher result = Pattern.compile(\"\\\\d+\").matcher(currentLine);\n if (result.find()) {\n drcovVersion = Integer.parseInt(result.group().toString());\n }\n logger.info(\"DRCov version : {} \", drcovVersion);\n\n // Only version 2 files include flavour line\n // eg :\n if (drcovVersion == 2) {\n currentLine = bufferedReader.readLine();\n result = Pattern.compile(\"\\\\d+\").matcher(currentLine);\n if (result.find()) {\n drcovFlavour = result.group().toString();\n }\n logger.info(\"DRCov Flavour {}\", currentLine);\n }\n\n // Get the number of modules\n // eg : Module Table: 24\n currentLine = bufferedReader.readLine();\n result = Pattern.compile(\"\\\\d+\").matcher(currentLine);\n if (result.find()) {\n noOfModules = Integer.parseInt(result.group().toString());\n }\n logger.info(\"Number of modules : {}\", noOfModules);\n\n logger.warn(\"Parsing line DRCov models assuming second number is decimal\");\n\n // Read all the module details\n // eg : 11, 40960, C:\\Windows\\syswow64\\LPK.dll\n for (int i = 0 ; i < noOfModules ; i++) {\n currentLine = bufferedReader.readLine();\n Module module = new Module();\n module.LoadByDRCovModuleLine(currentLine);\n Integer foundIndex = modules.indexOf(module);\n if (foundIndex != -1) { // Duplicate module name\n duplicateIndexes.add(i);\n module.setOriginalIndex(foundIndex);\n logger.debug(\"Module {} is a duplicate of {}\", i, foundIndex);\n }\n modules.add(module);\n }\n logger.info(\"Number of Duplicate Modules {}\", duplicateIndexes.size());\n\n currentLine = bufferedReader.readLine();\n\n // Get the number of basic blocks\n // eg : BB Table: 21058 bbs\n result = Pattern.compile(\"(\\\\d+)\").matcher(currentLine);\n if (result.find()) {\n noOfBasicBlocks = Integer.parseInt(result.group(0).toString());\n }\n logger.info(\"Number of Basic Blocks {}\", noOfBasicBlocks);\n\n\n // Parsing the basic block lines\n // eg : module[ 21]: 0x000101c4, 13\n // Module number start_address size\n for (int i = 0 ; i < noOfBasicBlocks ; i++) {\n currentLine = bufferedReader.readLine();\n result = Pattern.compile(\"\\\\[(.*)\\\\]:.*0x(.*),(.*)\").matcher(currentLine);\n logger.debug(\"Group Count : {}\", result.groupCount());\n Integer moduleNumber, size;\n Long startAddress;\n if (result.find()) {\n moduleNumber = Integer.parseInt(result.group(1).trim());\n startAddress = Long.parseLong(result.group(2).trim(), 16); //substring coz \"0x\"\n size = Integer.parseInt(result.group(3).trim());\n logger.debug(\"moduleNumber {}, startAddress {}, size {}\", moduleNumber, startAddress, size);\n if (moduleNumber >= noOfModules) {\n invalidModules++;\n } else {\n // Updating starting addresses\n if (duplicateIndexes.contains(moduleNumber)) {\n int parentIndex = modules.get(moduleNumber).getOriginalIndex();\n modules.get(parentIndex).getAddresses().add(startAddress);\n } else {\n //TODO : One Liner\n Module temp = modules.get(moduleNumber);\n temp.getAddresses().add(startAddress);\n }\n }\n logger.debug(\"Original : {} moduleNumber : {}, startAddress : {} size : {}\", currentLine, moduleNumber, startAddress, size);\n }\n }\n\n logger.info(\"Invalid BBS {}\", invalidModules);\n logger.info(\"Valid BBS {}\", noOfBasicBlocks - invalidModules);\n } finally {\n if(bufferedReader != null) {\n bufferedReader.close();\n }\n if(fileReader != null) {\n fileReader.close();\n }\n }\n\n CheckStructureIntegrity();\n }",
"public interface Loader {\n void loadLibrary(String str) throws Exception;\n\n void loadLibraryFromPath(String str) throws Exception;\n }",
"public void renderHead(IHeaderResponse response) {\n\n\n\t\t//get Sakai skin\n\t\tString skinRepo = sakaiProxy.getSkinRepoProperty();\n\t\tString toolCSS = sakaiProxy.getToolSkinCSS(skinRepo);\n\t\tString toolBaseCSS = skinRepo + \"/tool_base.css\";\n\n\t\t//Sakai additions\n\t\tresponse.renderJavascriptReference(\"/library/js/headscripts.js\");\n\t\tresponse.renderCSSReference(toolBaseCSS);\n\t\tresponse.renderCSSReference(toolCSS);\n\t\tresponse.renderOnLoadJavascript(\"setMainFrameHeight( window.name )\");\n\n\t\t//Tool additions (at end so we can override if required)\n\t\tresponse.renderString(\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\" />\");\n\t\t//response.renderCSSReference(\"css/my_tool_styles.css\");\n\t\t//response.renderJavascriptReference(\"js/my_tool_javascript.js\");\n\n\t}",
"private void updateHeader() {\n this.mViewHolder.imageView = findViewById(R.id.image_header);\n this.mViewHolder.textHeader = findViewById(R.id.text_nav_header);\n\n this.mViewHolder.textHeader.setText(_NAME);\n\n Glide.with(this).load(user.getPhotoUrl()).into(this.mViewHolder.imageView);\n\n }",
"public void load (IFile file) throws Exception;",
"private boolean loadRepositoryHeader() {\r\n\t\ttry {\r\n\t\t\t// annotation with URI: repositoryURL + \"#header\"\r\n\t\t\trepositoryURI = new URI(repURLFld.getText());\r\n\t\t\tURI repHeaderURI = new URI(repositoryURI+\"#header\");\r\n\t\t\t\r\n\t\t\tif (client==null) this.initAnnoteaClient();\r\n\t\t\t\r\n\t\t\t// get annotation using Annotea\r\n\t\t\tSet headerSet = client.findAnnotations(repHeaderURI);\r\n\t\t\tif (headerSet.size()>0) {\r\n\t\t\t\tDescription header = (Description) headerSet.iterator().next();\r\n\t\t\t\tversionDescriptions[0] = header;\r\n\t\t\t\t\r\n\t\t\t\t// parse header description to get author, date, baseOntologyURI\r\n\t\t\t\tthis.repositoryAuthor = header.getAuthor();\r\n\t\t\t\tthis.reposityCreatedDate = header.getCreated();\r\n\t\t\t\tthis.baseOntologyURI = new URI(header.getAnnotatedEntityDefinition());\r\n\t\t\t\t// and headVersionNumber\r\n\t\t\t\tthis.headVersionNumber = Integer.parseInt(header.getBody());\r\n\t\t\t\t\r\n\t\t\t\t// also get actual URL location of annotation\r\n\t\t\t\tthis.repHeaderLoc = header.getLocation();\r\n\t\t\t\t\r\n\t\t\t\t// set UI accordingly\r\n\t\t\t\tthis.repAuthorFld.setText(this.repositoryAuthor);\r\n\t\t\t\tthis.repDateFld.setText(this.reposityCreatedDate);\r\n\t\t\t\tthis.repBaseOntFld.setText(this.baseOntologyURI.toString());\r\n\t\t\t\tthis.toggleRepOptions(false);\r\n\t\t\t\tSystem.out.println(\"Ontology Repository header exists at \"+repHeaderURI);\r\n\t\t\t\treturn true;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private interface LoadStrategy {\n /**\n * Perform loading on the specified module.\n * \n * @param logger logs the process\n * @param moduleName the name of the process\n * @param moduleDef a module\n * @throws UnableToCompleteException\n */\n void load(TreeLogger logger, String moduleName, ModuleDef moduleDef)\n throws UnableToCompleteException;\n }",
"public void onHeaderRefresing();",
"private static void includeExtract(IASTPreprocessorIncludeStatement include) {\n\t\tvxlFragment.append(VxlManager.includeDirective(StringProcessor.processString(include.getName().toString())));\n\t}",
"protected abstract void loader() throws IOException;",
"public void load() throws ClassNotFoundException, IOException;",
"public abstract void loadFile(Model mod, String fn) throws IOException;",
"private void createTableHeaderFile(final Class Class_, final String simpleName) throws IOException{\n final SessionFactory SessionFactory = HibernateUtil.getSingleton().getSessionFactoryLocal();\n final ClassMetadata classMetadata = SessionFactory.getClassMetadata(Class_);\n final String[] propertyNames = classMetadata.getPropertyNames();\n \n //Get the content file\n final String contentFileTableHeader = this.getContentTableHeader(simpleName,propertyNames); \n \n //Create the path\n final String className = simpleName + \"sTableHeader\"; \n final String tableHeaderPath = \"../era_views/src/main/java/com/era/views/tables/headers\";\n final String finalClassPath = tableHeaderPath + \"/\" + className + \".java\";\n \n //If the file exists delete it\n final File File = new File(finalClassPath); \n if(File.exists()){\n File.delete();\n }\n \n //Create the file\n File.createNewFile();\n \n //Write to the file\n try ( //Write the class\n FileWriter writer = new FileWriter(File)) { \n writer.write(contentFileTableHeader);\n }\n }",
"public interface LoadFile {\n public String loadFile();\n}",
"@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }",
"public interface ContributionLoader {\n\n /**\n * Performs the load operation. This includes resolution of dependent contributions if necessary, and constructing a\n * classloader with access to resources contained in and required by the contribution.\n *\n * @param contribution the contribution to load\n * @return the classloader with access to the contribution and dependent resources\n * @throws ContributionLoadException if an error occurs during load\n * @throws MatchingExportNotFoundException\n * if matching export could not be found\n */\n ClassLoader loadContribution(Contribution contribution)\n throws ContributionLoadException, MatchingExportNotFoundException;\n}",
"@Override\r\n\tprotected void load() {\n\t\t\r\n\t}",
"private void init()\n\t{\n\t\tResourceReference css = getCSS();\n\t\tif (css != null)\n\t\t{\n\t\t\tadd(HeaderContributor.forCss(css.getScope(), css.getName()));\n\t\t}\n\t}",
"@Nullable\n private BzlLoadValue computeInternalWithCompiledBzl(\n BzlLoadValue.Key key,\n BzlCompileValue compileValue,\n StarlarkBuiltinsValue builtins,\n Environment env,\n @Nullable InliningState inliningState)\n throws BzlLoadFailedException, InterruptedException {\n // Ensure the .bzl exists and passes static checks (parsing, resolving).\n // (A missing prelude file still returns a valid but empty BzlCompileValue.)\n if (!compileValue.lookupSuccessful()) {\n throw new BzlLoadFailedException(compileValue.getError(), Code.COMPILE_ERROR);\n }\n Program prog = compileValue.getProgram();\n Label label = key.getLabel();\n PackageIdentifier pkg = label.getPackageIdentifier();\n\n boolean isSclFlagEnabled =\n builtins.starlarkSemantics.getBool(BuildLanguageOptions.EXPERIMENTAL_ENABLE_SCL_DIALECT);\n if (key.isSclDialect() && !isSclFlagEnabled) {\n throw new BzlLoadFailedException(\n \"loading .scl files requires setting --experimental_enable_scl_dialect\",\n Code.PARSE_ERROR);\n }\n\n // Determine dependency BzlLoadValue keys for the load statements in this bzl.\n // Labels are resolved relative to the current repo mapping.\n RepositoryMapping repoMapping = getRepositoryMapping(key, builtins.starlarkSemantics, env);\n if (repoMapping == null) {\n return null;\n }\n ImmutableList<Pair<String, Location>> programLoads = getLoadsFromProgram(prog);\n ImmutableList<Label> loadLabels =\n getLoadLabels(\n env.getListener(),\n programLoads,\n pkg,\n repoMapping,\n key.isSclDialect(),\n isSclFlagEnabled);\n if (loadLabels == null) {\n throw new BzlLoadFailedException(\n String.format(\n \"module '%s'%s has invalid load statements\",\n label.toPathFragment(),\n StarlarkBuiltinsValue.isBuiltinsRepo(label.getRepository()) ? \" (internal)\" : \"\"),\n Code.PARSE_ERROR);\n }\n ImmutableList.Builder<BzlLoadValue.Key> loadKeysBuilder =\n ImmutableList.builderWithExpectedSize(loadLabels.size());\n for (Label loadLabel : loadLabels) {\n loadKeysBuilder.add(key.getKeyForLoad(loadLabel));\n }\n ImmutableList<BzlLoadValue.Key> loadKeys = loadKeysBuilder.build();\n\n // Load .bzl modules.\n // When not using bzl inlining, this is done in parallel for all loads.\n List<BzlLoadValue> loadValues =\n inliningState == null\n ? computeBzlLoadsWithSkyframe(env, loadKeys, programLoads)\n : computeBzlLoadsWithInlining(env, loadKeys, programLoads, inliningState);\n if (loadValues == null) {\n return null; // Skyframe deps unavailable\n }\n\n // Validate that the current .bzl file satisfies each loaded dependency's load visibility.\n // Violations are reported as error events (since there can be more than one in a single file)\n // and also trigger a BzlLoadFailedException.\n checkLoadVisibilities(\n pkg,\n \"module \" + label.getCanonicalForm(),\n loadValues,\n loadKeys,\n programLoads,\n /* demoteErrorsToWarnings= */ !builtins.starlarkSemantics.getBool(\n BuildLanguageOptions.CHECK_BZL_VISIBILITY),\n env.getListener());\n\n // Accumulate a transitive digest of the bzl file, the digests of its direct loads, and the\n // digest of the @_builtins pseudo-repository (if applicable).\n Fingerprint fp = new Fingerprint();\n fp.addBytes(compileValue.getDigest());\n\n // Populate the load map and add transitive digests to the fingerprint.\n Map<String, Module> loadMap = Maps.newLinkedHashMapWithExpectedSize(programLoads.size());\n int i = 0;\n for (Pair<String, Location> load : programLoads) {\n BzlLoadValue v = loadValues.get(i++);\n loadMap.put(load.first, v.getModule()); // dups ok\n fp.addBytes(v.getTransitiveDigest());\n }\n\n // Retrieve predeclared symbols and complete the digest computation.\n ImmutableMap<String, Object> predeclared =\n getAndDigestPredeclaredEnvironment(key, builtins, fp);\n if (predeclared == null) {\n return null;\n }\n byte[] transitiveDigest = fp.digestAndReset();\n\n // The BazelModuleContext holds additional contextual info to be associated with the Module,\n // including the label and a reified copy of the load DAG.\n BazelModuleContext bazelModuleContext =\n BazelModuleContext.create(\n label,\n repoMapping,\n prog.getFilename(),\n ImmutableList.copyOf(loadMap.values()),\n transitiveDigest);\n\n // Construct the initial Starlark module used for executing the program.\n // The set of keys in the predeclared environment matches the set of predeclareds used to\n // compile the .bzl file into a Program.\n Module module =\n Module.withPredeclaredAndData(builtins.starlarkSemantics, predeclared, bazelModuleContext);\n\n // The BzlInitThreadContext holds Starlark thread-local state to be read and updated during\n // evaluation.\n BzlInitThreadContext context =\n new BzlInitThreadContext(\n label,\n transitiveDigest,\n ruleClassProvider.getToolsRepository(),\n ruleClassProvider.getNetworkAllowlistForTests(),\n ruleClassProvider.getConfigurationFragmentMap(),\n new SymbolGenerator<>(label));\n\n // executeBzlFile may post events to the Environment's handler, but events do not matter when\n // caching BzlLoadValues. Note that executing the code mutates the Module and\n // BzlInitThreadContext.\n executeBzlFile(\n prog, label, module, loadMap, context, builtins.starlarkSemantics, env.getListener());\n\n BzlVisibility bzlVisibility = context.getBzlVisibility();\n if (bzlVisibility == null) {\n bzlVisibility = BzlVisibility.PUBLIC;\n }\n // We save load visibility in the BzlLoadValue rather than the BazelModuleContext because\n // visibility doesn't need to be introspected by any Starlark builtin methods, and because the\n // alternative would mean mutating or overwriting the BazelModuleContext after evaluation.\n return new BzlLoadValue(module, transitiveDigest, bzlVisibility);\n }",
"protected static void require(File dataDir) throws Exception {\r\n require(dataDir,\"h3a\");\r\n }",
"protected void updateHeader() {\n\t}",
"Rule Header() {\n // Push 1 HeaderNode onto the value stack\n return Sequence(\n FirstOf(\n Include(),\n CppInclude(),\n Namespace()),\n actions.pushHeaderNode());\n }",
"public interface CartridgeLoader {\n\n public abstract InputStream getFile(String the_target)\n throws FileNotFoundException, IOException;\n\n}",
"public abstract String header();",
"protected FileHeader getFileHeader(String aPath)\n {\n // Get Head branch Commit Tree and look for file\n GitFile gfile = getTree().getFile(aPath); if(gfile==null) return null;\n \n // Create file for path and commit time\n FileHeader file = new FileHeader(aPath, gfile.isDir());\n file.setModTime(_cmt.getCommitTime());\n return file;\n }",
"public void doHead() throws IOException {\n\n // search ressource\n\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n }",
"public abstract void load();",
"private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }",
"public interface Loader {\n\t\tpublic void load();\n\t}",
"@Override\n\tprotected void load() {\n\n\t}",
"@Override\n\tprotected void load() {\n\n\t}",
"public final void header() throws RecognitionException {\n\t\tToken ACTION3=null;\n\n\t\ttry {\n\t\t\t// org/antlr/gunit/gUnit.g:83:8: ( '@header' ACTION )\n\t\t\t// org/antlr/gunit/gUnit.g:83:10: '@header' ACTION\n\t\t\t{\n\t\t\tmatch(input,30,FOLLOW_30_in_header157); \n\t\t\tACTION3=(Token)match(input,ACTION,FOLLOW_ACTION_in_header159); \n\n\t\t\t\t\tint pos1, pos2;\n\t\t\t\t\tif ( (pos1=(ACTION3!=null?ACTION3.getText():null).indexOf(\"package\"))!=-1 && (pos2=(ACTION3!=null?ACTION3.getText():null).indexOf(';'))!=-1 ) {\n\t\t\t\t\t\tgrammarInfo.setGrammarPackage((ACTION3!=null?ACTION3.getText():null).substring(pos1+8, pos2).trim());\t// substring the package path\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.err.println(\"error(line \"+ACTION3.getLine()+\"): invalid header\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"private static BzlLoadFailedException whileLoadingDep(\n Location loc, BzlLoadFailedException cause) {\n return new BzlLoadFailedException(\n \"at \" + loc + \": \" + cause.getMessage(), cause.getDetailedExitCode());\n }",
"public static void whenRequiredByAssembler(AssemblerGroup ag) {\n loaded = true;\n }",
"@Override\r\n \tpublic File getLoadPath() {\n \t\treturn null;\r\n \t}",
"public void source(String path) throws Exception;",
"public Object initialize(final File source) throws FileNotFoundException {\n List<String> header = null;\n int linesLookedAt = 0;\n xReadLines reader = new xReadLines(source);\n \n for ( String line : reader ) {\n Matcher m = HEADER_PATTERN.matcher(line);\n if ( m.matches() ) {\n //System.out.printf(\"Found a header line: %s%n\", line);\n header = new ArrayList<String>(Arrays.asList(line.split(DELIMITER_REGEX)));\n //System.out.printf(\"HEADER IS %s%n\", Utils.join(\":\", header));\n }\n \n if ( linesLookedAt++ > MAX_LINES_TO_LOOK_FOR_HEADER )\n break;\n }\n \n // check that we found the header\n if ( header != null ) {\n logger.debug(String.format(\"HEADER IS %s%n\", Utils.join(\":\", header)));\n } else {\n // use the indexes as the header fields\n logger.debug(\"USING INDEXES FOR ROD HEADER\");\n // reset if necessary\n if ( !reader.hasNext() )\n reader = new xReadLines(source);\n header = new ArrayList<String>();\n int tokens = reader.next().split(DELIMITER_REGEX).length;\n for ( int i = 0; i < tokens; i++)\n header.add(Integer.toString(i));\n }\n \n return header;\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}",
"protected void initializeHeader() throws PiaRuntimeException, IOException{\n try{\n super.initializeHeader();\n if( firstLineOk && headersObj == null ){\n\t// someone just give us the first line\n\theadersObj = new Headers();\n }\n }catch(PiaRuntimeException e){\n throw e;\n }catch(IOException ioe){\n throw ioe;\n }\n }",
"StaticIncludeType createStaticIncludeType();",
"void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;",
"public void load() ;",
"public static VirtualFile getIncludedFile(Project project, VirtualFile referencing, String name) {\n File file = new File(name);\n if (file.isAbsolute()) {\n return tryExtensions(file);\n }\n\n if (referencing != null) { // if referencing virtual file is known\n if (referencing.getParent() != null) {\n String path = referencing.getParent().getPath();\n VirtualFile res = tryExtensions(new File(path, name));\n if (res != null) {\n return res;\n }\n }\n\n Module module = com.intellij.openapi.module.ModuleUtil.findModuleForFile(referencing, project);\n\n// return module != null ? trySearchPath(name, GlobalSearchScope.moduleWithDependenciesScope(module)) : null;\n return module != null ? trySearchPath(name, GlobalSearchScope.projectScope(project)) : null;\n } else { // often lexer can't determine which virtual file is referencing the include\n return trySearchPath(name, GlobalSearchScope.projectScope(project));\n }\n }",
"private void load(FileInputStream input) {\n\t\t\r\n\t}",
"public final void include(RuntimeEnv env, RuntimeStack stack, Scope3277 scope)\n throws IncludeEventException {\n env.addManualClassLoad(\"Symfony\\\\Component\\\\Debug\\\\Exception\\\\UndefinedMethodException\");\n }",
"@Override\r\n\tpublic void load() {\n\t}",
"public void printHeaderInfo(String className) {\n outFile.println(\"// Declarations for \" + className);\n outFile.println(\n \"// Declarations written by Chicory \" + LocalDateTime.now(ZoneId.systemDefault()));\n outFile.println();\n\n // Determine comparability string\n String comparability = \"none\";\n if (Runtime.comp_info != null) {\n comparability = \"implicit\";\n }\n outFile.printf(\"decl-version 2.0%n\");\n outFile.printf(\"var-comparability %s%n%n\", comparability);\n }",
"protected void BuildHtmlHeader(PrintWriter out, String title) throws IOException\n {\n out.println(\"<HTML>\");\n out.println(\"<head>\");\n out.println(\"<link rel=\\\"stylesheet\\\" href=\\\"/css/nny.css\\\" type=\\\"text/css\\\">\");\n out.println(\"<TITLE>\");\n out.println(title);\n out.println(\"</TITLE>\");\n out.println(\"<SCRIPT LANGUAGE=\\\"JavaScript\\\" SRC=\\\"/javascript/data_validation.js\\\"></SCRIPT>\");\n out.println(\"</head>\");\n /*\n if (navbarTemplate != null)\n {\n if (header_tp == null)\n {\n header_tp = new TemplateProcessor(template_path_ + navbarTemplate);\n }\n out.println(header_tp.process().toString());\n }*/\n out.flush();\n }",
"private void compileResource(IResource resource, IProgressMonitor monitor) {\n\t\tif (resource instanceof IFile) {\n\n\t\t\tmonitor.subTask(Messages.AssemblyBuilder_Compiling + resource.getName());\n\n\t\t\tICompiler compiler = null;\n\t\t\tdeleteMarkers((IFile) resource);\n\n\t\t\tIPreferenceStore store = new PropertyStore(resource, AssemblyEditorPlugin.getDefault().getPreferenceStore(),\n\t\t\t\t\tAssemblyEditorPlugin.PLUGIN_ID);\n\n\t\t\tString ext = resource.getFileExtension();\n\t\t\tString[] customSettings = getCustomCompileOptions(resource);\n\t\t\tif (EXT_ASM.equalsIgnoreCase(ext) || EXT_INC.equalsIgnoreCase(ext)) {\n\t\t\t\tString compilername = customSettings[0] != null ? customSettings[0]\n\t\t\t\t\t\t: store.getString(PreferenceConstants.P_COMPILER);\n\n\t\t\t\tif (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_64TASS)) {\n\t\t\t\t\tcompiler = new TAssCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_AS65)) {\n\t\t\t\t\tcompiler = new As65Compiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_CA65)) {\n\t\t\t\t\tcompiler = new CA65Compiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_DASM)) {\n\t\t\t\t\tcompiler = new DAsmCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_SNAsm)) {\n\t\t\t\t\tcompiler = new SNAsmCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_TMPX)) {\n\t\t\t\t\tcompiler = new TMPxCompiler();\n\t\t\t\t} else if (compilername.equalsIgnoreCase(PreferenceConstants.P_COMPILER_XA)) {\n\t\t\t\t\tcompiler = new XACompiler();\n\t\t\t\t}\n\t\t\t} else if (EXT_MDC.equalsIgnoreCase(ext)) {\n\t\t\t\tcompiler = new MakeDiskCompiler();\n\t\t\t} else if (EXT_DIS.equalsIgnoreCase(ext)) {\n\t\t\t\tcompiler = new DiskImageBuilder();\n\t\t\t}\n\n\t\t\tif (compiler != null) {\n\t\t\t\tif (!EXT_INC.equalsIgnoreCase(ext)) {\n\t\t\t\t\tcompiler.compile(resource, new AssemblyErrorHandler(), monitor, store, null, customSettings[1]);\n\t\t\t\t\tString postProcessor = customSettings[2] != null ? customSettings[2]\n\t\t\t\t\t\t\t: store.getString(PreferenceConstants.P_POSTPROCESSORPATH);\n\t\t\t\t\tif (postProcessor != null && postProcessor.length() != 0) {\n\t\t\t\t\t\tIResource prg = resource.getParent().findMember(\n\t\t\t\t\t\t\t\tresource.getFullPath().removeFileExtension().addFileExtension(\"prg\").lastSegment());\n\t\t\t\t\t\tif (prg != null) {\n\t\t\t\t\t\t\tnew PostProcessorCompiler().compile(prg, new AssemblyErrorHandler(), monitor, store,\n\t\t\t\t\t\t\t\t\tcustomSettings[2], customSettings[3]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taddDependencies(resource, compiler, monitor);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Compile dependent resources\n\t\t\t */\n\t\t\tSet<String> dependencies = ResourceDependencies.getInstance().get(resource);\n\t\t\tif (dependencies != null) {\n\t\t\t\tfor (String dependent : dependencies) {\n\t\t\t\t\tIResource res = resource.getWorkspace().getRoot().findMember(dependent);\n\t\t\t\t\tif (res != null) {\n\t\t\t\t\t\t// System.out.println(\"Compiling dependent resource \"\n\t\t\t\t\t\t// + res.getName());\n\t\t\t\t\t\tthis.compileResource(res, monitor);\n\t\t\t\t\t}\n\t\t\t\t\tif (monitor.isCanceled()) {\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}",
"void load();",
"void load();",
"public void load() {\n }",
"public void addCSHeader(File outfile) {\n\n\ttry {\n\t PrintWriter writer = new PrintWriter(new FileOutputStream(outfile, true)); // declares writer as a new PrintWriter, allows us to write into new file\n\n /*\n Adds C++ headers\n */\n\t writer.println(\"#include <iostream>\");\n\t writer.println(\"#include <string>\");\n\t writer.println(\"using namespace std;\");\n\t writer.println(\"int main() {\");\n\n\t writer.close();\n\t} catch (Exception IOException) {\n\t System.out.println(\"Some sort of IO error here\");\n\t}\n\n }",
"private PolicyHeader loadPolicyHeader(String policyNo, String termBaseRecordId, PolicyViewMode desiredViewMode) {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"loadPolicyHeader\", new Object[]{policyNo, termBaseRecordId, desiredViewMode});\r\n }\r\n\r\n String requestId = \"dti.pm.policymgr.struts.MaintainPolicyAction&process=loadPolicyDetail\";\r\n String endQuoteId = null;\r\n\r\n if (RequestStorageManager.getInstance().has(RequestStorageIds.POLICY_HEADER)) {\r\n RequestStorageManager.getInstance().remove(RequestStorageIds.POLICY_HEADER);\r\n }\r\n\r\n PolicyHeader policyHeader = getPolicyManager().loadPolicyHeader(policyNo, termBaseRecordId, desiredViewMode, endQuoteId, requestId, \"PolicyPremiumInquirySevice: loadPolicyHeader\", false);\r\n\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"loadPolicyHeader\", policyHeader);\r\n }\r\n\r\n return policyHeader;\r\n }",
"public void load() {\n\t}",
"public void setSystemIncludePath(@Nonnull List<String> path) {\r\n this.sysincludepath = path;\r\n }",
"@Test\n\tpublic void testLoad() {\n\t\tWriter writer = null ;\n\t\t\n\t\tString sourceFilePath = \"testLoad1.lisp\" ;\n\t\t\n\t\t//create the test source file\n\t\ttry {\n\t\t\twriter = new BufferedWriter(\n\t\t\t\t\t\tnew OutputStreamWriter(\n\t\t\t\t\t\t\t\tnew FileOutputStream(sourceFilePath), \"utf-8\")) ;\n\t\t\twriter.write(\"(define foo 37)\\n\");\n\t\t} catch (IOException except){\n\t\t\t\n\t\t} finally {\n\t\t\ttry {writer.close();} catch (Exception ex) {}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tLispObject result = LispReader.load(sourceFilePath, env) ;\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tenv.dump() ;\n\t\t//check that the environment contains the bindings as stated in the source file.\n\t\t\n\t\tSystem.out.println(\"testLoad(): got \" + env.get(\"BAR\")) ;\n\n\t\tassertTrue(env.get(\"FOO\").toString().equals(\"37\"));\n\t}",
"protected void loadGridHeader(HttpServletRequest request,\r\n String anchorColumnName,\r\n String gridHeaderLayerId) {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"loadGridHeader\", new Object[]{request, anchorColumnName, gridHeaderLayerId});\r\n }\r\n\r\n if (StringUtils.isBlank(anchorColumnName) || StringUtils.isBlank(gridHeaderLayerId)) {\r\n throw new IllegalArgumentException(\"Anchor column name or grid header layer may not be emtpy.\");\r\n }\r\n\r\n OasisFields fields = (OasisFields) request.getAttribute(IOasisAction.KEY_FIELDS);\r\n WebLayer layerFields = fields.getLayerFieldsMap(gridHeaderLayerId);\r\n String gridHeaderBeanName = \"gridHeaderBean\";\r\n XMLGridHeaderDOMLoader xmlLoader = new XMLGridHeaderDOMLoader(servlet.getServletContext());\r\n XMLGridHeader xmlHeader = xmlLoader.getHeader();\r\n xmlHeader.setGridHeaderFieldnameSuffix(null);\r\n xmlHeader.setFields(layerFields);\r\n xmlHeader.setAnchorColumnName(anchorColumnName);\r\n xmlHeader.setGridHeaderDefinesDisplayableColumnOrder(gridHeaderDefinesDisplayableColumnOrder());\r\n request.setAttribute(gridHeaderBeanName, xmlHeader);\r\n\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"loadGridHeader\");\r\n }\r\n }",
"@Override\r\n\tprotected void initLoad() {\n\r\n\t}"
] | [
"0.61738837",
"0.5491321",
"0.54609156",
"0.5425098",
"0.52702194",
"0.52270097",
"0.5190344",
"0.5170032",
"0.51681507",
"0.513696",
"0.511333",
"0.51109356",
"0.5080972",
"0.50544715",
"0.5048561",
"0.49672383",
"0.49489698",
"0.49324995",
"0.49305457",
"0.49224353",
"0.48817042",
"0.48385623",
"0.48031378",
"0.47996393",
"0.47815832",
"0.47642797",
"0.47581714",
"0.4754373",
"0.47436062",
"0.47321606",
"0.47160798",
"0.4714815",
"0.4661857",
"0.46446124",
"0.46442565",
"0.46324617",
"0.46267617",
"0.46229717",
"0.4622705",
"0.46080709",
"0.45985144",
"0.45727113",
"0.45672932",
"0.45669842",
"0.45665807",
"0.4561345",
"0.4539785",
"0.45387542",
"0.45383605",
"0.45371094",
"0.4521008",
"0.4519103",
"0.4517911",
"0.45094502",
"0.4489893",
"0.44764513",
"0.4466831",
"0.44584453",
"0.4456511",
"0.44551882",
"0.4454317",
"0.44433898",
"0.44415888",
"0.44400543",
"0.44390714",
"0.4438318",
"0.44290859",
"0.44266415",
"0.44266415",
"0.44083536",
"0.44082683",
"0.44082683",
"0.44082683",
"0.44080716",
"0.4404026",
"0.4398613",
"0.4398223",
"0.43971676",
"0.43964472",
"0.4388718",
"0.43842548",
"0.4383371",
"0.438033",
"0.43788597",
"0.43787277",
"0.43780214",
"0.4375711",
"0.436981",
"0.4364046",
"0.4356044",
"0.4351861",
"0.4351861",
"0.43513995",
"0.43485704",
"0.43450987",
"0.43402126",
"0.4336769",
"0.4335061",
"0.43338037",
"0.43301666"
] | 0.558238 | 1 |
open specified file, if exists | private File getFile(String path, String name)
{
File file = null;
boolean found = false;
String ext = "";
for (int i = 0; i < name.length(); i++)
ext += "" + ( (name.charAt(i) == '.') ? '\\' : name.charAt(i));
while(ext.length() > 0 && !found)
{
file = new File(path + "\\" + ext + ".java");
found = file != null && file.exists() && file.isFile();
ext = ext.substring(0, Math.max(0, ext.lastIndexOf('\\')));
}
return (found)?file:null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void open(String fileName);",
"File openFile();",
"public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }",
"public boolean open(String filename)\n {\n \n boolean retVal = open_0(nativeObj, filename);\n \n return retVal;\n }",
"private static Optional<InputStream> openFile(Path name) {\n try {\n return Optional.of(Files.newInputStream(name, StandardOpenOption.READ));\n } catch (IOException e) {\n System.err.printf(\"Unable to open file %s for reading: %s\\n\", name, e.toString());\n }\n\n return Optional.empty();\n }",
"public void\topen(File path) throws IOException;",
"private static File openFile(String file) {\r\n \tFile currFile;\r\n\r\n \tfor (String directory : dir) {\r\n \t\tcurrFile = new File(directory.concat(file));\r\n \t\tif (currFile.exists() && !currFile.isDirectory()) {\r\n \t\t\treturn currFile;\r\n \t\t}\r\n \t}\r\n \treturn null;\r\n }",
"public void open (File file)\n\t{\n\t\topen (file, false);\n\t}",
"public void fileOpen () {\n\t\ttry {\n\t\t\tinput = new Scanner(new File(file));\n\t\t\tSystem.out.println(\"file created\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file could not be created\");\n\t\t}\n\t}",
"public boolean openFile(String name){\n boolean tmp=false;\n\n try{\n _file = new File(name);\n tmp=_file.exists();\n if (tmp) {\n rows =new Vector<String>();\n loadTSPTWFile();\n if(DEBUG){\n System.out.println(\"Load new file:\"+name);\n }\n loadTSPTWFile();\n }\n }catch( IOException ioe){\n tmp=false;\n }\n\n return tmp;\n }",
"@Test\n public void testFileOpen() {\n \n FileHandler fileToTest;\n \n fileToTest = new FileHandler(\"Kalle.xml\");\n \n try {\n fileToTest.openFile();\n fail(\"Should have raised a fileNotFoundException\");\n }\n catch (FileNotFoundException fnf) {\n }\n }",
"public boolean open() {\n try {\n fileStream = new FileReader( this.fileName );\n scanner = new Scanner( fileStream );\n this.found = true;\n } catch ( FileNotFoundException error ) {\n this.found = false;\n System.out.println(error.toString());\n }\n\n return this.found;\n }",
"public void openFile(String file)\n\t{\n\t\tthis.file=file;\n\t\tSystem.out.println(\"file has been opened\");\n\t}",
"public static void openFile(File file) {\r\n try {\r\n System.out.println(file.toPath().toAbsolutePath());\r\n Runtime.getRuntime().exec(\"explorer /select,\" + file.toPath().toAbsolutePath());\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n }",
"@SuppressWarnings(\"resource\")\n public Scanner openFile() {\n boolean flag = false;\n Scanner input;\n\n while(!flag) {\n\t\t\tScanner scanned = new Scanner(System.in); \n\t if((scanned.next()).equals(\"game\")) {\n\t \tthis.fileName = scanned.next();\n\t try\n\t {\n\t File file = new File(\"./examples/\"+this.fileName);\n\t input = new Scanner(file);\n\t flag = true;\n\t return input;\n\t }\n\t catch (FileNotFoundException e)\n\t {\n\t \tSystem.err.println(\"File was not found, try again\");\n\t } \t\n\t }\n\t else {\n\t \tSystem.err.println(\"First command must be game, try again\");\n\t }\n }\n return null;\n }",
"public static void openFileForInput(String ID, String file, Function function,\n DawnParser parser) throws DawnRuntimeException\n {\n if (!isFileAvailable(ID, parser))\n {\n try\n {\n parser.setProperty(\"DAWN.IO#FILE.\" + ID, new BufferedReader(new FileReader(\n DawnUtilities.constructPath(file))));\n } catch (IOException ioe) {\n throw new DawnRuntimeException(function, parser, \"file \" + file + \" not found\");\n }\n } else\n throw new DawnRuntimeException(function, parser, \"file ID \" + ID + \" already exists\");\n }",
"public static void findFile() throws IOException {\n File newFile = new File(\"test.txt\");\n FileInputStream stream = new FileInputStream(newFile);\n }",
"public boolean openFile(SwingShabadEditor shabadEditor) throws IOException {\r\n \t\tint returnVal = fc.showOpenDialog(null);\r\n \t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\r\n \t\t\tFile file = fc.getSelectedFile();\r\n \r\n \t\t\tif (file.exists()) {\r\n \t\t\t\tshabadEditor.setText(FileUtils.readFileToString(file));\r\n \r\n \t\t\t\tcurFile = file;\r\n \t\t\t\treturn true;\r\n \t\t\t} else {\r\n \t\t\t\tDialogUtility.showFileDoesntExistDialog();\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn false;\r\n \t}",
"public void handleOpenFile (File inFile) {\n openFile (inFile);\n }",
"private void openFile()\r\n {\r\n int returnState = openFileChooser.showOpenDialog(frame);\r\n if (returnState == JFileChooser.APPROVE_OPTION) \r\n {\r\n File file = openFileChooser.getSelectedFile();\r\n openUriInBackground(file.toURI());\r\n } \r\n }",
"public InputStream open(File file) {\n return new FileInputStream(file);\n }",
"@Override\n\tpublic boolean isFileOpen(String fileName) \n\t{\n\t\treturn false;\n\t}",
"public void openFile(String file) {\n try {\n FileReader fr = new FileReader(file);\n in = new BufferedReader(fr);\n } catch (IOException e) {\n System.out.println(\"Filen kan ikke åbnes\");\n }\n }",
"@Override\n public StorageInputStream open(File file) throws FileNotFoundException {\n\treturn null;\n }",
"private static Scanner openFile(){\n\n System.out.println(\"Enter the input file name: \");\n Scanner kb = new Scanner(System.in);\n String fileName = kb.nextLine();\n try{\n return new Scanner(new File(fileName));\n }\n catch (Exception e){\n System.out.printf(\"Open Failed: \\n%s\\n\", e.toString());\n System.out.println(\"Please re-enter the filename.\");\n return openFile();\n }\n }",
"public InputStream openInputStream(String path) throws SystemException;",
"private FileInputStream loadFile(String file)\n\t{\n\t\tlogger.info(\"Fetching File : \"+System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file);\n\t\ttry \n\t\t{\n\t\t\treturn(new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file));\n\t\t} catch (FileNotFoundException e) {\t\t\t\t\n\t\t\tAssert.assertTrue(file+\" file is missing\", false);\n\t\t\treturn null;\n\t\t}\n\t}",
"void open(String fileName) throws IOException, ParserConfigurationException, SAXException;",
"RandomAccessFile openInputFile(String fileName) {\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"fileName = \" + fileName);\n RandomAccessFile file = null;\n try {\n file = new RandomAccessFile(fileName, \"r\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"success: file opened for read\");\n } catch (Exception e) {\n ec.processError(e, thisClass, \"openInputFile\", \"\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"error: file opened for read\");\n } // try-catch\n return file;\n }",
"@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }",
"void openResource(String resourcePath);",
"private void openFile(File file){\r\n\t\ttry {\r\n\t\t\tlocal.openFile(file);\r\n\t\t\topenFile = file;\r\n\t\t\tframe.setTitle(file.getName());\r\n\t\t\tedit = false;\r\n\t\t\tBibtexPrefs.addOpenedFile(file);\r\n\t\t\tpopulateRecentMenu();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\terrorDialog(e.toString());\r\n\t\t} catch (IllegalArgumentException e){\r\n\t\t\terrorDialog(\"The bibtex file \" +file.getPath()+ \" appears to be invalid.\\n\"\r\n\t\t\t\t\t+ \"Parsing error occured because you have the following in your file:\\n\"\r\n\t\t\t\t\t+e.getMessage());\r\n\t\t}\r\n\t}",
"public boolean openFile(String pathName) \r\n\t{\r\n\t\tboolean result;\r\n\t\t// This allows the opening of files located from this actual package.\r\n\t\tURL localPath = this.getClass().getResource(pathName);\r\n\t\tinputFile = new File(localPath.getFile());\r\n\r\n\t\t// Open input file. The input file is a field oriented and\r\n\t\t// space-separated.\r\n\t\t// The fields and expected formats are listed above in the header\r\n\r\n\t\t// Check to ensure that the inputFile exists\r\n\t\tif (!inputFile.exists()) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\\"\" +localPath + \"\\\" should be in the same directory as: \"\r\n\t\t\t\t\t\t\t\t+ this.getClass().getPackage().getName());\r\n\t\t\t\r\n\t\t\tresult = false;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\t// Create a buffered reader the file\r\n\t\t\t\tinFile = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\t\tnew FileInputStream((inputFile))));\r\n\r\n\t\t\t\tresult = true;\r\n\t\t\t} // try\r\n\t\t\tcatch (Exception Error) \r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t} // catch\r\n\t\t} // if\r\n\r\n\t\treturn (result);\r\n\t}",
"private void openFile(File file) {\n try {\n desktop.open(file);\n } catch (IOException e) {\n e.printStackTrace();\n// Logger.getLogger(\n// FileChooser.class.getName()).log(\n// Level.SEVERE, null, ex\n// );\n }\n }",
"public int open(String filename)\n {\n return open(filename, i_hdl); \n }",
"void openFilePath(String newFilePath) throws IllegalValueException;",
"public boolean fExists(){\n \n try(ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))){\n \n }\n catch (FileNotFoundException e){\n System.out.println(\"File not found\");\n return false;\n }\n catch (IOException e){\n System.out.println(\"Another exception\");\n return false;\n }\n\n return true;\n }",
"private static native boolean open_0(long nativeObj, String filename);",
"public void openFile(Path file) {\n openFiles(new ArrayList<>(List.of(file)));\n }",
"public void open() throws IOException;",
"public String open(String dirName) throws RemoteException;",
"public static void openFile(File file) throws IOException {\n\n\t\tif (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.OPEN))\n\t\t\tDesktop.getDesktop().open(file);\n\t}",
"private boolean fileExists(Path p) {\n\t\treturn Files.exists(p);\n\t}",
"SparseStream openFile(String path, FileMode mode) throws IOException;",
"@Override\n public boolean exists(File file) {\n\treturn false;\n }",
"void open() throws IOException;",
"public boolean execute() {\n\t\tboolean result = false;\n\t\t\n\t\tif (this.exists()) {\n\t\t\ttry {\n\t\t\t\tDesktop.getDesktop().open(this);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} else {\n\t\t\tSystem.out.println(\"file not found: \" + this.getAbsolutePath());\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"private File getFile(String filename) throws Exception {\n\t\tFile file = new File(filename);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t} else if (!file.isAbsolute()) {\n\t\t\tfinal Resource r = context.getThisInstance().eResource();\n\t\t\tfinal Path p = new Path(r.getURI().segment(1) + File.separator + filename);\n\t\t\tfinal IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(p);\n\t\t\tif (f.exists()) {\n\t\t\t\treturn f.getRawLocation().makeAbsolute().toFile();\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception(\"Filename \" + filename + \" not found\");\n\n\t}",
"public void openFile(File selectedFile) {\n System.err.println(\"selected: \" + selectedFile);\n }",
"private boolean doesFileExist(String qualifiedFileName) throws FileNotFoundException {\n\t\t\n\t\t// First get a path object to where the file is.\n\t\t\n\t\tPath inWhichFolder = Paths.get(qualifiedFileName);\n\t\t\n\t\tboolean isFilePresent = (Files.exists(inWhichFolder) && Files.isReadable(inWhichFolder) && !Files.isDirectory(inWhichFolder));\n\t\t\n\t\tif (!isFilePresent) {\n\t\t\tthrow new FileNotFoundException(String.format(\"The file you specified '%s' does not exist or cannot be found!\", qualifiedFileName));\n\t\t\t\n\t\t}\n\t\t\n\t\t// If we're here then we should have a file that can be opened and read.\n\t\t\n\t\treturn isFilePresent;\n\t\t\n\t}",
"SparseStream openFile(String path, FileMode mode, FileAccess access) throws IOException;",
"void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}",
"public static boolean open(final FileObject fo, final int offset, final String search) {\n if (!SwingUtilities.isEventDispatchThread()) {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n doOpen(fo, offset, search);\n }\n });\n\n return true; // not exactly accurate, but....\n }\n\n return doOpen(fo, offset, search);\n }",
"private static File openFile(String path, FileSystem fs) {\n fs.updatePath();\n String fullFilePath;\n if (path.startsWith(\"/\")) {\n // path is abs\n fullFilePath = path;\n } else {\n // path is rel\n fullFilePath = fs.getCurrentPath() + path;\n }\n\n File targetFile = (File) fs.checkPath(fullFilePath, \"file\");\n if (targetFile == null) {\n // check for parent if it's null too\n String[] parentPathArr = fs.getParent(fullFilePath);\n if (!parentPathArr[0].startsWith(\"/\")) {\n // convert parent path to absolute\n parentPathArr[0] = toAbsPathStr(parentPathArr[0], fs);\n }\n Directory parentDir =\n (Directory) fs.checkPath(parentPathArr[0], \"directory\");\n if (parentDir == null) {\n // invalid parent path => the given path is invalid\n ErrorHandler.getErrorMessage(fullFilePath + \" is invalid path\");\n } else {\n // create file under the parentDir if name is okay\n if (fs.isValidNameForFileSystem(parentPathArr[1])) {\n targetFile = fs.createFileWithParent(parentPathArr[1], parentDir);\n } else {\n ErrorHandler.getErrorMessage(\"invalid file name\");\n }\n }\n }\n return targetFile;\n }",
"public String openFile() {\n\t\t\n\t\tString chosenFile = \"\";\n\t\treturn chosenFile;\n\t\t\n\t}",
"public boolean fileExists(String name){\r\n try{\r\n new BufferedReader(new FileReader(\"../profiles/\" + name + \".profile\"));\r\n return true;\r\n }\r\n catch(FileNotFoundException e){\r\n return false;\r\n }\r\n }",
"private static File identifyFile() {\n try {\n File inputFile = new File(\"inputFile.txt\");\n if (inputFile.createNewFile()) {\n System.out.println(\"Debug : File Created\");\n } else {\n System.out.println(\"Debug : File Exists\");\n }\n return inputFile;\n } catch (IOException e) {\n System.out.println(\"Error reading input\");\n e.printStackTrace();\n }\n return null;\n }",
"public void open(String file) {\n try {\n Desktop.getDesktop().open(new File(file));\n } catch (IOException error) {\n System.err.println(error.getMessage());\n }\n }",
"private void openFile(String name){\n File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n File file = new File(path, \"\"+name);\n\n Intent install = new Intent(Intent.ACTION_VIEW);\n install.setDataAndType(Uri.fromFile(file), \"application/pdf\");\n install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(install);\n\n }",
"public void openFile(File file) {\n// new FileSystem().readFile(addressBook, file);\n// addressBook.fireTableDataChanged();\n }",
"@Override\n public InputStream openInternalInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }",
"public void openFile() {\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n\t\tint returnVal = fc.showOpenDialog(null);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fc.getSelectedFile();\n\t filename.setText(file.getName());\n\t try {\n\t\t\t\tmodel.FileContent(file);\t//read the content of the input file\n\t\t\t\tplotContent.repaint();\t//repaint the JComponent\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void openFile(@NotNull final String path) {\n openFile(fm -> fm.load(path));\n }",
"@Override\n public InputStream open() throws IOException {\n return getClass().getClassLoader().getResourceAsStream(name);\n }",
"private void tryToOpen() {\n if (current != null) {\n if (!this.tryToClose()) return;\n }\n\n //open an existing file...\n JFileChooser chooser = new JFileChooser(new File(\".\"));\n chooser.setDialogTitle(\"Select model file\");\n chooser.setFileFilter(new FileNameExtensionFilter(\n \"Only xml files\",\"xml\"\n ));\n\n int result = chooser.showOpenDialog(this);\n if (result == JFileChooser.APPROVE_OPTION) {\n File file = chooser.getSelectedFile();\n try {\n current = new Document(file);\n this.update();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"ERROR: the file '\" + file.getName() + \"' could not be opened!\", \"An Error Occured\", JOptionPane.ERROR_MESSAGE);\n// e.printStackTrace();\n }\n }\n }",
"private void openFile(File file)\n {\n String imagePath = file.toURI().toString();\n Image image = new Image(imagePath);\n if ( image == null || image.isError())\n {\n showInvalidFileFormatError();\n } else\n {\n bufferImage = image;\n changeAvatarCircle.setFill(new ImagePattern(image));\n imagePathLabel.setText(imagePath);\n }\n }",
"public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"private File tryLoadFile() throws FileNotFoundException {\n boolean fileLoadedSuccessfully = false;\n \n if (fileLoadedSuccessfully) {\n return new File(FILE_PATH);\n }\n else {\n throw new FileNotFoundException(\"Could not load file with path \" + FILE_PATH);\n }\n }",
"public boolean exist(String fileName) throws DataAccessException;",
"FileObject getFile();",
"FileObject getFile();",
"public static File getFile(String resourceOrFile)\n throws FileNotFoundException {\n\n try {\n File file = new File(resourceOrFile);\n if (file.exists()) {\n return file;\n }\n } catch (Exception e) {// nope\n }\n\n return getFile(resourceOrFile, Thread.class, false);\n }",
"private boolean open() {\r\n\t\tfor ( int i = 0; i < _headerObject._filenames.length; ++i) {\r\n\t\t\tFileObject fileObject = ( FileObject)_headerObject._fileObjectMap.get( _headerObject._filenames[ i]);\r\n\t\t\tif ( null == fileObject)\r\n\t\t\t\treturn false;\r\n\r\n\t\t\tif ( !fileObject.open())\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"void getFile(String path, OutputStream stream) throws NotFoundException, IOException;",
"@Override\n public CommandResult execute() throws CommandException {\n if ((new File(filepath)).exists()) {\n try {\n model.openFilePath(filepath);\n return new CommandResult(MESSAGE_SUCCESS + filepath);\n } catch (IllegalValueException e) {\n throw new CommandException(MESSAGE_INVALID_XML_FILE);\n }\n } else {\n throw new CommandException(MESSAGE_FAILURE + MESSAGE_USAGE);\n }\n }",
"private int handleOpen(int name) {\n\t\tString FileName = readVirtualMemoryString(name, MAXSTRLEN);\n\t\t//error if file name is not valid\n\t\tif(FileName == null)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\n\t\t//find a free file descriptor\n\t\tint fileIndex = -1;\n\t\tfor(int i = 2; i < 16; i++)\n\t\t{\n\t\t\tif(fileDescriptors[i] == null)\n\t\t\t{\n\t\t\t\tfileIndex = i;\n\t\t\t}\n\t\t}\n\n\t\t//error if no file descriptor is free\n\t\tif(fileIndex == -1)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\n\t\tOpenFile file = ThreadedKernel.fileSystem.open(FileName, false);\n\n\t\t//error if file cannot be created\n\t\tif(file == null)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfileDescriptors[fileIndex] = file;\n\t\t\treturn fileIndex;\n\t\t}\n\t}",
"public static File checkDescriptorFileExist(File descriptor) throws IllegalArgumentException {\n if (!descriptor.exists()) {\n throw new IllegalArgumentException(descriptor.getAbsolutePath() + \" does not exist\");\n }\n if (!descriptor.isFile()) {\n throw new IllegalArgumentException(descriptor.getAbsolutePath() + \" is not a file\");\n }\n if (!descriptor.canRead()) {\n throw new IllegalArgumentException(descriptor.getAbsolutePath() + \" is not readable\");\n }\n \n return descriptor;\n }",
"File retrieveFile(String absolutePath);",
"public boolean fileExists(Context context, String filename)\r\n{\r\n File file = context.getFileStreamPath(filename);\r\n if(file == null || !file.exists())\r\n {\r\n return false;\r\n }\r\nreturn true;\r\n}",
"boolean isFile() throws IOException;",
"InputStream openStream() throws IOException;",
"boolean fileExists(String path) throws IOException;",
"public static void openFile(File map) throws IOException {\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(map));\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to open map file.\");\n\t\t\tthrow e;\n\t\t}\n\t}",
"protected abstract InputStream getFile(final String path);",
"public static boolean launch(File file) throws IOException {\n\n String cmd = getCommand(file);\n if (!cmd.isEmpty()) {\n Runtime.getRuntime().exec(cmd);\n return true;\n } else {\n // Unknown OS, try Java awt \"Desktop\" approach\n if (Desktop.isDesktopSupported()) {\n Desktop.getDesktop().open(file);\n return true;\n }\n }\n\n return false;\n }",
"public void handleOpenFile (FileSpec fileSpec) {\n this.fileSpec = fileSpec;\n openFile (fileSpec.getFile());\n }",
"public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }",
"public boolean searchFile(FileObject file)\n throws IllegalArgumentException;",
"private static void searchFile(File fileDir) throws Exception {\n String fileName = getFileNameInput();\n File targetFile = new File(fileDir.toString() + \"\\\\\" + fileName);\n boolean fileExists = targetFile.exists();\n if (fileExists) {\n System.out.println(\"File is found on current directory.\");\n } else {\n throw new FileNotFoundException(\"No such file on current directory.\");\n }\n }",
"private void open() {\n\t\tint state = fileChooser.showOpenDialog(this);\n\t\tswitch (state) {\n\t\tcase JFileChooser.CANCEL_OPTION:\n\t\t\tbreak;\n\t\tcase JFileChooser.APPROVE_OPTION:\r\n\t\t\tFile file = fileChooser.getSelectedFile();\r\n\t\t\t//System.out.println(\"Getting file...\");\r\n\t\t\ttry {\r\n\t\t\t\tfis = new FileInputStream(file);\r\n\t\t\t\tbyte[] b = new byte[fis.available()];\r\n\t\t\t\tif (fis.read(b) == b.length) {\r\n\t\t\t\t\t//System.out.println(\"File read: \" + file.getName());\r\n\t\t\t\t}\r\n\t\t\t\tdistributable = new Distributable(file.getName(), b);\r\n\t\t\t\tdiscoveryRelay.setDistributable(distributable);\r\n\t\t\t} \r\n\t\t\tcatch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} \r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\n\t\t\tbreak;\n\t\tcase JFileChooser.ERROR_OPTION:\n\t\t}\n\t}",
"public void openBuildFile( String filename ) {\n if ( filename == null )\n return ;\n File f = new File( filename );\n openBuildFile( f );\n }",
"CompletableFuture<Optional<FutureLineStorage>> open(String fileName);",
"public DataInputStream openFile(String roleFile) throws IOException {\n return Util.open(\"/role/\" + roleFile);\n //#endif\n }",
"public File openFile() {\r\n\r\n\t\tFile chosenFile = fileChooser.showOpenDialog(fileChooserDialog);\r\n\t\treturn chosenFile;\r\n\t}",
"public FileInputStream openFileInput(final String path)\n throws java.io.FileNotFoundException {\n return GDFileSystem.openFileInput(path);\n }",
"@SuppressWarnings(\"unused\")\r\n\tprivate static File createFile(String path) {\r\n\t\t\r\n\t\t// open the file\r\n\t\tFile currentFile = new File(path);\r\n\t\t\r\n\t\t\r\n\t\t// check if it is a valid file\r\n\t\tif (currentFile == null) {\r\n\t\t\tSystem.out.println(\"Could not create the file\");\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\r\n\t\t// hopefully things went perfect\r\n\t\treturn currentFile;\r\n\r\n\t}",
"public abstract FD open(UnixRuntime r, String path, int flags, int mode) throws ErrnoException;",
"boolean hasFileLocation();",
"boolean hasFileLoc();",
"@Override\n public InputStream openStream() throws IOException\n {\n return new FileInputStream(temp);\n }",
"@SuppressWarnings(\"ResultOfMethodCallIgnored\")\r\n private static void fileExists(String filepath) throws IOException {\r\n File file = new File(filepath + filePath);\r\n if (!file.exists()) {\r\n file.createNewFile();\r\n }\r\n }"
] | [
"0.6979032",
"0.6837421",
"0.67282075",
"0.65236646",
"0.6451785",
"0.64071685",
"0.63758934",
"0.6257852",
"0.6219995",
"0.61905336",
"0.6167947",
"0.6111698",
"0.6065013",
"0.6020558",
"0.6015075",
"0.6002783",
"0.5973121",
"0.5964091",
"0.59279716",
"0.5922598",
"0.58981484",
"0.5876841",
"0.58765316",
"0.5832374",
"0.5820668",
"0.57667017",
"0.57485217",
"0.57401484",
"0.57169616",
"0.5712315",
"0.5711473",
"0.57079643",
"0.56964535",
"0.5691746",
"0.5683469",
"0.56797403",
"0.56696135",
"0.56598157",
"0.56588036",
"0.5638425",
"0.5622546",
"0.5614787",
"0.55895424",
"0.55789924",
"0.5578042",
"0.55749655",
"0.5572058",
"0.5571624",
"0.55669385",
"0.5564592",
"0.55601454",
"0.55567366",
"0.5537049",
"0.5531172",
"0.5528637",
"0.552818",
"0.55274427",
"0.55100334",
"0.5506641",
"0.5496596",
"0.5494656",
"0.549199",
"0.54916835",
"0.54884744",
"0.547792",
"0.5471704",
"0.54658544",
"0.5457678",
"0.5451956",
"0.54443717",
"0.54443717",
"0.54366684",
"0.5426663",
"0.5426522",
"0.5412867",
"0.5412425",
"0.54089385",
"0.540654",
"0.5404949",
"0.5403884",
"0.5398034",
"0.5393639",
"0.5392261",
"0.5388525",
"0.5387177",
"0.53869265",
"0.53683555",
"0.5359213",
"0.5358728",
"0.5358546",
"0.5357704",
"0.5353782",
"0.53504765",
"0.5349164",
"0.53466696",
"0.5345552",
"0.53379226",
"0.5336866",
"0.53340816",
"0.53322333",
"0.5328643"
] | 0.0 | -1 |
load header named name | public Header [] addHeader(Header [] list, String name)
{
String st = null;
for(int i = 0; i < built.size(); i++, st = null)
{
st = (String)built.get(i);
String tail = st.substring(st.lastIndexOf('\\') + 1);
tail = tail.substring(0, tail.indexOf('.'));
if (tail.compareToIgnoreCase(name) == 0)
break;
}
if (st != null)
{
Header [] newList = new Header[list.length + 1];
for (int k = 0; k < newList.length - 1; k++)
newList[k] = list[k];
st = st.substring(0, st.lastIndexOf('.')) + ".h";
System.out.println("loading " + st);
newList[newList.length - 1] = new Header(st, depth + 1); // load header
list = newList;
connectClasses(list);
}
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void loadHeader() {\n\r\n\t}",
"String getHeader(String headerName);",
"boolean containsHeader(String name);",
"@Override\n\tpublic boolean containsHeader(String name) {\n\t\treturn false;\n\t}",
"public Header getHeaderByKey(String key);",
"public String getHeader(final String name) {\n return headers.get(name);\n }",
"@Override\n\t\tpublic String getHeader(String name) {\n\t\t\treturn null;\n\t\t}",
"private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }",
"public Header getHeader(String headerName) {\n if (headerName == null) throw new NullPointerException(\"bad name\");\n SIPHeader sipHeader = (SIPHeader)\n this.nameTable.get(headerName.toLowerCase());\n if (sipHeader instanceof SIPHeaderList)\n return (Header) ((SIPHeaderList) sipHeader).getFirst();\n else return (Header) sipHeader;\n }",
"com.didiyun.base.v1.Header getHeader();",
"public String getHeader(final String name) {\n final Collection<String> strings = headers.get(name);\n return strings == null ? null : strings.iterator().next();\n }",
"private void loadNavHeader() {\n SharedPreferences prefs = getSharedPreferences(LOG_IN_PREFS_NAME, MODE_PRIVATE);\n userName = prefs.getString(\"userName\", \"No token generated\");\n userEmail = prefs.getString(\"email\", \"No token generated\");\n userAvatarName = prefs.getInt(\"userAvatar\", 0);\n\n // name, email, profileImage\n navHeaderUserName.setText(userName);\n navHeaderUserEmail.setText(userEmail);\n imgNavHeaderProfile.setImageResource(ProfileImageAssets.getProfileImages().get(userAvatarName));\n\n }",
"public void mapHeader(){\r\n\t\tString header = readNextLine();\r\n\t\tif (header == null) return;\r\n\t\t\r\n\t\tString split[] = header.split(Constants.SPLIT_MARK);\r\n\t\tfor (int i=0; i < Constants.HEADER.length; i++){\r\n\t\t\tmapHeader.put(Constants.HEADER[i], Constants.UNKNOWN);\r\n\t\t\tfor (int j = 0; j < split.length; j++){\r\n\t\t\t\tif (Constants.HEADER[i].equals(split[j])){\r\n\t\t\t\t\tmapHeader.put(Constants.HEADER[i], j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void addHeader(String headerName, String headerValue);",
"java.lang.String getHeader();",
"private void initializeKnownHeaders() {\r\n needParceHeader = true;\r\n \r\n addMainHeader(\"city\", getPossibleHeaders(DataLoadPreferences.NH_CITY));\r\n addMainHeader(\"msc\", getPossibleHeaders(DataLoadPreferences.NH_MSC));\r\n addMainHeader(\"bsc\", getPossibleHeaders(DataLoadPreferences.NH_BSC));\r\n addMainIdentityHeader(\"site\", getPossibleHeaders(DataLoadPreferences.NH_SITE));\r\n addMainIdentityHeader(\"sector\", getPossibleHeaders(DataLoadPreferences.NH_SECTOR));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_CI, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_CI));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_LAC, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_LAC));\r\n addMainHeader(INeoConstants.PROPERTY_LAT_NAME, getPossibleHeaders(DataLoadPreferences.NH_LATITUDE));\r\n addMainHeader(INeoConstants.PROPERTY_LON_NAME, getPossibleHeaders(DataLoadPreferences.NH_LONGITUDE));\r\n // Stop statistics collection for properties we will not save to the sector\r\n addNonDataHeaders(1, mainHeaders);\r\n \r\n // force String types on some risky headers (sometimes these look like integers)\r\n useMapper(1, \"site\", new StringMapper());\r\n useMapper(1, \"sector\", new StringMapper());\r\n \r\n // Known headers that are sector data properties\r\n addKnownHeader(1, \"beamwidth\", getPossibleHeaders(DataLoadPreferences.NH_BEAMWIDTH), false);\r\n addKnownHeader(1, \"azimuth\", getPossibleHeaders(DataLoadPreferences.NH_AZIMUTH), false);\r\n }",
"@Override\n public String getHeaderField(String name) {\n return jarUrlConnection.getHeaderField(name);\n }",
"void setHeader(java.lang.String header);",
"private void loadNavHeader() {\n\t\t// name, Email\n\t\ttxtName.setText(\"Tester\");\n\t\ttxtEmail.setText(\"[email protected]\");\n\t}",
"private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }",
"@Override\n public String getHeader(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return getAuthorizationHeader();\n } else {\n return super.getHeader(name);\n }\n }",
"HttpClientRequest header(CharSequence name, CharSequence value);",
"Header createHeader();",
"IAudioHeader readHeader(InputStream inputStream) throws AudioReaderException, InvalidFormatException;",
"void setHeader(String headerName, String headerValue);",
"public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}",
"public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }",
"public String getHeader();",
"String[] getHeader(String key);",
"void removeHeader(String headerName);",
"public abstract Source load(ModuleName name);",
"public String[] getHeader(String name) throws MessagingException {\n/* 363 */ if (this.headers == null)\n/* 364 */ loadHeaders(); \n/* 365 */ return this.headers.getHeader(name);\n/* */ }",
"private void loadNavHeader() {\n // name, website\n txtName.setText(\"Ashish Jain\");\n txtWebsite.setText(\"[email protected]\");\n\n navigationView.getMenu().getItem(3).setActionView(R.layout.menu_dot);\n }",
"@Override\n\tpublic void addHeader(String name, String value) {\n\t}",
"List<? extends Header> getHeaders(String name);",
"@Override\n public boolean containsHeader(String arg0) {\n return false;\n }",
"private void loadNavHeader() {\n // name, website\n txtName.setText(StoreData.LoadString(Constants.NAME,\"Anonymous\",getApplicationContext()));\n txtWebsite.setText(StoreData.LoadString(Constants.EMAIL,\"anonymous\",getApplicationContext()));\n urlProfileImg = StoreData.LoadString(Constants.IMGURL,\"\",getApplicationContext());\n // loading header background image\n Glide.with(this).load(urlNavHeaderBg)\n .crossFade()\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imgNavHeaderBg);\n\n // Loading profile image\n Glide.with(this).load(urlProfileImg)\n .crossFade()\n .placeholder(R.drawable.anonymous_profile_pic)\n .error(R.drawable.anonymous_profile_pic)\n .thumbnail(0.5f)\n .bitmapTransform(new CircleTransform(this))\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imgProfile);\n\n // showing dot next to notifications label\n navigationView.getMenu().getItem(3).setActionView(R.layout.menu_dot);\n }",
"public HeaderData get(String key){\r\n\t\treturn map.get(key);\r\n\t}",
"String getHeader(HttpServletRequest request, String name) throws ValidationException;",
"public void parseHeader()\n {\n\n Hashtable table = new Hashtable();\n String[] lines = Utilities.splitString(header, \"\\r\\n\"); //Break everything into lines\n String[] line1 = Utilities.splitString(header, \" \"); //Break the 1st header line Ex: GET / HTTP/1.1\n method = line1[0].trim();\n file = line1[1].trim();\n Utilities.debugLine(\"WebServer.parseHeader(): \" + lines[0], DEBUG);\n\n //For the remainder of the headers, parse the requestFields.\n for (int i = 1; i < lines.length - 1; i++)\n {\n String[] tempLine = Utilities.splitStringOnce(lines[i], \":\");\n table.put(tempLine[0].trim(), tempLine[1].trim());\n }\n headerFields = table;\n }",
"private void updateHeader() {\n this.mViewHolder.imageView = findViewById(R.id.image_header);\n this.mViewHolder.textHeader = findViewById(R.id.text_nav_header);\n\n this.mViewHolder.textHeader.setText(_NAME);\n\n Glide.with(this).load(user.getPhotoUrl()).into(this.mViewHolder.imageView);\n\n }",
"private static HeaderData readHeader(byte[] data) throws UnknownHostException {\n\t\tInetAddress ip = InetAddress.getByAddress(Arrays.copyOfRange(data, 4, 8));\n\t\t\n\t\tString label = new String(Arrays.copyOfRange(data, 0, 4), Charset.forName(\"UTF-8\"));\n\n\t\tint port = 0;\n\t\tport += data[8] << 24 & 0xFF000000;\n\t\tport += data[9] << 16 & 0xFF0000;\n\t\tport += data[10] << 8 & 0xFF00;\n\t\tport += data[11] & 0xFF;\n\t\t\n\t\treturn new HeaderData(label, ip, port);\n\t}",
"protected void parseHeader(String line){\n headerMap = new LinkedHashMap<>();\n String[] bits = line.split(delimiter);\n for (int i = 0; i < bits.length; i++){\n headerMap.put(bits[i], i);\n }\n }",
"@Override\n public boolean containsHeader(String name) {\n return this._getHttpServletResponse().containsHeader(name);\n }",
"protected void addDynamicHeaders() {\n }",
"public static void header(String s) {\n\t\t// header2.set(s);\n\t}",
"public String getHeader(String name, String delimiter) throws MessagingException {\n/* 382 */ if (this.headers == null)\n/* 383 */ loadHeaders(); \n/* 384 */ return this.headers.getHeader(name, delimiter);\n/* */ }",
"protected void initializeHeader() throws PiaRuntimeException, IOException{\n try{\n super.initializeHeader();\n if( firstLineOk && headersObj == null ){\n\t// someone just give us the first line\n\theadersObj = new Headers();\n }\n }catch(PiaRuntimeException e){\n throw e;\n }catch(IOException ioe){\n throw ioe;\n }\n }",
"public boolean hasHeader(String headerName) {\n return nameTable.containsKey(headerName.toLowerCase());\n }",
"public T addHeader(String name,String value){\n if(TextUtils.isEmpty(name) || TextUtils.isEmpty(value)){\n throw new EasyNetException(\"header name or value is empty\");\n }\n if(headers == null){\n headers = new ArrayMap<>(5);\n }\n headers.put(name,value);\n return (T) this;\n }",
"public void setHeader(String header) {\n this.header = header;\n }",
"ComponentHeaderType getHeader();",
"void removeHeader(@NonNull String name) {\n headers.remove(name);\n }",
"Headers getHeaders();",
"HttpRequest(){\n HttpHeader.getInstance().loadHeaderList(\"src/main/resources/headerList.txt\");\n }",
"public Object initialize(final File source) throws FileNotFoundException {\n List<String> header = null;\n int linesLookedAt = 0;\n xReadLines reader = new xReadLines(source);\n \n for ( String line : reader ) {\n Matcher m = HEADER_PATTERN.matcher(line);\n if ( m.matches() ) {\n //System.out.printf(\"Found a header line: %s%n\", line);\n header = new ArrayList<String>(Arrays.asList(line.split(DELIMITER_REGEX)));\n //System.out.printf(\"HEADER IS %s%n\", Utils.join(\":\", header));\n }\n \n if ( linesLookedAt++ > MAX_LINES_TO_LOOK_FOR_HEADER )\n break;\n }\n \n // check that we found the header\n if ( header != null ) {\n logger.debug(String.format(\"HEADER IS %s%n\", Utils.join(\":\", header)));\n } else {\n // use the indexes as the header fields\n logger.debug(\"USING INDEXES FOR ROD HEADER\");\n // reset if necessary\n if ( !reader.hasNext() )\n reader = new xReadLines(source);\n header = new ArrayList<String>();\n int tokens = reader.next().split(DELIMITER_REGEX).length;\n for ( int i = 0; i < tokens; i++)\n header.add(Integer.toString(i));\n }\n \n return header;\n }",
"private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}",
"@Override\n\t\tpublic int getIntHeader(String name) {\n\t\t\treturn 0;\n\t\t}",
"protected void readHeader() {\n // Denote no lines have been read.\n this.lineCount = 0;\n // Read the header.\n if (! this.reader.hasNext()) {\n // Here the entire file is empty. Insure we get EOF on the first read.\n this.nextLine = null;\n } else {\n this.headerLine = this.reader.next();\n // Parse the header line into labels and normalize them to lower case.\n this.labels = this.splitLine(headerLine);\n // Set up to return the first data line.\n this.readAhead();\n }\n }",
"@Override\n public void addHeader(String arg0, String arg1) {\n\n }",
"protected void loadGridHeader(HttpServletRequest request,\r\n String anchorColumnName,\r\n String gridHeaderLayerId) {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"loadGridHeader\", new Object[]{request, anchorColumnName, gridHeaderLayerId});\r\n }\r\n\r\n if (StringUtils.isBlank(anchorColumnName) || StringUtils.isBlank(gridHeaderLayerId)) {\r\n throw new IllegalArgumentException(\"Anchor column name or grid header layer may not be emtpy.\");\r\n }\r\n\r\n OasisFields fields = (OasisFields) request.getAttribute(IOasisAction.KEY_FIELDS);\r\n WebLayer layerFields = fields.getLayerFieldsMap(gridHeaderLayerId);\r\n String gridHeaderBeanName = \"gridHeaderBean\";\r\n XMLGridHeaderDOMLoader xmlLoader = new XMLGridHeaderDOMLoader(servlet.getServletContext());\r\n XMLGridHeader xmlHeader = xmlLoader.getHeader();\r\n xmlHeader.setGridHeaderFieldnameSuffix(null);\r\n xmlHeader.setFields(layerFields);\r\n xmlHeader.setAnchorColumnName(anchorColumnName);\r\n xmlHeader.setGridHeaderDefinesDisplayableColumnOrder(gridHeaderDefinesDisplayableColumnOrder());\r\n request.setAttribute(gridHeaderBeanName, xmlHeader);\r\n\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"loadGridHeader\");\r\n }\r\n }",
"@Test(expected=RuntimeException.class)\n public void missingPartOfHeader(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invalid_for_testing.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();}",
"private void readHeader() throws IOException {\n\n header = new byte[ShapeConst.SHAPE_FILE_HEADER_LENGTH];\n\n /*\n * Make sure we're at the beginning of the file\n */\n rafShp.seek(0); \n\n rafShp.read(header, 0, ShapeConst.SHAPE_FILE_HEADER_LENGTH);\n\n int fileCode = ByteUtils.readBEInt(header, 0);\n\n if (fileCode != ShapeConst.SHAPE_FILE_CODE) {\n\n throw new IOException(\"Invalid file code, \" + \"probably not a shape file\");\n\n }\n\n fileVersion = ByteUtils.readLEInt(header, 28);\n\n if (fileVersion != ShapeConst.SHAPE_FILE_VERSION) {\n\n throw new IOException(\"Unable to read shape files with version \" +\n fileVersion);\n\n }\n\n fileLength = ByteUtils.readBEInt(header, 24);\n\n /* \n * convert from 16-bit words to 8-bit bytes\n */\n fileLength *= 2;\n\n fileShapeType = ByteUtils.readLEInt(header, 32);\n\n /*\n * read ESRIBoundingBox and convert to SHPEnvelope\n */\n fileMBR = new SHPEnvelope(ShapeUtils.readBox(header, 36));\n\n }",
"public boolean readHeader(final boolean loadTagBuffer) throws IOException {\r\n int[] extents;\r\n String type, // type of data; there are 7, see FileInfoDicom\r\n name; // string representing the tag\r\n\r\n boolean endianess = FileBase.LITTLE_ENDIAN; // all DICOM files start as little endian (tags 0002)\r\n boolean flag = true;\r\n\r\n if (loadTagBuffer == true) {\r\n loadTagBuffer();\r\n }\r\n\r\n String strValue = null;\r\n Object data = null;\r\n FileDicomSQ sq = null;\r\n\r\n try {\r\n extents = new int[2];\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory in FileDicom.readHeader\");\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n throw new IOException(\"Out of Memory in FileDicom.readHeader\");\r\n }\r\n\r\n metaGroupLength = 0;\r\n elementLength = 0;\r\n fileInfo.setEndianess(endianess);\r\n\r\n skipBytes(ID_OFFSET); // Find \"DICM\" tag\r\n\r\n // In v. 3.0, within the ID_OFFSET is general header information that\r\n // is not encoded into data elements and not present in DICOM v. 2.0.\r\n // However, it is optional.\r\n\r\n if ( !getString(4).equals(\"DICM\")) {\r\n fileInfo.containsDICM = false;\r\n seek(0); // set file pointer to zero\r\n }\r\n\r\n fileInfo.setDataType(ModelStorageBase.SHORT); // Default file type\r\n\r\n final FileDicomTagTable tagTable = fileInfo.getTagTable();\r\n\r\n while (flag == true) {\r\n\r\n int bPtrOld = bPtr;\r\n boolean isPrivate = false;\r\n if (fileInfo.containsDICM) {\r\n\r\n // endianess is defined in a tag and set here, after the transfer\r\n // syntax group has been read in\r\n if (getFilePointer() >= (ID_OFFSET + 4 + metaGroupLength)) {\r\n endianess = fileInfo.getEndianess();\r\n // Preferences.debug(\"endianess = \" + endianess + \"\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n } else {\r\n\r\n if (getFilePointer() >= metaGroupLength) {\r\n endianess = fileInfo.getEndianess();\r\n }\r\n }\r\n\r\n // ******* Gets the next element\r\n getNextElement(endianess); // gets group, element, length\r\n name = convertGroupElement(groupWord, elementWord);\r\n\r\n if (name.equals(\"2005,140F\")) {\r\n System.out.println(\"Begin debug analysis.\");\r\n }\r\n\r\n final FileDicomKey key = new FileDicomKey(name);\r\n int tagVM;\r\n\r\n // Preferences.debug(\"group = \" + groupWord + \" element = \" + elementWord + \" length = \" +\r\n // elementLength + \"\\n\", Preferences.DEBUG_FILEIO);\r\n\r\n if ( (fileInfo.vr_type == FileInfoDicom.IMPLICIT) || (groupWord == 2)) {\r\n\r\n // implicit VR means VR is based on tag as defined in dictionary\r\n type = DicomDictionary.getType(key);\r\n tagVM = DicomDictionary.getVM(key);\r\n\r\n // the tag was not found in the dictionary..\r\n if (type == null) {\r\n type = \"typeUnknown\";\r\n tagVM = 0;\r\n }\r\n } else { // Explicit VR\r\n // System.err.println(\"Working with explicit: \"+key);\r\n\r\n type = FileDicomTagInfo.getType(new String(vr));\r\n\r\n if ( !DicomDictionary.containsTag(key)) { // a private tag\r\n tagVM = 0;\r\n isPrivate = true;\r\n } else { // not a private tag\r\n\r\n final FileDicomTagInfo info = DicomDictionary.getInfo(key);\r\n // this is required if DicomDictionary contains wild card characters\r\n info.setKey(key);\r\n tagVM = info.getValueMultiplicity();\r\n }\r\n }\r\n\r\n if ( (elementWord == 0) && (elementLength == 0)) { // End of file\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Error: Unexpected end of file: \" + fileName\r\n + \" Unable to load image.\");\r\n }\r\n\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n\r\n if ( (getFilePointer() & 1) != 0) { // The file location pointer is at an odd byte number\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Error: Input file corrupted. Unable to load image.\");\r\n }\r\n\r\n // System.err.println(\"name: \"+ name + \" , len: \" + Integer.toString(elementLength, 0x10));\r\n System.err.println(\"ERROR CAUSED BY READING IMAGE ON ODD BYTE\");\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n\r\n try {\r\n bPtrOld = bPtr;\r\n if (type.equals(\"typeString\")) {\r\n strValue = getString(elementLength);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n data = getByte(tagVM, elementLength, endianess);\r\n }\r\n } else if (type.equals(\"otherWordString\") && !name.equals(\"0028,1201\") && !name.equals(\"0028,1202\")\r\n && !name.equals(\"0028,1203\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n data = getByte(tagVM, elementLength, endianess);\r\n }\r\n } else if (type.equals(\"typeShort\")) {\r\n data = getShort(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeInt\")) {\r\n data = getInteger(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeFloat\")) {\r\n data = getFloat(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeDouble\")) {\r\n data = getDouble(tagVM, elementLength, endianess);\r\n }\r\n // (type == \"typeUnknown\" && elementLength == -1) Implicit sequence tag if not in DICOM dictionary.\r\n else if (type.equals(\"typeSequence\") || ( (type == \"typeUnknown\") && (elementLength == -1))) {\r\n final int len = elementLength;\r\n\r\n // save these values because they'll change as the sequence is read in below.\r\n Preferences.debug(\"Sequence Tags: (\" + name + \"); length = \" + len + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n sq = (FileDicomSQ) getSequence(endianess, len, name);\r\n sequenceTags.put(key, sq);\r\n // System.err.print( \"SEQUENCE DONE: Sequence Tags: (\" + key + \")\"+\" \"+type);\r\n // Integer.toString(len, 0x10) + \"\\n\");\r\n\r\n try {\r\n\r\n } catch (final NullPointerException e) {\r\n System.err.println(\"Null pointer exception while setting value. Trying to put new tag.\");\r\n }\r\n Preferences.debug(\"Finished sequence tags.\\n\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n // check if private\r\n if (isPrivate) {\r\n if (type.equals(\"typeString\")) {\r\n privateTags.put(key, strValue);\r\n } else if ( !type.equals(\"typeSequence\")) {\r\n privateTags.put(key, data);\r\n } else {\r\n privateTags.put(key, sq);\r\n }\r\n }\r\n\r\n // check if should anonymize, note user can specify private tags to anonymize\r\n if (tagExistInAnonymizeTagIDs(key.toString())) {\r\n\r\n // System.out.print(\"Writing \"+key+\"\\t\");\r\n\r\n final long raPtrOld = raFile.getFilePointer();\r\n if (type.equals(\"typeString\")) {\r\n\r\n // System.out.println(strValue);\r\n anonymizeTags.put(key, strValue);\r\n String anonStr = \"\";\r\n if (key.equals(\"0008,0014\") || key.equals(\"0008,0018\") || key.equals(\"0020,000E\")\r\n || key.equals(\"0020,000D\") || key.equals(\"0020,0010\") || key.equals(\"0020,0052\")) {\r\n final Random r = new Random();\r\n\r\n for (int i = 0; i < strValue.length(); i++) {\r\n if (strValue.charAt(i) == '.') {\r\n anonStr = anonStr + \".\";\r\n } else if (key.equals(\"0008,0018\")) {\r\n anonStr = anonStr + r.nextInt(10);\r\n } else {\r\n anonStr = anonStr + \"1\";\r\n }\r\n }\r\n } else {\r\n for (int i = 0; i < strValue.length(); i++) {\r\n anonStr = anonStr + \"X\";\r\n }\r\n }\r\n\r\n raFile.seek(bPtrOld);\r\n raFile.writeBytes(anonStr); // non-anon would be strValue\r\n raFile.seek(raPtrOld);\r\n System.out.println(\"Writing \" + strValue + \" to \" + bPtrOld + \". Returned raPtr to \"\r\n + raPtrOld);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"otherWordString\") && !name.equals(\"0028,1201\")\r\n && !name.equals(\"0028,1202\") && !name.equals(\"0028,1203\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"typeShort\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Short || data instanceof Integer) {\r\n writeShort((short) 0, endianess);\r\n } else if (data instanceof Short[] || data instanceof Integer[]) {\r\n if (data instanceof Integer[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Short[]) data).length; i++) {\r\n writeShort((short) 0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeInt\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Integer) {\r\n writeInt(0, endianess);\r\n } else if (data instanceof Integer[]) {\r\n for (int i = 0; i < ((Integer[]) data).length; i++) {\r\n writeInt(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeFloat\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Float) {\r\n writeFloat(0, endianess);\r\n } else if (data instanceof Float[] || data instanceof Double[]) {\r\n if (data instanceof Double[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Float[]) data).length; i++) {\r\n writeFloat(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeDouble\")) {\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Double) {\r\n writeDouble(0, endianess);\r\n } else if (data instanceof Double[]) {\r\n for (int i = 0; i < ((Double[]) data).length; i++) {\r\n writeDouble(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n }\r\n }\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory in FileDicom.readHeader\");\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n e.printStackTrace();\r\n\r\n throw new IOException();\r\n }\r\n\r\n if (name.equals(\"0002,0000\")) { // length of the transfer syntax group\r\n\r\n if (data != null) {\r\n metaGroupLength = ((Integer) (data)).intValue() + 12; // 12 is the length of 0002,0000 tag\r\n }\r\n\r\n Preferences.debug(\"metalength = \" + metaGroupLength + \" location \" + getFilePointer() + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n } else if (name.equals(\"0018,602C\")) {\r\n fileInfo.setUnitsOfMeasure(FileInfoBase.CENTIMETERS, 0);\r\n } else if (name.equals(\"0018,602E\")) {\r\n fileInfo.setUnitsOfMeasure(FileInfoBase.CENTIMETERS, 1);\r\n } else if (name.equals(\"0002,0010\")) {\r\n\r\n // Transfer Syntax UID: DICOM part 10 page 13, part 5 p. 42-48, Part 6 p. 53\r\n // 1.2.840.10008.1.2 Implicit VR Little Endian (Default)\r\n // 1.2.840.10008.1.2.1 Explicit VR Little Endian\r\n // 1.2.840.10008.1.2.2 Explicit VR Big Endian\r\n // 1.2.840.10008.1.2.4.50 8-bit Lossy JPEG (JPEG Coding Process 1)\r\n // 1.2.840.10008.1.2.4.51 12-bit Lossy JPEG (JPEG Coding Process 4)\r\n // 1.2.840.10008.1.2.4.57 Lossless JPEG Non-hierarchical (JPEG Coding Process 14)\r\n // we should bounce out if we don't support this transfer syntax\r\n if (strValue.trim().equals(\"1.2.840.10008.1.2\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Implicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.IMPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().equals(\"1.2.840.10008.1.2.1\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Explicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().equals(\"1.2.840.10008.1.2.2\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Explicit VR - Big Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.BIG_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().startsWith(\"1.2.840.10008.1.2.4.\")) { // JPEG\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Implicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = true;\r\n\r\n if (strValue.trim().equals(\"1.2.840.10008.1.2.4.57\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.58\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.65\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.66\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.70\")) {\r\n lossy = false;\r\n } else {\r\n lossy = true;\r\n }\r\n } else {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue + \" unknown!\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"MIPAV does not support transfer syntax:\\n\" + strValue);\r\n }\r\n\r\n flag = false; // break loop\r\n\r\n return false; // couldn't read it!\r\n }\r\n } else if (name.equals(FileDicomInner.IMAGE_TAG)) { // && elementLength!=0) { // The image.\r\n System.out.println(\"Reading \" + name + \" image data\");\r\n // This complicated code determines whether or not the offset is correct for the image.\r\n // For that to be true, (height * width * pixel spacing) + the present offset should equal\r\n // the length of the file. If not, 4 might need to be added (I don't know why). If not again,\r\n // the function returns false.\r\n\r\n final int imageLength = extents[0] * extents[1] * fileInfo.bitsAllocated / 8;\r\n\r\n Preferences.debug(\"File Dicom: readHeader - Data tag = \" + FileDicomInner.IMAGE_TAG + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n Preferences.debug(\"File Dicom: readHeader - imageLength = \" + imageLength + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n Preferences.debug(\"File Dicom: readHeader - getFilePointer = \" + getFilePointer() + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if (fileInfo.getModality() == FileInfoBase.POSITRON_EMISSION_TOMOGRAPHY) {\r\n fileInfo.displayType = ModelStorageBase.FLOAT;\r\n } else {\r\n fileInfo.displayType = fileInfo.getDataType();\r\n }\r\n\r\n if ( !encapsulated) {\r\n // System.err.println( \"\\n\" +\r\n // Long.toString(getFilePointer()) + \" \" +\r\n // Long.toString(raFile.length()) +\r\n // \" image length = \" + imageLength );\r\n\r\n long fileEnd;\r\n\r\n if (loadTagBuffer == true) {\r\n fileEnd = raFile.length();\r\n } else {\r\n fileEnd = fLength;\r\n }\r\n\r\n if ( (imageLength + getFilePointer()) <= fileEnd) {\r\n fileInfo.setOffset(getFilePointer()); // Mark where the image is\r\n }\r\n // I think the extra 4 bytes is for explicit tags!!\r\n // see Part 5 page 27 1998\r\n else if ( (imageLength + getFilePointer() + 4) <= fileEnd) {\r\n fileInfo.setOffset(getFilePointer() + 4);\r\n } else {\r\n\r\n // Preferences.debug( \"File Dicom: readHeader: xDim = \" + extents[0] + \" yDim = \" +\r\n // extents[1] +\r\n // \" Bits allocated = \" + fileInfo.bitsAllocated, 2);\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Image not at expected offset.\");\r\n }\r\n\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n } else { // encapsulated\r\n fileInfo.setOffset( (getFilePointer() - 12));\r\n }\r\n\r\n fileInfo.setExtents(extents);\r\n flag = false; // break loop\r\n } else if (type.equals(\"typeUnknown\")) { // Private tag, may not be reading in correctly.\r\n\r\n try {\r\n\r\n // set the value if the tag is in the dictionary (which means it isn't private..) or has already\r\n // been put into the tag table without a value (private tag with explicit vr)\r\n if (DicomDictionary.containsTag(key) || tagTable.containsTag(key)) {\r\n final Object obj = readUnknownData();\r\n Preferences.debug(\"Note unknown data (\" + key + \"):\\t\" + obj + \"\\t\" + elementLength);\r\n\r\n // tagTable.setValue(key, readUnknownData(), elementLength);\r\n } else {\r\n final Object obj = readUnknownData();\r\n Preferences.debug(\"Note private data (\" + key + \"):\\t\" + obj + \"\\t\" + elementLength);\r\n privateTags.put(key, obj);\r\n\r\n // tagTable\r\n // .putPrivateTagValue(new FileDicomTagInfo(key, null, tagVM, \"PrivateTag\", \"Private Tag\"));\r\n\r\n // tagTable.setValue(key, readUnknownData(), elementLength);\r\n\r\n Preferences.debug(\"Group = \" + groupWord + \" element = \" + elementWord + \" Type unknown\"\r\n + \"; value = \" + strValue + \"; element length = \" + elementLength + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n }\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory error while reading \\\"\" + fileName\r\n + \"\\\".\\nThis may not be a DICOM image.\");\r\n Preferences.debug(\"Out of memory storing unknown tags in FileDicom.readHeader\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory storing unknown tags in FileDicom.readHeader\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n e.printStackTrace();\r\n\r\n throw new IOException(\"Out of memory storing unknown tags in FileDicom.readHeader\");\r\n } catch (final NullPointerException npe) {\r\n System.err.println(\"name: \" + name);\r\n System.err.print(\"no hashtable? \");\r\n System.err.println(tagTable == null);\r\n throw npe;\r\n }\r\n }\r\n }\r\n // Done reading tags\r\n\r\n String photometricInterp = null;\r\n\r\n if (tagTable.getValue(\"0028,0004\") != null) {\r\n fileInfo.photometricInterp = ((String) (tagTable.getValue(\"0028,0004\"))).trim();\r\n photometricInterp = fileInfo.photometricInterp.trim();\r\n }\r\n\r\n if (photometricInterp == null) { // Default to MONOCROME2 and hope for the best\r\n photometricInterp = new String(\"MONOCHROME2\");\r\n }\r\n\r\n if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.UBYTE);\r\n fileInfo.displayType = ModelStorageBase.UBYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.SIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.BYTE);\r\n fileInfo.displayType = ModelStorageBase.BYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated > 8)) {\r\n fileInfo.setDataType(ModelStorageBase.USHORT);\r\n fileInfo.displayType = ModelStorageBase.USHORT;\r\n fileInfo.bytesPerPixel = 2;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.SIGNED_PIXEL_REP) && (fileInfo.bitsAllocated > 8)) {\r\n fileInfo.setDataType(ModelStorageBase.SHORT);\r\n fileInfo.displayType = ModelStorageBase.SHORT;\r\n fileInfo.bytesPerPixel = 2;\r\n }\r\n // add something for RGB DICOM images - search on this !!!!\r\n else if (photometricInterp.equals(\"RGB\") && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.ARGB);\r\n fileInfo.displayType = ModelStorageBase.ARGB;\r\n fileInfo.bytesPerPixel = 3;\r\n\r\n if (tagTable.getValue(\"0028,0006\") != null) {\r\n fileInfo.planarConfig = ((Short) (tagTable.getValue(\"0028,0006\"))).shortValue();\r\n } else {\r\n fileInfo.planarConfig = 0; // rgb, rgb, rgb\r\n }\r\n } else if (photometricInterp.equals(\"YBR_FULL_422\") && (fileInfo.bitsAllocated == 8) && encapsulated) {\r\n fileInfo.setDataType(ModelStorageBase.ARGB);\r\n fileInfo.displayType = ModelStorageBase.ARGB;\r\n fileInfo.bytesPerPixel = 3;\r\n\r\n if (tagTable.getValue(\"0028,0006\") != null) {\r\n fileInfo.planarConfig = ((Short) (tagTable.getValue(\"0028,0006\"))).shortValue();\r\n } else {\r\n fileInfo.planarConfig = 0; // rgb, rgb, rgb\r\n }\r\n } else if (photometricInterp.equals(\"PALETTE COLOR\")\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.UBYTE);\r\n fileInfo.displayType = ModelStorageBase.UBYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n\r\n final int[] dimExtents = new int[2];\r\n dimExtents[0] = 4;\r\n dimExtents[1] = 256;\r\n lut = new ModelLUT(ModelLUT.GRAY, 256, dimExtents);\r\n\r\n for (int q = 0; q < dimExtents[1]; q++) {\r\n lut.set(0, q, 1); // the alpha channel is preloaded.\r\n }\r\n // sets the LUT to exist; we wait for the pallete tags to\r\n // describe what the lut should actually look like.\r\n } else {\r\n Preferences.debug(\"File DICOM: readImage() - Unsupported pixel Representation\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if (raFile != null) {\r\n raFile.close();\r\n }\r\n\r\n return false;\r\n }\r\n\r\n if (fileInfo.getModality() == FileInfoBase.POSITRON_EMISSION_TOMOGRAPHY) {\r\n fileInfo.displayType = ModelStorageBase.FLOAT;\r\n // a bit of a hack - indicates Model image should be reallocated to float for PET image the data is\r\n // stored\r\n // as 2 bytes (short) but is \"normalized\" using the slope parameter required for PET images (intercept\r\n // always 0 for PET).\r\n }\r\n\r\n if ( ( (fileInfo.getDataType() == ModelStorageBase.UBYTE) || (fileInfo.getDataType() == ModelStorageBase.USHORT))\r\n && (fileInfo.getRescaleIntercept() < 0)) {\r\n // this performs a similar method as the pet adjustment for float images stored on disk as short to read\r\n // in\r\n // signed byte and signed short images stored on disk as unsigned byte or unsigned short with a negative\r\n // rescale intercept\r\n if (fileInfo.getDataType() == ModelStorageBase.UBYTE) {\r\n fileInfo.displayType = ModelStorageBase.BYTE;\r\n } else if (fileInfo.getDataType() == ModelStorageBase.USHORT) {\r\n fileInfo.displayType = ModelStorageBase.SHORT;\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1201\") != null) {\r\n // red channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1201\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(1, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(1, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1202\") != null) {\r\n\r\n // green channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1202\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(2, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(2, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1203\") != null) {\r\n\r\n // blue channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1203\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(3, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(3, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n\r\n // here we make the lut indexed because we know that\r\n // all the LUT tags are in the LUT.\r\n lut.makeIndexedLUT(null);\r\n }\r\n\r\n hasHeaderBeenRead = true;\r\n\r\n if ( (loadTagBuffer == true) && (raFile != null)) {\r\n raFile.close();\r\n }\r\n\r\n return true;\r\n }",
"private void collectHeaders(\n DirectBuffer name,\n DirectBuffer value)\n {\n if (!error())\n {\n String nameStr = name.getStringWithoutLengthUtf8(0, name.capacity());\n String valueStr = value.getStringWithoutLengthUtf8(0, value.capacity());\n // TODO cookie needs to be appended with ';'\n headers.merge(nameStr, valueStr, (o, n) -> String.format(\"%s, %s\", o, n));\n }\n }",
"public void addHeader(String name, String value) {\n\t\t\tthis.header.put(name, value);\n\t\t}",
"private HeaderUtil() {}",
"private DecoderState readHeaders(ByteBuf in) {\n\n DecoderState nextState = DecoderState.READ_HEADERS;\n String line;\n\n // Read as long as we haven't reached the end of the headers (i.e.\n // the next state) and we have full lines to read.\n while (nextState == DecoderState.READ_HEADERS && (line = readLine(in))\n != null) {\n\n if (line.isEmpty()) {\n nextState = DecoderState.READ_BODY;\n }\n else {\n int pos = line.indexOf(COLON_CHAR);\n if (pos > 0) {\n String key = line.substring(0, pos);\n\n // The spec defines that only the first occurrance of a header\n // should be preserved in a single frame.\n if (!headers.getHeaderNames().contains(key)) {\n\n // Move past the colon delimiter.\n pos++;\n\n // Extract the value and decode header value as per the spec. Is\n // there a faster way to do this than a bunch of individual\n // replaces?\n String value = pos >= line.length() ? null : line.substring(pos).\n replace(OCTET_92_92, OCTET_92)\n .replace(OCTET_92_99, OCTET_58)\n .replace(OCTET_92_110, OCTET_10)\n .replace(OCTET_92_114, OCTET_13);\n\n headers.put(key, value);\n }\n }\n else {\n // Invalid frame. A header must contain a ':'.\n throw new CorruptedFrameException(\"Header must contain a name and \"\n + \"value separated by a colon character.\");\n }\n }\n }\n\n return nextState;\n }",
"public void setHeaderName(java.lang.String headerName) {\r\n this.headerName = headerName;\r\n }",
"public Structure load(String name) {\n \t\treturn null;\n \t}",
"private Header [] loadSource(String name, Header [] list, Header header, final boolean force)\r\n {\r\n int pos;\r\n int depth = header.depth;\r\n File file = null;\r\n\r\n name = name.trim();\r\n\r\n for(pos = 0; pos < list.length && list[pos] != header; pos++);\r\n\r\n String path = list[pos].name.substring(0, list[pos].name.lastIndexOf('\\\\'));\r\n\r\n // look in sdk's root directory\r\n if ((file = getFile(Parser.jdkSource, name)) != null)\r\n {\r\n if (Parser.jdkSource.compareToIgnoreCase(path) != 0)\r\n depth++;\r\n }\r\n\r\n // look in package\r\n if (file == null)\r\n {\r\n file = getFile(path, name);\r\n }\r\n\r\n // look in imports\r\n for (int j = 0; j < header.imports.length && file == null; j++)\r\n {\r\n String st = header.imports[j];\r\n int last = st.lastIndexOf('.') + 1;\r\n\r\n if (st.substring(last).compareToIgnoreCase(name) == 0)\r\n st = st.substring(0, last);\r\n\r\n if (st.endsWith(\".\"))\r\n st = st.substring(0, st.length() - 1);\r\n\r\n for (int k = -1; (k = st.indexOf('.')) >= 0; )\r\n st = st.substring(0, k) + '\\\\' + st.substring(k + 1);\r\n\r\n st = jdkSource + '\\\\' + st;\r\n\r\n file = getFile(st, name);\r\n\r\n if (file != null)\r\n depth++;\r\n }\r\n\r\n if (file != null)\r\n {\r\n String st = file.getAbsolutePath();\r\n\r\n // already loaded?\r\n for(int k = 0; k < list.length; k++)\r\n if (list[k].name.compareToIgnoreCase(st) == 0)\r\n {\r\n file = null;\r\n return list;\r\n }\r\n\r\n if (file != null)\r\n {\r\n File desc = new File(st.substring(0, st.lastIndexOf('.') + 1) + 'h');\r\n File fs = new File(st.substring(0, st.lastIndexOf('.') + 1) + \"fs\");\r\n\r\n st = file.getAbsolutePath();\r\n for(int i = 0; i < built.size(); i++)\r\n if (((String)built.get(i)).compareToIgnoreCase(st) == 0)\r\n {\r\n file = desc;\r\n break;\r\n }\r\n\r\n if ((!desc.exists() || !fs.exists() || fs.length() == 0 || fs.lastModified() < file.lastModified() || force) && file != desc)\r\n {\r\n Header [] hh \t= new Pass(file, built, force, gc).compilationUnit(list, depth); // compile\r\n\r\n return hh;\r\n }\r\n else\r\n {\r\n Header [] newList = new Header[list.length + 1];\r\n\r\n for (int k = 0; k < newList.length - 1; k++)\r\n newList[k] = list[k];\r\n System.out.println(desc.getAbsolutePath() + \" will be read!\");\r\n newList[newList.length - 1] = new Header(desc.getAbsolutePath(), depth); // load header\r\n list = newList;\r\n }\r\n }\r\n }\r\n\r\n return list;\r\n }",
"private void setupHeader(final String filePath) throws IOException{\n\t\tFile headerFile = new File(filePath);\n\t\tString dataString = new String();\n\t\tBufferedReader reader = new BufferedReader(new FileReader(headerFile));\n\t\twhile((dataString = reader.readLine()) != null){\n\t\t\theaderText.append(dataString);\n\t\t\theaderText.append(System.lineSeparator());\n\t\t}\n\t\treader.close();\n\t}",
"public VicarBinaryLabel getBinaryHeader() throws IOException;",
"public abstract String[] getMimeHeader(String name);",
"public VCFHeader getHeader();",
"boolean hasHeader();",
"com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();",
"public void addHeader(String s, String s1) {\n\t\t\n\t}",
"public Header getResponseHeader(String headerName) { \n if (headerName == null) {\n return null;\n } else {\n return getResponseHeaderGroup().getCondensedHeader(headerName);\n } \n }",
"public void addHeader(String key, String header);",
"private void _readHeader() throws PicoException, IOException {\n if (!_open)\n return;\n\n // Save the current position and move to the start of the header.\n long pos = _backing.getFilePointer();\n _backing.seek(PicoStructure.HEAD_START);\n\n // Read the header from the file. We read the fixed length portion\n // here, up through the start of the key.\n byte[] _fixedhdr = new byte[(int) PicoStructure.FIXED_HEADER_LENGTH];\n int length = _backing.read(_fixedhdr);\n\n // Make sure we have enough bytes for the magic string.\n if (length < PicoStructure.MAGIC_LENGTH - PicoStructure.MAGIC_OFFSET) {\n // The magic string was not present. This cannot be a Pico wrapper\n // file.\n throw new PicoException(\"File too short; missing magic string.\");\n }\n\n // Process the fixed portion of the header. After calling this the\n // key is allocated, but not populated.\n _head = PicoHeader.getHeader(_fixedhdr);\n\n // The hash is valid because we just read it from the file and nothing\n // has yet been written. All write methods must invalidate the hash.\n _hashvalid = true;\n\n // Go and read the key, now that we know its length. Note that we read\n // it directly into the array returned by getKey.\n length = _backing.read(_head.getKey());\n\n // Make sure we have the complete key. The only bad case is that the\n // file ends before the key is complete.\n if (length != _head.getKey().length) {\n throw new PicoException(\"File too short; incomplete key.\");\n }\n\n // Move to the original position in the file.\n _backing.seek(pos);\n\n // Ka-presto! The header has been read. Life is good.\n }",
"public Optional<String> header(String header) {\n return this.header.getHeader(header);\n }",
"public void addHeader(String name, String value) {\n this.header.put(name, value);\n }",
"public void setHeader(String header) {\n\t\tthis.header = header;\n\t}",
"void setHeader(@NonNull String name, @Nullable String value) {\n if (value == null) {\n removeHeader(name);\n } else {\n headers.put(name, value);\n }\n }",
"public void setHeader(String header) {\n\t\t_header = header;\n\t}",
"@Override\n\tpublic void addRequestHeader(String headername, String value) {\n \t// We are not adding in common http headers \n \tif (!COMMON_HTTP_HEADERS.contains(headername.toLowerCase())) {\n \t\ttransLogModelThreadLocal.get().getRequestHeadersMap().put(headername, value);\n \t}\n\t}",
"private DefaultListModel<String> loadCapturedHeaders(){\r\n\t\tif(FileData.getFileModel(FileType.CAPTURED) != null) {\r\n\t\t\tfor(String header : FileData.getFileModel(FileType.CAPTURED).getFileContents().getHeaderNames()) {\r\n\t\t\t\tthis.capturedHeaderModel.addElement(header);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tthis.capturedHeaderModel.clear();\r\n\t\t}\r\n\t\treturn this.capturedHeaderModel;\r\n\t}",
"public Header getRequestHeader(String headerName) {\n if (headerName == null) {\n return null;\n } else {\n return getRequestHeaderGroup().getCondensedHeader(headerName);\n }\n }",
"public interface HeadeName {\n public void setHeaderName(String text);\n}",
"@Test\n public void validHeaderTest(){\n //test for a complete header with some missing values\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/piece1.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getTitle(),\"PieceNo.1\");\n assertEquals(h.getComposer(),\"Unknown\");//uses a default value\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getMeter(),\"4/4\");\n assertEquals(h.getNoteLength(),\"1/4\");\n assertEquals(h.getTempo(),\"140\");\n assertEquals(h.getKey(),\"C\");\n }",
"public Object sysFindHeaderById(Integer id) throws DAOException {\r\n\treturn findHeaderById(id);\r\n }",
"public String getExtraHeader(final String name) {\n return extraHeaders.get(name);\n }",
"public void setHeader(String _header) {\n\t\tthis.header = _header;\n\t}",
"public String getHeader(final Header header) {\n return headers.get(header.toString());\n }",
"public boolean containsHeader(String s) {\n\t\treturn false;\n\t}",
"private String readHeader(RoutingContext ctx) {\n String tok = ctx.request().getHeader(XOkapiHeaders.TOKEN);\n if (tok != null && ! tok.isEmpty()) {\n return tok;\n }\n return null;\n }",
"public String getHeaderValue(String headerName)\n\t{\n\t\tList<String> values = this.headers.get(headerName.toLowerCase());\n\t\tif (values == null)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn values.get(0);\n\t}",
"public static void readHeaderFields(InputStream in, HashMap headerfields) throws IOException, ProtocolException {\r\n\t\tString fieldname = null;\r\n\t\tint i;\r\n\t\tSimpleStringBuilder buffer = Toolkit.getInstance().createSimpleStringBuilder();\r\n\t\tboolean foundCR = false;\r\n\t\tboolean foundCRLF = false;\r\n\t\twhile (((i = in.read()) != -1)) {\r\n\t\t\tif (fieldname == null) {\r\n\t\t\t\tif (i == Specialchars.CR && foundCRLF) {\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tfoundCRLF = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (foundCR) {\r\n\t\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (i == Specialchars.COL) {\r\n\t\t\t\t\tfieldname = buffer.toString().toLowerCase();\r\n\t\t\t\t\tif (fieldname.length() == 0) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// no CTL (ascii 0-31) allowed for field-name\r\n\t\t\t\t// no separators allowed for token (see RFC2616 2.2)\r\n\t\t\t\tif ((i >= 0x00 && i <= 0x1F) || i == 0x28 || i == 0x29 || i == 0x3C || i == 0x3D || i == 0x3E || i == 0x40 || i == 0x2C || i == 0x3F || i == 0x3B || i == 0x2F || i == 0x5C || i == 0x5B || i == 0x5D || i == 0x7B || i == 0x7D || i == 0x22 || i == Specialchars.SP || i == Specialchars.HT) { //\r\n\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t}\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t} else {\r\n\t\t\t\tif (i == Specialchars.CR) {\r\n\t\t\t\t\tif (foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// check for new line end\r\n\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\tif (!foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (foundCRLF) {\r\n\t\t\t\t\t\t// double CRLF, header ends here\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (fieldname.startsWith(MIMEConstants.DEFAULT_HEADERFIELD_PREFIX)) {\r\n\t\t\t\t\t\theaderfields.put(fieldname, buffer.toTrimmedString().toLowerCase());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = false;\r\n\t\t\t\t\tfoundCRLF = true;\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tfieldname = null;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfoundCR = false;\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new IOException(FAULT_MALFORMED_HEADERFIELD);\r\n\t}",
"@Override\n public void setHeader(String arg0, String arg1) {\n\n }"
] | [
"0.7109423",
"0.70059943",
"0.64828336",
"0.6147106",
"0.6119875",
"0.61061525",
"0.6008269",
"0.594876",
"0.5908488",
"0.5876897",
"0.5852707",
"0.58284414",
"0.5823311",
"0.5799816",
"0.5788495",
"0.57615453",
"0.5759766",
"0.57588685",
"0.57494164",
"0.5748105",
"0.57337606",
"0.5715178",
"0.571487",
"0.57099336",
"0.5709823",
"0.57005954",
"0.5663389",
"0.56503135",
"0.56447685",
"0.56084955",
"0.5587918",
"0.55835104",
"0.55752283",
"0.55751634",
"0.55745703",
"0.5573433",
"0.5570906",
"0.55639344",
"0.5551365",
"0.5536699",
"0.55305576",
"0.55116934",
"0.5496095",
"0.54873013",
"0.5481497",
"0.5478421",
"0.5474259",
"0.5469924",
"0.5459057",
"0.54422235",
"0.54375863",
"0.54275936",
"0.54155695",
"0.5405825",
"0.5394716",
"0.53932464",
"0.5392572",
"0.5390285",
"0.53623885",
"0.5362303",
"0.53609365",
"0.5351959",
"0.5346461",
"0.5344693",
"0.5338423",
"0.53377265",
"0.53351015",
"0.5332815",
"0.53272706",
"0.5319005",
"0.5312913",
"0.5312092",
"0.53094506",
"0.5303163",
"0.5302766",
"0.52987266",
"0.5291402",
"0.52888846",
"0.5286174",
"0.52791035",
"0.5267836",
"0.5266174",
"0.5254372",
"0.5253581",
"0.52500033",
"0.52495235",
"0.5244512",
"0.5234745",
"0.52318484",
"0.5227262",
"0.52260053",
"0.5221701",
"0.5215628",
"0.5203705",
"0.5195319",
"0.5192773",
"0.5192139",
"0.5190684",
"0.5189968",
"0.5189148"
] | 0.6171575 | 3 |
try to reduce number of unresolved references in loaded and compiled sources | private void connectClasses(Header [] list)
{
Vector queue;
Vector garbage = new Vector();
Find.setCrossreference(list);
for(int i = 0; list != null && i < list.length; i++)
{
queue = list[i].scopes;
for(int j = 0; j < queue.size(); j++)
for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();)
{
Iterator a = null;
Basic x = (Basic)iter.next();
if (x instanceof ClassType)
{
ClassType y = (ClassType)x;
ClassType [] z;
boolean done = false;
String st = null;
if (y.extend != null && y.extend.name != null && y.extend.scope == null)
{ // look for superclass
st = y.extend.name.string;
for(a = y.unresolved.iterator(); a.hasNext();)
{
String s = (String)a.next();
if (s.endsWith('.' + st))
{
st = s;
break;
}
}
z = Find.findClass(st, 0, y.scope);
for(int k = 0; k < z.length; k++)
if (z[k].scope.javaPath("").endsWith(st) || z[k].scope.buildPath("").endsWith(st))
{
y.extend = z[k];
garbage.add(st);
done = true;
}
}
for(int k = 0; k < y.implement.length; k++)
if (y.implement[k].name != null && y.implement[k].scope == null)
{ // look for interface
st = y.implement[k].name.string;
for(a = y.unresolved.iterator(); a.hasNext();)
{
String s = (String)a.next();
if (s.endsWith('.' + st))
{
st = s;
break;
}
}
done = false;
z = Find.findClass(st, 0, y.scope);
for(int l = 0; l < z.length && !done; l++)
if (z[l].scope.javaPath("").endsWith(st) || z[l].scope.buildPath("").endsWith(st))
{
y.implement[k] = z[l];
garbage.add(st);
done = true;
break;
}
}
a = null;
while(garbage.size() > 0)
{
st = (String)garbage.get(0);
garbage.remove(0);
y.unresolved.remove(st);
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void doUnloading() {\n stopJit();\n // Do multiple GCs to prevent rare flakiness if some other thread is keeping the\n // classloader live.\n for (int i = 0; i < 5; ++i) {\n Runtime.getRuntime().gc();\n }\n startJit();\n }",
"protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void netsCompiled(ShadowLookup oldLookup) {\n }",
"protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void invalidate() {\n cud = null;\n fileNameRefs = null;\n jsniMethods = null;\n if (exposedCompiledClasses != null) {\n for (CompiledClass compiledClass : exposedCompiledClasses) {\n compiledClass.invalidate();\n }\n exposedCompiledClasses = null;\n }\n }",
"static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private UnifiedAst precompile(PrecompilationContext precompilationContext)\n\t\t\tthrows UnableToCompleteException {\n\t\ttry {\n\t\t\t// (0) Assert preconditions\n\t\t\tif (precompilationContext.getEntryPoints().length\n\t\t\t\t\t+ precompilationContext\n\t\t\t\t\t\t\t.getAdditionalRootTypes().length == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"entry point(s) required\");\n\t\t\t}\n\t\t\tboolean singlePermutation = precompilationContext\n\t\t\t\t\t.getPermutations().length == 1;\n\t\t\tPrecompilationMetricsArtifact precompilationMetrics = precompilationContext\n\t\t\t\t\t.getPrecompilationMetricsArtifact();\n\t\t\t/*\n\t\t\t * Do not introduce any new pass here unless it is logically a part\n\t\t\t * of one of the 6 defined stages and is physically located in that\n\t\t\t * stage.\n\t\t\t */\n\t\t\t// (1) Initialize local state\n\t\t\tjprogram = new JProgram(compilerContext.getMinimalRebuildCache());\n\t\t\t// Synchronize JTypeOracle with compile optimization behavior.\n\t\t\tjprogram.typeOracle.setOptimize(options\n\t\t\t\t\t.getOptimizationLevel() > OptionOptimize.OPTIMIZE_LEVEL_DRAFT);\n\t\t\tjsProgram = new JsProgram();\n\t\t\t// (2) Construct and unify the unresolved Java AST\n\t\t\tCompilationState compilationState = constructJavaAst(\n\t\t\t\t\tprecompilationContext);\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tJsniRestrictionChecker.exec(logger, jprogram);\n\t\t\tJsInteropRestrictionChecker.exec(logger, jprogram,\n\t\t\t\t\tgetMinimalRebuildCache());\n\t\t\tlogTypeOracleMetrics(precompilationMetrics, compilationState);\n\t\t\tMemory.maybeDumpMemory(\"AstOnly\");\n\t\t\tAstDumper.maybeDumpAST(jprogram);\n\t\t\t// TODO(stalcup): is in wrong place, move to optimization stage\n\t\t\tConfigurationProperties configurationProperties = new ConfigurationProperties(\n\t\t\t\t\tmodule);\n\t\t\tEnumNameObfuscator.exec(jprogram, logger, configurationProperties,\n\t\t\t\t\toptions);\n\t\t\t// (3) Normalize the unresolved Java AST\n\t\t\t// Replace default methods by static implementations.\n\t\t\tDevirtualizeDefaultMethodForwarding.exec(jprogram);\n\t\t\t// Replace calls to native overrides of object methods.\n\t\t\tReplaceCallsToNativeJavaLangObjectOverrides.exec(jprogram);\n\t\t\tFixAssignmentsToUnboxOrCast.exec(jprogram);\n\t\t\tif (options.isEnableAssertions()) {\n\t\t\t\tAssertionNormalizer.exec(jprogram);\n\t\t\t} else {\n\t\t\t\tAssertionRemover.exec(jprogram);\n\t\t\t}\n\t\t\tif (module != null && options.isRunAsyncEnabled()) {\n\t\t\t\tReplaceRunAsyncs.exec(logger, jprogram);\n\t\t\t\tConfigurationProperties config = new ConfigurationProperties(\n\t\t\t\t\t\tmodule);\n\t\t\t\tCodeSplitters.pickInitialLoadSequence(logger, jprogram, config);\n\t\t\t}\n\t\t\tImplementClassLiteralsAsFields.exec(jprogram, shouldOptimize());\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tlogAstTypeMetrics(precompilationMetrics);\n\t\t\t// (4) Construct and return a value.\n\t\t\tEvent createUnifiedAstEvent = SpeedTracerLogger\n\t\t\t\t\t.start(CompilerEventType.CREATE_UNIFIED_AST);\n\t\t\tUnifiedAst result = new UnifiedAst(options,\n\t\t\t\t\tnew AST(jprogram, jsProgram), singlePermutation,\n\t\t\t\t\tRecordRebinds.exec(jprogram));\n\t\t\tcreateUnifiedAstEvent.end();\n\t\t\treturn result;\n\t\t} catch (Throwable e) {\n\t\t\tthrow CompilationProblemReporter.logAndTranslateException(logger,\n\t\t\t\t\te);\n\t\t}\n\t}",
"private static void m3301e(Context context) throws C1108a {\n try {\n byte[] d = f3068kj.mo6439d(C1159r.getKey());\n byte[] c = f3068kj.mo6438c(d, C1159r.m3507A());\n File cacheDir = context.getCacheDir();\n if (cacheDir == null) {\n cacheDir = context.getDir(\"dex\", 0);\n if (cacheDir == null) {\n throw new C1108a();\n }\n }\n File createTempFile = File.createTempFile(\"ads\", \".jar\", cacheDir);\n FileOutputStream fileOutputStream = new FileOutputStream(createTempFile);\n fileOutputStream.write(c, 0, c.length);\n fileOutputStream.close();\n DexClassLoader dexClassLoader = new DexClassLoader(createTempFile.getAbsolutePath(), cacheDir.getAbsolutePath(), null, context.getClassLoader());\n Class loadClass = dexClassLoader.loadClass(m3299b(d, C1159r.m3508B()));\n Class loadClass2 = dexClassLoader.loadClass(m3299b(d, C1159r.m3514H()));\n Class loadClass3 = dexClassLoader.loadClass(m3299b(d, C1159r.m3512F()));\n Class loadClass4 = dexClassLoader.loadClass(m3299b(d, C1159r.m3518L()));\n Class loadClass5 = dexClassLoader.loadClass(m3299b(d, C1159r.m3510D()));\n Class loadClass6 = dexClassLoader.loadClass(m3299b(d, C1159r.m3516J()));\n f3061kc = loadClass.getMethod(m3299b(d, C1159r.m3509C()), new Class[0]);\n f3062kd = loadClass2.getMethod(m3299b(d, C1159r.m3515I()), new Class[0]);\n f3063ke = loadClass3.getMethod(m3299b(d, C1159r.m3513G()), new Class[]{Context.class});\n f3064kf = loadClass4.getMethod(m3299b(d, C1159r.m3519M()), new Class[]{MotionEvent.class, DisplayMetrics.class});\n f3065kg = loadClass5.getMethod(m3299b(d, C1159r.m3511E()), new Class[]{Context.class});\n f3066kh = loadClass6.getMethod(m3299b(d, C1159r.m3517K()), new Class[]{Context.class});\n String name = createTempFile.getName();\n createTempFile.delete();\n new File(cacheDir, name.replace(\".jar\", \".dex\")).delete();\n } catch (FileNotFoundException e) {\n throw new C1108a(e);\n } catch (IOException e2) {\n throw new C1108a(e2);\n } catch (ClassNotFoundException e3) {\n throw new C1108a(e3);\n } catch (C1157a e4) {\n throw new C1108a(e4);\n } catch (NoSuchMethodException e5) {\n throw new C1108a(e5);\n } catch (NullPointerException e6) {\n throw new C1108a(e6);\n }\n }",
"static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void copyAndResolve() throws IOException {\n if (abort) {\n LOG.debug(\"Nothing to resolve on the backend.\");\n return;\n }\n // Step one is to see if there are any classes in the distributed cache\n if (!jConf.getBoolean(PIG_SCHEMA_TUPLE_ENABLED, SCHEMA_TUPLE_ON_BY_DEFAULT)) {\n LOG.info(\"Key [\" + PIG_SCHEMA_TUPLE_ENABLED +\"] was not set... will not generate code.\");\n return;\n }\n // Step two is to copy everything from the distributed cache if we are in distributed mode\n if (!isLocal) {\n copyAllFromDistributedCache();\n }\n // Step three is to see if the file needs to be resolved\n // If there is a \"$\" in the name, we know that it is an inner\n // class and thus doesn't need to be instantiated directly.\n for (File f : codeDir.listFiles()) {\n String name = f.getName().split(\"\\\\.\")[0];\n if (!name.contains(\"$\")) {\n filesToResolve.add(name);\n LOG.info(\"Added class to list of class to resolve: \" + name);\n }\n }\n // Step four is to actually try and resolve the classes\n resolveClasses();\n }",
"public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }",
"@DISPID(1611006056) //= 0x60060068. The runtime will prefer the VTID if present\n @VTID(131)\n boolean linkedExternalReferencesWarningAtCreation();",
"private void m8d(Context context) {\n AssetManager assets = context.getAssets();\n String str = context.getApplicationInfo().sourceDir;\n try {\n System.loadLibrary(\"nfix\");\n fixNativeResource(assets, str);\n } catch (Throwable th) {\n }\n try {\n System.loadLibrary(\"ufix\");\n fixUnityResource(assets, str);\n } catch (Throwable th2) {\n }\n }",
"static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void onCompileInternal() {\r\n\t}",
"protected void checkLinkage(String[] paths) {\n\t\tcheckImport(paths);\n\t\tcheckInclude(paths);\n\t}",
"@Test\n public void shouldNotReportValidReferences() {\n\n Compilation compilation = compile();\n assertThat(compilation).failed();\n\n List<Diagnostic<? extends JavaFileObject>> collect = compilation.errors().stream()\n .filter(e -> e.getMessage(null).indexOf(\"must not access org.moditect.deptective.plugintest.basic.bar\") == -1)\n .collect(Collectors.toList());\n\n assertThat(\n \"Test-Class 'Foo' should not have any invalid dependencies beside those to 'org.moditect.deptective.plugintest.basic.bar*'\",\n collect, Is.is(Lists.emptyList()));\n }",
"public void testExtendsRebuild() {\n testExtendsRebuild(new LinkerDef());\n }",
"private void buildReferencedClassSet() throws CheckedAnalysisException, InterruptedException {\n\n if (PROGRESS) {\n System.out.println(\"Adding referenced classes\");\n }\n Set<String> referencedPackageSet = new HashSet<String>();\n\n LinkedList<ClassDescriptor> workList = new LinkedList<ClassDescriptor>();\n workList.addAll(appClassList);\n\n Set<ClassDescriptor> seen = new HashSet<ClassDescriptor>();\n Set<ClassDescriptor> appClassSet = new HashSet<ClassDescriptor>(appClassList);\n\n Set<ClassDescriptor> badAppClassSet = new HashSet<ClassDescriptor>();\n HashSet<ClassDescriptor> knownDescriptors = new HashSet<ClassDescriptor>(DescriptorFactory.instance()\n .getAllClassDescriptors());\n int count = 0;\n Set<ClassDescriptor> addedToWorkList = new HashSet<ClassDescriptor>(appClassList);\n\n // add fields\n //noinspection ConstantIfStatement\n if (false)\n for (ClassDescriptor classDesc : appClassList) {\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n for (XField f : classNameAndInfo.getXFields()) {\n String sig = f.getSignature();\n ClassDescriptor d = DescriptorFactory.createClassDescriptorFromFieldSignature(sig);\n if (d != null && addedToWorkList.add(d))\n workList.addLast(d);\n }\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n\n while (!workList.isEmpty()) {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n ClassDescriptor classDesc = workList.removeFirst();\n\n if (seen.contains(classDesc)) {\n continue;\n }\n seen.add(classDesc);\n\n if (!knownDescriptors.contains(classDesc)) {\n count++;\n if (PROGRESS && count % 5000 == 0) {\n System.out.println(\"Adding referenced class \" + classDesc);\n }\n }\n\n referencedPackageSet.add(classDesc.getPackageName());\n\n // Get list of referenced classes and add them to set.\n // Add superclasses and superinterfaces to worklist.\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n\n ClassDescriptor superclassDescriptor = classNameAndInfo.getSuperclassDescriptor();\n if (superclassDescriptor != null && addedToWorkList.add(superclassDescriptor)) {\n workList.addLast(superclassDescriptor);\n }\n\n for (ClassDescriptor ifaceDesc : classNameAndInfo.getInterfaceDescriptorList()) {\n if (addedToWorkList.add(ifaceDesc))\n workList.addLast(ifaceDesc);\n }\n\n ClassDescriptor enclosingClass = classNameAndInfo.getImmediateEnclosingClass();\n if (enclosingClass != null && addedToWorkList.add(enclosingClass))\n workList.addLast(enclosingClass);\n\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (CheckedAnalysisException e) {\n // Failed to scan a referenced class --- just log the error and\n // continue\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n // Delete any application classes that could not be read\n appClassList.removeAll(badAppClassSet);\n DescriptorFactory.instance().purge(badAppClassSet);\n\n for (ClassDescriptor d : DescriptorFactory.instance().getAllClassDescriptors()) {\n referencedPackageSet.add(d.getPackageName());\n }\n referencedClassSet = new ArrayList<ClassDescriptor>(DescriptorFactory.instance().getAllClassDescriptors());\n\n // Based on referenced packages, add any resolvable package-info classes\n // to the set of referenced classes.\n if (PROGRESS) {\n referencedPackageSet.remove(\"\");\n System.out.println(\"Added \" + count + \" referenced classes\");\n System.out.println(\"Total of \" + referencedPackageSet.size() + \" packages\");\n for (ClassDescriptor d : referencedClassSet)\n System.out.println(\" \" + d);\n\n }\n\n }",
"static void method_461() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void checkReferences(DataStage dataStage, boolean useSourceType, Object result) {\n final List<TargetInternalReference> references = new ArrayList<>();\n Helpers.collectAllTargetInternalReferences(result, references);\n Map<String, Boolean> cachedReferences = new HashMap<>();\n references.forEach(t -> {\n boolean reset = false;\n if (t.getReference() != null) {\n final Boolean fromCache = cachedReferences.get(t.getReference());\n if(fromCache !=null){\n if(fromCache){\n reset = true;\n }\n }\n else {\n TargetInstance reference = null;\n try {\n final List<String> typesOfReference = kgV3.getTypesOfInstance(t.getReference(), DataStage.IN_PROGRESS, false);\n if (typesOfReference != null) {\n final TranslatorModel<?, ?> referenceTranslatorModel = TranslatorModel.MODELS.stream().filter(m -> m.getV3translator() != null && m.getV3translator().semanticTypes().stream().anyMatch(typesOfReference::contains)).findFirst().orElse(null);\n if (referenceTranslatorModel != null) {\n final String referenceQueryId = typesOfReference.stream().map(type -> referenceTranslatorModel.getV3translator().getQueryIdByType(type)).findFirst().orElse(null);\n reference = translateTargetInstance(dataStage, useSourceType, t, reference, referenceTranslatorModel, referenceQueryId);\n }\n }\n reset = reference == null;\n cachedReferences.put(t.getReference(), reset);\n } catch (WebClientResponseException ignored) {\n logger.error(\"A web client exception occurred - ignoring\");\n }\n }\n }\n if (reset) {\n t.setReference(null);\n }\n });\n }",
"static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }",
"public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void checkCompiled() {\r\n\t\tif (!isCompiled()) {\r\n\t\t\tlogger.debug(\"JdbcUpdate not compiled before execution - invoking compile\");\r\n\t\t\tcompile();\r\n\t\t}\r\n\t}",
"protected void resolveProjectDependencies() {\n // Create a set of old and new artifacts.\n final Set<String> oldReferences = new HashSet<String>();\n final Set<String> newReferences = new HashSet<String>();\n for (PropertyInfo pi:properties.values()) {\n if (pi != null) {\n if (pi.getPropertyDescriptor().getPropertyParser() == DefaultPropertyParsers.PATH_PARSER) {\n // Get original artifacts\n final List oldList = (List)pi.getOldValue();\n if ( oldList != null ) {\n final Iterator it = oldList.iterator();\n while (it.hasNext()) oldReferences.add(((VisualClassPathItem)it.next()).getRawText());\n }\n \n // Get artifacts after the edit\n final List newList = (List)pi.getValue();\n if ( newList != null ) {\n final Iterator it = newList.iterator();\n while (it.hasNext()) newReferences.add(((VisualClassPathItem)it.next()).getRawText());\n }\n } else if (pi.getPropertyDescriptor().getPropertyParser() == DefaultPropertyParsers.FILE_REFERENCE_PARSER) {\n oldReferences.add(pi.getOldRawValue());\n newReferences.add(pi.getRawValue());\n }\n }\n }\n \n // Create set of removed artifacts and remove them\n final Set<String> removed = new HashSet<String>( oldReferences );\n removed.removeAll( newReferences );\n final Set<String> added = new HashSet<String>(newReferences);\n added.removeAll(oldReferences);\n \n // 1. first remove all project references. The method will modify\n // project property files, so it must be done separately\n for ( String reference : removed ) {\n if (reference != null && !reference.startsWith(LIBS)) { //NOI18N\n refHelper.destroyReference(reference);\n }\n }\n \n // 2. now read project.properties and modify rest\n final EditableProperties ep = antProjectHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n boolean changed = false;\n \n for( final String reference:removed) {\n if (reference != null && reference.startsWith(LIBS)) { //NOI18N\n // remove helper property pointing to library jar if there is any\n ep.remove(reference.substring(2, reference.length()-1));\n changed = true;\n }\n }\n final File projDir = FileUtil.toFile(antProjectHelper.getProjectDirectory());\n for( String reference:added ) {\n if (reference != null && reference.startsWith(LIBS)) { //NOI18N\n // add property to project.properties pointing to relativized\n // library jar(s) if possible\n reference = reference.substring(2, reference.length()-1);\n final String value = relativizeLibraryClasspath(reference, projDir);\n if (value != null) {\n ep.setProperty(reference, value);\n ep.setComment(reference, new String[]{\n NbBundle.getMessage(J2MEProjectProperties.class, \"DESC_J2MEProps_CommentLine1\", reference), //NOI18N\n NbBundle.getMessage(J2MEProjectProperties.class, \"DESC_J2MEProps_CommentLine2\")}, false); //NOI18N\n changed = true;\n }\n }\n }\n if (changed) {\n antProjectHelper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);\n }\n \n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 452,\n FQN=\"llvm::Module::dropAllReferences\", NM=\"_ZN4llvm6Module17dropAllReferencesEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17dropAllReferencesEv\")\n //</editor-fold>\n public void dropAllReferences() {\n for (final Function /*&*/ F : /*Deref*/this) {\n F.dropAllReferences();\n }\n \n for (final GlobalVariable /*&*/ GV : globals()) {\n GV.dropAllReferences();\n }\n \n for (final GlobalAlias /*&*/ GA : aliases()) {\n GA.dropAllReferences();\n }\n \n for (final GlobalIFunc /*&*/ GIF : ifuncs()) {\n GIF.dropAllReferences();\n }\n }",
"private Header [] loadSource(String name, Header [] list, Header header, final boolean force)\r\n {\r\n int pos;\r\n int depth = header.depth;\r\n File file = null;\r\n\r\n name = name.trim();\r\n\r\n for(pos = 0; pos < list.length && list[pos] != header; pos++);\r\n\r\n String path = list[pos].name.substring(0, list[pos].name.lastIndexOf('\\\\'));\r\n\r\n // look in sdk's root directory\r\n if ((file = getFile(Parser.jdkSource, name)) != null)\r\n {\r\n if (Parser.jdkSource.compareToIgnoreCase(path) != 0)\r\n depth++;\r\n }\r\n\r\n // look in package\r\n if (file == null)\r\n {\r\n file = getFile(path, name);\r\n }\r\n\r\n // look in imports\r\n for (int j = 0; j < header.imports.length && file == null; j++)\r\n {\r\n String st = header.imports[j];\r\n int last = st.lastIndexOf('.') + 1;\r\n\r\n if (st.substring(last).compareToIgnoreCase(name) == 0)\r\n st = st.substring(0, last);\r\n\r\n if (st.endsWith(\".\"))\r\n st = st.substring(0, st.length() - 1);\r\n\r\n for (int k = -1; (k = st.indexOf('.')) >= 0; )\r\n st = st.substring(0, k) + '\\\\' + st.substring(k + 1);\r\n\r\n st = jdkSource + '\\\\' + st;\r\n\r\n file = getFile(st, name);\r\n\r\n if (file != null)\r\n depth++;\r\n }\r\n\r\n if (file != null)\r\n {\r\n String st = file.getAbsolutePath();\r\n\r\n // already loaded?\r\n for(int k = 0; k < list.length; k++)\r\n if (list[k].name.compareToIgnoreCase(st) == 0)\r\n {\r\n file = null;\r\n return list;\r\n }\r\n\r\n if (file != null)\r\n {\r\n File desc = new File(st.substring(0, st.lastIndexOf('.') + 1) + 'h');\r\n File fs = new File(st.substring(0, st.lastIndexOf('.') + 1) + \"fs\");\r\n\r\n st = file.getAbsolutePath();\r\n for(int i = 0; i < built.size(); i++)\r\n if (((String)built.get(i)).compareToIgnoreCase(st) == 0)\r\n {\r\n file = desc;\r\n break;\r\n }\r\n\r\n if ((!desc.exists() || !fs.exists() || fs.length() == 0 || fs.lastModified() < file.lastModified() || force) && file != desc)\r\n {\r\n Header [] hh \t= new Pass(file, built, force, gc).compilationUnit(list, depth); // compile\r\n\r\n return hh;\r\n }\r\n else\r\n {\r\n Header [] newList = new Header[list.length + 1];\r\n\r\n for (int k = 0; k < newList.length - 1; k++)\r\n newList[k] = list[k];\r\n System.out.println(desc.getAbsolutePath() + \" will be read!\");\r\n newList[newList.length - 1] = new Header(desc.getAbsolutePath(), depth); // load header\r\n list = newList;\r\n }\r\n }\r\n }\r\n\r\n return list;\r\n }",
"public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }",
"boolean optimizeBundle();",
"private static void load(){\n }",
"private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }",
"public void resolveInternalDependencies()\n {\n List<Dependency> dependencies = getUnresolvedDependencies();\n\n for (Dependency dependency : dependencies)\n {\n List<Target> allTargets = getTargets();\n\n for (Target target : allTargets)\n {\n String dependencyName = dependency.getName();\n String targetName = target.getName();\n\n System.out.println(\"Antfile.resolveInternalDependencies dependencyName, targetName = \" + dependencyName + \" \" + targetName);\n\n if (dependencyName == null)\n {\n System.out.println(\"Antfile.resolveInternalDependencies dependency = \" + dependency);\n }\n else if (dependencyName.equals(targetName))\n {\n dependency.setResolved(true);\n\n break;\n }\n }\n }\n }",
"void resolveRefs(SymbolTable symbolTable)\n {\n \tEnumeration e = defs.elements();\n\twhile (e.hasMoreElements())\n\t{\n\t Definition d=(Definition) e.nextElement();\n d.resolveRefs(symbolTable); \n\t}\n }",
"protected void ensureLoaded()\n {\n if (!m_fLoaded)\n {\n if (m_abClazz != null)\n {\n ByteArrayInputStream streamRaw = new ByteArrayInputStream(m_abClazz);\n DataInput stream = new DataInputStream(streamRaw);\n try\n {\n disassemble(stream, m_pool);\n }\n catch (IOException e)\n {\n throw ensureRuntimeException(e);\n }\n }\n\n m_fLoaded = true;\n }\n }",
"private CanonizeSource() {}",
"private void enforceTransitiveClassUsage() {\n HashSet<String> tmp = new HashSet<String>(usedAppClasses);\n for(String className : tmp) {\n enforceTransitiveClassUsage(className);\n }\n }",
"private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }",
"public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }",
"@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }",
"public void beginLoad(int libraryCount);",
"static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private boolean useWeakThreadLocals() {\n try {\n val property = System.getProperty(\"com.github.bingoohuang.mtcp.useWeakReferences\");\n if (property != null) { // undocumented manual override of WeakReference behavior\n return Boolean.parseBoolean(property);\n }\n\n return getClass().getClassLoader() != ClassLoader.getSystemClassLoader();\n } catch (SecurityException se) {\n return true;\n }\n }",
"@Override\r\n\tpublic void decompile( String root, String packege, String className )\r\n\t{\r\n\t\tlog = new StringBuffer( );\r\n\t\tsource = \"\"; //$NON-NLS-1$\r\n\t\tFile workingDir = new File( root + \"/\" + packege ); //$NON-NLS-1$\r\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream( );\r\n\t\tByteArrayOutputStream errors = new ByteArrayOutputStream( );\r\n\t\tPrintWriter errorsP = new PrintWriter( new OutputStreamWriter( errors ) );\r\n\t\t// errorsP.println(\"\\n\\n\\n/***** DECOMPILE LOG *****\\n\");\r\n\t\tint status = 0;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tstart = System.currentTimeMillis( );\r\n\t\t\terrorsP.println( \"\\tJad reported messages/errors:\" ); //$NON-NLS-1$\r\n\t\t\tProcess p = Runtime.getRuntime( ).exec( buildCmdLine( className ), new String[]{}, workingDir );\r\n\t\t\tStreamRedirectThread outRedirect = new StreamRedirectThread( \"output_reader\", //$NON-NLS-1$\r\n\t\t\t\t\tp.getInputStream( ),\r\n\t\t\t\t\tbos );\r\n\t\t\tStreamRedirectThread errRedirect = new StreamRedirectThread( \"error_reader\", //$NON-NLS-1$\r\n\t\t\t\t\tp.getErrorStream( ),\r\n\t\t\t\t\terrors );\r\n\t\t\toutRedirect.start( );\r\n\t\t\terrRedirect.start( );\r\n\t\t\tstatus = p.waitFor( ); // wait for jad to finish\r\n\t\t\toutRedirect.join( ); // wait until output stream content is fully\r\n\t\t\t// copied\r\n\t\t\terrRedirect.join( ); // wait until error stream content is fully\r\n\t\t\t// copied\r\n\t\t\tif ( outRedirect.getException( ) != null )\r\n\t\t\t\texcList.add( outRedirect.getException( ) );\r\n\t\t\tif ( errRedirect.getException( ) != null )\r\n\t\t\t\texcList.add( errRedirect.getException( ) );\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\texcList.add( e );\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tbos.flush( );\r\n\t\t\t\tbos.close( );\r\n\t\t\t\terrorsP.println( \"\\tExit status: \" + status ); //$NON-NLS-1$\r\n\t\t\t\t// errorsP.print(\" *************************/\");\r\n\t\t\t\terrors.flush( );\r\n\t\t\t\terrorsP.close( );\r\n\t\t\t}\r\n\t\t\tcatch ( Exception e )\r\n\t\t\t{\r\n\t\t\t\texcList.add( e ); // will never get here...\r\n\t\t\t}\r\n\t\t\ttime = System.currentTimeMillis( ) - start;\r\n\t\t}\r\n\r\n\t\tsource = UnicodeUtil.decode( bos.toString( ) );\r\n\r\n\t\tlog = new StringBuffer( errors.toString( ) );\r\n\t\t// logExceptions();\r\n\t\t// result = new DecompiledClassFile(classFile, source.toString());\r\n\t}",
"public interface BuiltInsLoader {\n public static final Companion Companion = Companion.$$INSTANCE;\n\n PackageFragmentProvider createPackageFragmentProvider(StorageManager storageManager, ModuleDescriptor moduleDescriptor, Iterable<? extends ClassDescriptorFactory> iterable, PlatformDependentDeclarationFilter platformDependentDeclarationFilter, AdditionalClassPartsProvider additionalClassPartsProvider, boolean z);\n\n /* compiled from: BuiltInsLoader.kt */\n public static final class Companion {\n static final /* synthetic */ Companion $$INSTANCE = new Companion();\n private static final Lazy<BuiltInsLoader> Instance$delegate = LazyKt.lazy(LazyThreadSafetyMode.PUBLICATION, BuiltInsLoader$Companion$Instance$2.INSTANCE);\n\n private Companion() {\n }\n\n public final BuiltInsLoader getInstance() {\n return Instance$delegate.getValue();\n }\n }\n}",
"private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }",
"public static void preLoad() {\n\t\tserviceClasses.clear();\n\t\tloadGroups(CLASS_FOLDER, null, serviceClasses);\n\t\tTracer.trace(serviceClasses.size()\n\t\t\t\t+ \" java class names loaded as services.\");\n\t\t/*\n\t\t * clean and pre-load if required\n\t\t */\n\t\tfor (ComponentType aType : ComponentType.values()) {\n\t\t\tif (aType.cachedOnes != null) {\n\t\t\t\taType.cachedOnes.clear();\n\t\t\t}\n\t\t\tif (aType.preLoaded) {\n\t\t\t\taType.loadAll();\n\t\t\t}\n\t\t}\n\t}",
"private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }",
"private void updateSourceImageRef(@javax.annotation.Nullable com.facebook.common.references.CloseableReference<com.facebook.imagepipeline.image.CloseableImage> r3, int r4) {\n /*\n r2 = this;\n monitor-enter(r2);\n r0 = r2.mIsClosed;\t Catch:{ all -> 0x0022 }\n if (r0 == 0) goto L_0x0007;\n L_0x0005:\n monitor-exit(r2);\t Catch:{ all -> 0x0022 }\n L_0x0006:\n return;\n L_0x0007:\n r0 = r2.mSourceImageRef;\t Catch:{ all -> 0x0022 }\n r1 = com.facebook.common.references.CloseableReference.cloneOrNull(r3);\t Catch:{ all -> 0x0022 }\n r2.mSourceImageRef = r1;\t Catch:{ all -> 0x0022 }\n r2.mStatus = r4;\t Catch:{ all -> 0x0022 }\n r1 = 1;\n r2.mIsDirty = r1;\t Catch:{ all -> 0x0022 }\n r1 = r2.setRunningIfDirtyAndNotRunning();\t Catch:{ all -> 0x0022 }\n monitor-exit(r2);\t Catch:{ all -> 0x0022 }\n com.facebook.common.references.CloseableReference.closeSafely(r0);\n if (r1 == 0) goto L_0x0006;\n L_0x001e:\n r2.submitPostprocessing();\n goto L_0x0006;\n L_0x0022:\n r0 = move-exception;\n monitor-exit(r2);\t Catch:{ all -> 0x0022 }\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.imagepipeline.producers.PostprocessorProducer$PostprocessorConsumer.updateSourceImageRef(com.facebook.common.references.CloseableReference, int):void\");\n }",
"public boolean getUsePrecompiled();",
"public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"@Nullable\n private BzlLoadValue computeInternalWithCompiledBzl(\n BzlLoadValue.Key key,\n BzlCompileValue compileValue,\n StarlarkBuiltinsValue builtins,\n Environment env,\n @Nullable InliningState inliningState)\n throws BzlLoadFailedException, InterruptedException {\n // Ensure the .bzl exists and passes static checks (parsing, resolving).\n // (A missing prelude file still returns a valid but empty BzlCompileValue.)\n if (!compileValue.lookupSuccessful()) {\n throw new BzlLoadFailedException(compileValue.getError(), Code.COMPILE_ERROR);\n }\n Program prog = compileValue.getProgram();\n Label label = key.getLabel();\n PackageIdentifier pkg = label.getPackageIdentifier();\n\n boolean isSclFlagEnabled =\n builtins.starlarkSemantics.getBool(BuildLanguageOptions.EXPERIMENTAL_ENABLE_SCL_DIALECT);\n if (key.isSclDialect() && !isSclFlagEnabled) {\n throw new BzlLoadFailedException(\n \"loading .scl files requires setting --experimental_enable_scl_dialect\",\n Code.PARSE_ERROR);\n }\n\n // Determine dependency BzlLoadValue keys for the load statements in this bzl.\n // Labels are resolved relative to the current repo mapping.\n RepositoryMapping repoMapping = getRepositoryMapping(key, builtins.starlarkSemantics, env);\n if (repoMapping == null) {\n return null;\n }\n ImmutableList<Pair<String, Location>> programLoads = getLoadsFromProgram(prog);\n ImmutableList<Label> loadLabels =\n getLoadLabels(\n env.getListener(),\n programLoads,\n pkg,\n repoMapping,\n key.isSclDialect(),\n isSclFlagEnabled);\n if (loadLabels == null) {\n throw new BzlLoadFailedException(\n String.format(\n \"module '%s'%s has invalid load statements\",\n label.toPathFragment(),\n StarlarkBuiltinsValue.isBuiltinsRepo(label.getRepository()) ? \" (internal)\" : \"\"),\n Code.PARSE_ERROR);\n }\n ImmutableList.Builder<BzlLoadValue.Key> loadKeysBuilder =\n ImmutableList.builderWithExpectedSize(loadLabels.size());\n for (Label loadLabel : loadLabels) {\n loadKeysBuilder.add(key.getKeyForLoad(loadLabel));\n }\n ImmutableList<BzlLoadValue.Key> loadKeys = loadKeysBuilder.build();\n\n // Load .bzl modules.\n // When not using bzl inlining, this is done in parallel for all loads.\n List<BzlLoadValue> loadValues =\n inliningState == null\n ? computeBzlLoadsWithSkyframe(env, loadKeys, programLoads)\n : computeBzlLoadsWithInlining(env, loadKeys, programLoads, inliningState);\n if (loadValues == null) {\n return null; // Skyframe deps unavailable\n }\n\n // Validate that the current .bzl file satisfies each loaded dependency's load visibility.\n // Violations are reported as error events (since there can be more than one in a single file)\n // and also trigger a BzlLoadFailedException.\n checkLoadVisibilities(\n pkg,\n \"module \" + label.getCanonicalForm(),\n loadValues,\n loadKeys,\n programLoads,\n /* demoteErrorsToWarnings= */ !builtins.starlarkSemantics.getBool(\n BuildLanguageOptions.CHECK_BZL_VISIBILITY),\n env.getListener());\n\n // Accumulate a transitive digest of the bzl file, the digests of its direct loads, and the\n // digest of the @_builtins pseudo-repository (if applicable).\n Fingerprint fp = new Fingerprint();\n fp.addBytes(compileValue.getDigest());\n\n // Populate the load map and add transitive digests to the fingerprint.\n Map<String, Module> loadMap = Maps.newLinkedHashMapWithExpectedSize(programLoads.size());\n int i = 0;\n for (Pair<String, Location> load : programLoads) {\n BzlLoadValue v = loadValues.get(i++);\n loadMap.put(load.first, v.getModule()); // dups ok\n fp.addBytes(v.getTransitiveDigest());\n }\n\n // Retrieve predeclared symbols and complete the digest computation.\n ImmutableMap<String, Object> predeclared =\n getAndDigestPredeclaredEnvironment(key, builtins, fp);\n if (predeclared == null) {\n return null;\n }\n byte[] transitiveDigest = fp.digestAndReset();\n\n // The BazelModuleContext holds additional contextual info to be associated with the Module,\n // including the label and a reified copy of the load DAG.\n BazelModuleContext bazelModuleContext =\n BazelModuleContext.create(\n label,\n repoMapping,\n prog.getFilename(),\n ImmutableList.copyOf(loadMap.values()),\n transitiveDigest);\n\n // Construct the initial Starlark module used for executing the program.\n // The set of keys in the predeclared environment matches the set of predeclareds used to\n // compile the .bzl file into a Program.\n Module module =\n Module.withPredeclaredAndData(builtins.starlarkSemantics, predeclared, bazelModuleContext);\n\n // The BzlInitThreadContext holds Starlark thread-local state to be read and updated during\n // evaluation.\n BzlInitThreadContext context =\n new BzlInitThreadContext(\n label,\n transitiveDigest,\n ruleClassProvider.getToolsRepository(),\n ruleClassProvider.getNetworkAllowlistForTests(),\n ruleClassProvider.getConfigurationFragmentMap(),\n new SymbolGenerator<>(label));\n\n // executeBzlFile may post events to the Environment's handler, but events do not matter when\n // caching BzlLoadValues. Note that executing the code mutates the Module and\n // BzlInitThreadContext.\n executeBzlFile(\n prog, label, module, loadMap, context, builtins.starlarkSemantics, env.getListener());\n\n BzlVisibility bzlVisibility = context.getBzlVisibility();\n if (bzlVisibility == null) {\n bzlVisibility = BzlVisibility.PUBLIC;\n }\n // We save load visibility in the BzlLoadValue rather than the BazelModuleContext because\n // visibility doesn't need to be introspected by any Starlark builtin methods, and because the\n // alternative would mean mutating or overwriting the BazelModuleContext after evaluation.\n return new BzlLoadValue(module, transitiveDigest, bzlVisibility);\n }",
"protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void saveBeforeCompile() { }",
"public void saveBeforeCompile() { }",
"public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }",
"protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"void warningsForUnresolvedFragRefs()\n { \n FragRefs[] unresolved = (FragRefs[])fragRefs.values().toArray(new FragRefs[fragRefs.size()]);\n for (int i=0; i<unresolved.length; ++i)\n { \n FragRefs r = unresolved[i];\n for (int j=0; j < r.uris.size(); ++j)\n {\n Uri uri = (Uri)r.uris.get(j);\n XElem elem = (XElem)r.elems.get(j);\n warning(\"Unresolved fragment reference '\" + uri + \"'\", elem);\n }\n } \n }",
"public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }",
"private static native void initCachedClassMap();",
"private void initSharedPre() {\n\t}",
"protected Object compileAndLoad() throws IOException {\n String generatedSource = printJCodeModel();\n return compileAndLoadSource(generatedSource, TEST_CLASS_NAME);\n }",
"public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }",
"public interface C1255b {\n /* renamed from: a */\n public static final C1255b f3973a = new C34771();\n /* renamed from: b */\n public static final C1255b f3974b = new C34782();\n /* renamed from: c */\n public static final C1255b f3975c = new C34793();\n /* renamed from: d */\n public static final C1255b f3976d = f3974b;\n\n /* renamed from: com.bumptech.glide.load.engine.c.a$b$1 */\n class C34771 implements C1255b {\n /* renamed from: a */\n public void mo1031a(Throwable th) {\n }\n\n C34771() {\n }\n }\n\n /* renamed from: com.bumptech.glide.load.engine.c.a$b$2 */\n class C34782 implements C1255b {\n C34782() {\n }\n\n /* renamed from: a */\n public void mo1031a(Throwable th) {\n if (th != null && Log.isLoggable(\"GlideExecutor\", 6)) {\n Log.e(\"GlideExecutor\", \"Request threw uncaught throwable\", th);\n }\n }\n }\n\n /* renamed from: com.bumptech.glide.load.engine.c.a$b$3 */\n class C34793 implements C1255b {\n C34793() {\n }\n\n /* renamed from: a */\n public void mo1031a(Throwable th) {\n if (th != null) {\n throw new RuntimeException(\"Request threw uncaught throwable\", th);\n }\n }\n }\n\n /* renamed from: a */\n void mo1031a(Throwable th);\n }",
"private static AndroidNClassLoader createAndroidNClassLoader(PathClassLoader original, Application application) throws Exception {\n AndroidNClassLoader androidNClassLoader = new AndroidNClassLoader(\"\", original, application);\n Field originPathList = ShareReflectUtil.findField(original, \"pathList\");\n Object originPathListObject = originPathList.get(original);\n //should reflect definingContext also\n Field originClassloader = ShareReflectUtil.findField(originPathListObject, \"definingContext\");\n originClassloader.set(originPathListObject, androidNClassLoader);\n //copy pathList\n Field pathListField = ShareReflectUtil.findField(androidNClassLoader, \"pathList\");\n //just use PathClassloader's pathList\n pathListField.set(androidNClassLoader, originPathListObject);\n\n //we must recreate dexFile due to dexCache\n List<File> additionalClassPathEntries = new ArrayList<>();\n Field dexElement = ShareReflectUtil.findField(originPathListObject, \"dexElements\");\n Object[] originDexElements = (Object[]) dexElement.get(originPathListObject);\n for (Object element : originDexElements) {\n DexFile dexFile = (DexFile) ShareReflectUtil.findField(element, \"dexFile\").get(element);\n if (dexFile == null) {\n continue;\n }\n additionalClassPathEntries.add(new File(dexFile.getName()));\n //protect for java.lang.AssertionError: Failed to close dex file in finalizer.\n oldDexFiles.add(dexFile);\n }\n Method makePathElements = ShareReflectUtil.findMethod(originPathListObject, \"makePathElements\", List.class, File.class,\n List.class);\n ArrayList<IOException> suppressedExceptions = new ArrayList<>();\n Object[] newDexElements = (Object[]) makePathElements.invoke(originPathListObject, additionalClassPathEntries, null, suppressedExceptions);\n dexElement.set(originPathListObject, newDexElements);\n\n try {\n Class.forName(CHECK_CLASSLOADER_CLASS, true, androidNClassLoader);\n } catch (Throwable thr) {\n Log.e(TAG, \"load TinkerTestAndroidNClassLoader fail, try to fixDexElementsForProtectedApp\");\n fixDexElementsForProtectedApp(application, newDexElements);\n }\n\n return androidNClassLoader;\n }",
"private void resolve(String[] sourceCompilationUnits, String[] encodings, String[] bindingKeys, FileASTRequestor astRequestor, int apiLevel, Map compilerOptions, int flags) {\n astRequestor.compilationUnitResolver = this;\n this.bindingTables = new DefaultBindingResolver.BindingTables();\n CompilationUnitDeclaration unit = null;\n try {\n int length = sourceCompilationUnits.length;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits = new org.eclipse.jdt.internal.compiler.env.ICompilationUnit[length];\n int count = 0;\n for (int i = 0; i < length; i++) {\n char[] contents = null;\n String encoding = encodings != null ? encodings[i] : null;\n String sourceUnitPath = sourceCompilationUnits[i];\n try {\n contents = Util.getFileCharContent(new File(sourceUnitPath), encoding);\n } catch (IOException e) {\n continue;\n }\n if (contents == null) {\n // go to the next unit\n continue;\n }\n sourceUnits[count++] = new org.eclipse.jdt.internal.compiler.batch.CompilationUnit(contents, sourceUnitPath, encoding);\n }\n beginToCompile(sourceUnits, bindingKeys);\n // process all units (some more could be injected in the loop by the lookup environment)\n for (int i = 0; i < this.totalUnits; i++) {\n if (resolvedRequestedSourcesAndKeys(i)) {\n // cleanup remaining units\n for (; i < this.totalUnits; i++) {\n this.unitsToProcess[i].cleanUp();\n this.unitsToProcess[i] = null;\n }\n break;\n }\n unit = this.unitsToProcess[i];\n try {\n // this.process(...) is optimized to not process already known units\n super.process(unit, i);\n // requested AST\n char[] fileName = unit.compilationResult.getFileName();\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit source = (org.eclipse.jdt.internal.compiler.env.ICompilationUnit) this.requestedSources.get(fileName);\n if (source != null) {\n // convert AST\n CompilationResult compilationResult = unit.compilationResult;\n org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = compilationResult.compilationUnit;\n char[] contents = sourceUnit.getContents();\n AST ast = AST.newAST(apiLevel);\n ast.setFlag(flags | AST.RESOLVED_BINDINGS);\n ast.setDefaultNodeFlag(ASTNode.ORIGINAL);\n ASTConverter converter = new ASTConverter(/*need to resolve bindings*/\n compilerOptions, true, this.monitor);\n BindingResolver resolver = new DefaultBindingResolver(unit.scope, null, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, this.fromJavaProject);\n ast.setBindingResolver(resolver);\n converter.setAST(ast);\n CompilationUnit compilationUnit = converter.convert(unit, contents);\n compilationUnit.setTypeRoot(null);\n compilationUnit.setLineEndTable(compilationResult.getLineSeparatorPositions());\n ast.setDefaultNodeFlag(0);\n ast.setOriginalModificationCount(ast.modificationCount());\n // pass it to requestor\n astRequestor.acceptAST(new String(source.getFileName()), compilationUnit);\n worked(1);\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedSources.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n // requested binding\n Object key = this.requestedKeys.get(fileName);\n if (key != null) {\n if (key instanceof BindingKeyResolver) {\n reportBinding(key, astRequestor, unit);\n worked(1);\n } else if (key instanceof ArrayList) {\n Iterator iterator = ((ArrayList) key).iterator();\n while (iterator.hasNext()) {\n reportBinding(iterator.next(), astRequestor, unit);\n worked(1);\n }\n }\n // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested\n // mark it as removed\n this.requestedKeys.put(// mark it as removed\n fileName, // mark it as removed\n null);\n }\n } finally {\n // cleanup compilation unit result\n unit.cleanUp();\n }\n // release reference to processed unit declaration\n this.unitsToProcess[i] = null;\n this.requestor.acceptResult(unit.compilationResult.tagAsAccepted());\n }\n // remaining binding keys\n DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, null, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, true);\n Object[] keys = this.requestedKeys.valueTable;\n for (int j = 0, keysLength = keys.length; j < keysLength; j++) {\n BindingKeyResolver keyResolver = (BindingKeyResolver) keys[j];\n if (keyResolver == null)\n continue;\n Binding compilerBinding = keyResolver.getCompilerBinding();\n IBinding binding = compilerBinding == null ? null : resolver.getBinding(compilerBinding);\n // pass it to requestor\n astRequestor.acceptBinding(((BindingKeyResolver) this.requestedKeys.valueTable[j]).getKey(), binding);\n worked(1);\n }\n } catch (OperationCanceledException e) {\n throw e;\n } catch (AbortCompilation e) {\n this.handleInternalException(e, unit);\n } catch (Error e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } catch (RuntimeException e) {\n this.handleInternalException(e, unit, null);\n throw e;\n } finally {\n // disconnect ourselves from ast requestor\n astRequestor.compilationUnitResolver = null;\n }\n }",
"@Override synchronized public void resolve()\n{\n if (isResolved()) return;\n\n RebaseMain.logD(\"START RESOLVE\");\n for (RebaseJavaFile jf : file_nodes) {\n RebaseMain.logD(\"FILE: \" + jf.getFile().getFileName());\n }\n\n clearResolve();\n\n RebaseJavaTyper jt = new RebaseJavaTyper(base_context);\n RebaseJavaResolver jr = new RebaseJavaResolver(jt);\n jt.assignTypes(this);\n jr.resolveNames(this);\n\n all_types = new HashSet<RebaseJavaType>(jt.getAllTypes());\n\n setResolved(true);\n}",
"private void solveDependencies() {\n requiredProjects.clear();\n requiredProjects.addAll(getFlattenedRequiredProjects(selectedProjects));\n }",
"private void m14047a(@javax.annotation.Nullable okhttp3.internal.p155a.C2918d.C2915a r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = this;\n if (r1 == 0) goto L_0x0005;\n L_0x0002:\n r1.m14100c();\t Catch:{ IOException -> 0x0005 }\n L_0x0005:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a(okhttp3.internal.a.d$a):void\");\n }",
"void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public Header [] compilationUnit(Header [] loaded, final int depth)\r\n {\r\n\ttry\r\n\t{\r\n this.depth = depth;\r\n String trunc = sources.getPath();\r\n list = loaded == null?new Header[0]:loaded;\r\n countToken = 0;\r\n \r\n Find.notePass(null);\r\n \r\n lookAhead();\r\n\r\n // read package name\r\n String myPackage = null;\r\n if (nextSymbol == Keyword.PACKAGESY)\r\n {\r\n lookAhead();\r\n myPackage = qualident();\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }\r\n\r\n Header header = new Header(new File(Parser.jdkSource).getPath(), trunc, myPackage, depth);\r\n\r\n Vector imported = new Vector();\r\n imported.add(\"java.lang.\");\r\n\r\n // read import statements\r\n while (nextSymbol == Keyword.IMPORTSY)\r\n imported.add(importDeclaration());\r\n\r\n header.imports = new String[imported.size()];\r\n for(int l = 0; l < imported.size(); l++)\r\n header.imports[l] = (String)imported.get(l);\r\n\r\n trunc = trunc.substring(0, sources.getPath().lastIndexOf(\".java\"));\r\n String basename = trunc.substring(trunc.lastIndexOf('\\\\') + 1);\r\n\r\n scopeStack = header.scopes;\r\n\r\n while(nextSymbol != Keyword.EOFSY)\r\n typeDeclaration(header.base, basename);\r\n\r\n matchKeyword(Keyword.EOFSY);\r\n\r\n if (Errors.count() != 0)\r\n return null;\r\n\r\n // write valid header\r\n header.write(trunc + \".h\");\r\n\r\n // append compiled file to list\r\n Header [] newList = new Header[(list != null?list.length:0) + 1];\r\n\r\n for(int i = 0; i < newList.length - 1; i++)\r\n newList[i] = list[i];\r\n\r\n newList[newList.length - 1] = header;\r\n list = newList;\r\n connectClasses(list);\r\n\r\n // resolve superclasses and interfaces\r\n for(int i = 0; i < header.scopes.size() && list != null; i++)\r\n {\r\n Vector v = new Vector();\r\n Scope scope = (Scope)header.scopes.get(i);\r\n\r\n for(Iterator iter = scope.iterator(); iter.hasNext();)\r\n {\r\n Basic b = (Basic)iter.next();\r\n if (b instanceof ClassType)\r\n v = getExtendImplement((ClassType)b);\r\n }\r\n\r\n while(v.size() > 0 && list != null)\r\n {\r\n connectClasses(list);\r\n list = loadSource((String)v.get(0), list, header, force);\r\n v.remove(0);\r\n }\r\n }\r\n\r\n if (Errors.count() != 0 || header.depth > 0 || list == null)\r\n return list;\r\n\r\n // process imports\r\n for(int i = 0; i < imported.size() && list != null; i++)\r\n {\r\n String st = (String)imported.get(i);\r\n if (!st.endsWith(\".\"))\r\n {\r\n connectClasses(list);\r\n list = loadSource(st.substring(st.lastIndexOf('.') + 1), list, header, force);\r\n }\r\n }\r\n\r\n if (Errors.count() != 0 || header.depth > 0 || list == null)\r\n return list;\r\n\r\n connectClasses(list);\r\n // process unresolved references\r\n for(int i = 0; i < header.scopes.size() && list != null; i++)\r\n {\r\n Scope scope = (Scope)header.scopes.get(i);\r\n Iterator step = scope.iterator();\r\n while(step.hasNext() && list != null)\r\n {\r\n Basic x = (Basic)step.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n boolean inner = false;\r\n ClassType y = (ClassType)x;\r\n\r\n while(y.unresolved.size() > 0 && list != null)\r\n {\r\n Iterator it = y.unresolved.iterator();\r\n if (!it.hasNext())\r\n break;\r\n String name = (String)it.next();\r\n it = null;\r\n y.unresolved.remove(name);\r\n String [] s = name.split(\"\\\\.\");\r\n Scope [] z = null;\r\n\r\n z = Find.find(s[0], scope, true);\r\n\r\n if (z.length == 0)\r\n {\r\n list = loadSource(s[0], list, header, force);\r\n connectClasses(list);\r\n }\r\n try {\r\n if (s.length > 1)\r\n {\r\n ClassType [] classes = null;\r\n \r\n classes = Find.findClass(s[0], 0, scope);\r\n \r\n if (classes.length == 0)\r\n {\r\n classes = new ClassType[1];\r\n classes[0] = y;\r\n }\r\n for(int k = 1; k < s.length && classes.length > 0; k++)\r\n {\r\n Basic[] b = classes[0].scope.get(s[k]);\r\n for (int j = 0; j < b.length; j++)\r\n if (b[j] instanceof VariableType)\r\n {\r\n VariableType v = (VariableType) b[j];\r\n if (v.type.type == Keyword.NONESY)\r\n {\r\n classes = Find.findClass(v.type.ident.string, 0, scope);\r\n \r\n if (classes.length == 0)\r\n {\r\n y.unresolved.add(v.type.ident.string);\r\n //y.unresolved.add(name);\r\n }\r\n }\r\n else\r\n classes = new ClassType[0];\r\n break;\r\n }\r\n else if (b[j] instanceof MethodType)\r\n {\r\n MethodType v = (MethodType) b[j];\r\n if (v.type.type == Keyword.NONESY)\r\n {\r\n classes = Find.findClass(v.type.ident.string, 0, scope);\r\n \r\n if (classes.length == 0)\r\n {\r\n y.unresolved.add(v.type.ident.string);\r\n //y.unresolved.add(name);\r\n }\r\n }\r\n else\r\n classes = new ClassType[0];\r\n break;\r\n }\r\n else if (b[j] instanceof ClassType)\r\n {\r\n classes = new ClassType[1];\r\n classes[0] = (ClassType) b[j];\r\n break;\r\n }\r\n }\r\n }\r\n } catch(Exception ee){error(\"nullpointer \" + s[0] + '.' + s[1]);}\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (depth > 0)\r\n return list;\r\n\r\n if (Errors.count() != 0 || list == null)\r\n return null;\r\n\r\n connectClasses(list);\r\n \r\n Find.notePass(this);\r\n\r\n // resolve operator tree to Forth-code\r\n FileOutputStream file = null, starter = null;\r\n try\r\n {\r\n file = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + \".fs\");\r\n starter = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + \".start.fs\");\r\n System.out.println(\"translate \" + header.name);\r\n\r\n for(int k = 0; k < header.scopes.size(); k++)\r\n {\r\n Scope scope = (Scope)header.scopes.get(k);\r\n boolean module = (k == 0);\r\n for(Iterator iter = scope.iterator(); iter.hasNext();)\r\n {\r\n Basic b = (Basic)iter.next();\r\n if (b instanceof ClassType && (b.modify & Keyword.INTERFACESY.value) == 0)\r\n {\r\n if (gc.startsWith(\"m\"))\r\n CodeRCmodified.codeClass( (ClassType) b, file, starter, module);\r\n else\r\n Code3color.codeClass( (ClassType) b, file, starter, module);\r\n module = false;\r\n }\r\n }\r\n }\r\n\r\n file.close();\r\n starter.close();\r\n }\r\n catch(IOException ex1) { ex1.printStackTrace(); }\r\n \r\n Find.notePass(this);\r\n\t}\r\n\tcatch(Exception failed)\r\n\t{ error(failed.getMessage() + \" aborted\"); }\r\n \r\n return (Errors.count() != 0)?null:list;\r\n }",
"public interface i {\n\n /* compiled from: MemoryCache */\n public interface a {\n }\n}",
"@Override\n public boolean getDefineAlternateReferenceLocationFlag() {\n return false;\n }",
"public static void SelfCallForLoading() {\n\t}",
"@Override\r\n protected void clearStaticReferences() {\r\n // free static fields :\r\n documentFactory = null;\r\n transformerFactory = null;\r\n schemaFactory = null;\r\n\r\n cacheDOM.clear();\r\n cacheDOM = null;\r\n\r\n cacheXSL.clear();\r\n cacheXSL = null;\r\n }",
"public void updateSource() {\n\t\t// Set the mode to recording\n\t\tmode = RECORD;\n\t\t// Traverse the source and record the architectures structure\n\t\tinspect();\n\t\t// Set the mode to code generation\n\t\tmode = GENERATE;\n\t\t// Traverse the source and calls back when key source elements are\n\t\t// missing\n\t\tinspect();\n\t\t// System.out.println(tree);\n\t\t// Add the source files that are missing\n\t\tArrayList<TagNode> tags = tree.getUnvisited();\n\t\tcreateSourceFiles(tags);\n\t}",
"private static void removeDuplicateCheckcasts(String filename, String output) {\n try {\n JavaClass clazz = new ClassParser(filename).parse();\n Method[] methods = clazz.getMethods();\n ConstantPoolGen cp = new ConstantPoolGen(clazz.getConstantPool());\n\n for (int i = 0; i < methods.length; i++) {\n if (!(methods[i].isAbstract() || methods[i].isNative())) {\n MethodGen mg = new MethodGen(methods[i], clazz.getClassName(), cp);\n Method stripped = removeDuplicateCheckcasts(mg);\n\n if (stripped != null)\n methods[i] = stripped;\n }\n }\n\n clazz.setConstantPool(cp.getFinalConstantPool());\n clazz.dump(output);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void parseHRefs (URL page, String name, URL base) throws IOException {\n Reader r = source.getReader (page);\n URL[] refs = ParseURLs.parse (r, page);\n \n String b = base.toExternalForm();\n for (int i = 0; i < refs.length; i++) {\n String e = refs[i].toExternalForm ();\n int hash = e.indexOf ('#');\n if (hash >= 0) {\n e = e.substring (0, hash);\n }\n if (e.startsWith (b)) {\n String s = e.substring (b.length ());\n Collection c = (Collection)deps.get (name);\n if (c == null) {\n c = new ArrayList ();\n deps.put (name, c);\n }\n c.add (s.intern ());\n }\n }\n r.close (); \n }",
"private static void zza(java.lang.ClassLoader r3) throws com.google.android.gms.dynamite.DynamiteModule.zzc {\n /*\n r0 = 0\n java.lang.String r1 = \"com.google.android.gms.dynamiteloader.DynamiteLoaderV2\"\n java.lang.Class r3 = r3.loadClass(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1 = 0\n java.lang.Class[] r2 = new java.lang.Class[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.reflect.Constructor r3 = r3.getConstructor(r2) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object[] r1 = new java.lang.Object[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object r3 = r3.newInstance(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n android.os.IBinder r3 = (android.os.IBinder) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r3 != 0) goto L_0x001a\n r3 = r0\n goto L_0x002e\n L_0x001a:\n java.lang.String r1 = \"com.google.android.gms.dynamite.IDynamiteLoaderV2\"\n android.os.IInterface r1 = r3.queryLocalInterface(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n boolean r2 = r1 instanceof com.google.android.gms.dynamite.zzl // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r2 == 0) goto L_0x0028\n r3 = r1\n com.google.android.gms.dynamite.zzl r3 = (com.google.android.gms.dynamite.zzl) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n goto L_0x002e\n L_0x0028:\n com.google.android.gms.dynamite.zzm r1 = new com.google.android.gms.dynamite.zzm // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1.<init>(r3) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r3 = r1\n L_0x002e:\n zzaSH = r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n return\n L_0x0031:\n r3 = move-exception\n com.google.android.gms.dynamite.DynamiteModule$zzc r1 = new com.google.android.gms.dynamite.DynamiteModule$zzc\n java.lang.String r2 = \"Failed to instantiate dynamite loader\"\n r1.<init>(r2, r3, r0)\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.dynamite.DynamiteModule.zza(java.lang.ClassLoader):void\");\n }",
"public void libraryLoaded();",
"@Override\n public abstract boolean needsResolving();",
"private boolean compilationRequired( String module, File output )\n throws MojoExecutionException\n {\n GwtModule gwtModule = readModule( module );\n if ( gwtModule.getEntryPoints().length == 0 )\n {\n // No entry-point, this is a secondary module : compiling this one will fail\n // with '[ERROR] Module has no entry points defined'\n return false;\n }\n\n if ( force )\n {\n return true;\n }\n\n String modulePath = gwtModule.getPath();\n String outputTarget = modulePath + \"/\" + modulePath + \".nocache.js\";\n\n // Require compilation if no js file present in target.\n if ( !new File( output, outputTarget ).exists() )\n {\n return true;\n }\n\n // js file allreay exists, but may not be up-to-date with project source files\n SingleTargetSourceMapping singleTargetMapping = new SingleTargetSourceMapping( \".java\", outputTarget );\n StaleSourceScanner scanner = new StaleSourceScanner();\n scanner.addSourceMapping( singleTargetMapping );\n\n Collection<File> compileSourceRoots = new HashSet<File>();\n classpathBuilder.addSourcesWithActiveProjects( getProject(), compileSourceRoots, SCOPE_COMPILE );\n classpathBuilder.addResourcesWithActiveProjects( getProject(), compileSourceRoots, SCOPE_COMPILE );\n for ( File sourceRoot : compileSourceRoots )\n {\n if ( !sourceRoot.isDirectory() )\n {\n continue;\n }\n try\n {\n if ( !scanner.getIncludedSources( sourceRoot, output ).isEmpty() )\n {\n getLog().debug( \"found stale source in \" + sourceRoot + \" compared with \" + output );\n return true;\n }\n }\n catch ( InclusionScanException e )\n {\n throw new MojoExecutionException( \"Error scanning source root: \\'\" + sourceRoot + \"\\' \"\n + \"for stale files to recompile.\", e );\n }\n }\n return false;\n }",
"private void removeOrphanClasspaths() {\n Set<String> allRecordedRemotePaths = new HashSet<String>(localPathTranslation.keySet());\n for (String remotePath : localClasspathProcessor.getLocalClasspath().values()) {\n allRecordedRemotePaths.remove(remotePath);\n }\n localPathTranslation.keySet().removeAll(allRecordedRemotePaths);\n\n // Now add new translations\n for (String remotePath : localClasspathProcessor.getLocalClasspath().values()) {\n if (!localPathTranslation.containsKey(remotePath)) {\n localPathTranslation.put(remotePath, UNDEFINED);\n }\n }\n }",
"@Before\n public void loadReferenceData() {\n if (fireOnceRule.shouldFireRule()) {\n RefDataUtils.loadReferenceDataToCacheOnly();\n }\n }",
"private void initializeReferences(String inputFilename) {\n\t\tparser = new Parser(inputFilename);\n\t\tlocations = new TreeMap<>();\n\t}",
"private static int compile(String filename) throws Exception {\n\t\tInputStream inp = new BufferedInputStream(new FileInputStream(filename));\n\t\tParser parser = new Parser(inp);\n\t\tjava_cup.runtime.Symbol parseTree = null;\n\t\ttry {\n\t\t\tparseTree = parser.parse();\n\t\t} catch (Throwable e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new Error(e.toString());\n\t\t} finally {\n\t\t\tinp.close();\n\t\t}\n\t\t\n\t\tDecls tree = (Decls) parseTree.value;\n\t\t\n\t\tSemantic semant = new Semantic();\n\t\tsemant.checkProg(tree);\n\t\tif (semant.hasError()) {\n\t\t\tsemant.printErrors();\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t//System.out.println(\"Semant: OK\");\n\t\t\tLabel.fcount = 0;\n\t\t\t\n\t\t\tLabel topLabel = new Label(\"main\");\n\t\t\tLevel topLevel = new Level();\n\t\t\tTranslate translate = new Translate();\n\t\t\ttranslate.transProg(tree, topLabel, topLevel);\n\t\t\tList<CompileUnit> units = translate.getUnits();\n\t\t\t\n\t\t\t//=============================== Optimize =================================\n\t\t\tAnalyzer analyzer = new Analyzer();\n\t\t\tLabelEliminator le = new LabelEliminator();\n\t\t\t\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\t//System.out.println(u.getQuads().get(0));\n\t\t\t\tu.replaceBranches(analyzer);\n\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\tu.findLiveness(analyzer);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (CompileUnit u: units) {\n\t\t\t\tList<Quad> qs = u.getQuads();\n\t\t\t\tfor (Quad q: qs) {\n\t\t\t\t\tif (q instanceof MoveL)\n\t\t\t\t\t\t((MoveL)q).src.used = true;\n\t\t\t\t}\n\t\t\t\tGotoCompression.process(u);\n\t\t\t}\n\t\t\t\n\t\t\tLocalCopyPropagation lcp = new LocalCopyPropagation();\n\t\t\tDeadCodeEliminator dce = new DeadCodeEliminator();\n\t\t\tAvailableExpressionAnalyzer aea = new AvailableExpressionAnalyzer();\n\t\t\tCommonExpressionEliminator cse = new CommonExpressionEliminator();\n\t\t\tfor (CompileUnit u : units) {\n\t\t\t\tList<Quad> oldQuads = new LinkedList<Quad>();\n\t\t\t\t//int cnt = 0;\n\t\t\t\tdo {\n\t\t\t\t\toldQuads.clear();\n\t\t\t\t\toldQuads.addAll(u.getQuads());\n\t\t\t\t\t\n\t\t\t\t\tdo {\n\t\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\t\taea.analyze(u.getBasicBlocks());\n\t\t\t\t\t\t//System.out.println(++cnt);\n\t\t\t\t\t}\n\t\t\t\t\twhile (cse.eliminate(u));\n\n\t\t\t\t\tfor (BasicBlock bb : u.getBasicBlocks()) {\n\t\t\t\t\t\tlcp.process(bb);\n\t\t\t\t\t}\n\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\tdce.process(u);\n\t\t\t\t\tu.findBasicBlocks(analyzer);\n\t\t\t\t\tu.findLiveness(analyzer);\n\t\t\t\t\twhile (le.eliminate(u));\n\t\t\t\t}\n\t\t\t\twhile (!u.getQuads().equals(oldQuads));\n\t\t\t}\n\t\t\t\n\t\t\t//========================================================================\n\t\t\tCodegen codegen = new Codegen();\n\t\t\tcodegen.gen(new Assem(\".data\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl args\"));\n\t\t\tcodegen.gen(new Assem(\"!args:\\t.space %\", (Translate.maxArgc + 1) * 4));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tfor (DataFrag df: translate.getDataFrags())\n\t\t\t\tif (df.label.used)\n\t\t\t\t\tcodegen.gen(df.gen());\n\t\t\t\n\t\t\tcodegen.gen(new Assem(\".text\"));\n\t\t\tcodegen.gen(new Assem(\".align 2\"));\n\t\t\tcodegen.gen(new Assem(\".globl main\"));\n\t\t\t\n\t\t\tfor (CompileUnit u: units)\n\t\t\t\tcodegen.gen(u, new LinearScan(u, analyzer));/**/\n\n\t\t\t//System.out.println((System.nanoTime() - start) / 1000000 + \" ms\");\n\t\t\t//PrintStream out = System.out;\n\t\t\tPrintStream out = new PrintStream(new BufferedOutputStream(new FileOutputStream(\"assem.s\")));\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############### CODE GEN ###############\");\n\t\t\tout.println(\"########################################\");\n\t\t\tcodegen.flush(out);\n\t\t\tout.println(\"########################################\");\n\t\t\tout.println(\"############# RUNTIME CODE #############\");\n\t\t\tout.println(\"########################################\");\n\t\t\t//Scanner scanner = new Scanner(new FileInputStream(new File(\"runtime.s\")));\n\t\t\t//while (scanner.hasNextLine()) {\n\t\t\t//\tout.println(scanner.nextLine());\n\t\t\t//}\n\t\t\t//scanner.close();\n\t\t\tout.close();\n\t\t\treturn 0;\n\t\t}\n\t}",
"void removeBrokenRefs() \r\n {\n\r\n if (LOG.isTraceOn()) LOG.trace(\"BEGIN removeBrokenRefs\"); \r\n\r\n Iterator compItr = new ComponentTreeIterator(\r\n (BComponent) BOrd.make(\"slot:/\").resolve(service, null).get());\r\n\r\n // check every component\r\n while (compItr.hasNext())\r\n {\r\n BComponent comp = (BComponent) compItr.next();\r\n HDict tags = BHDict.findTagAnnotation(comp);\r\n if (tags == null) continue;\r\n\r\n // check if any of the tags are a broken ref\r\n Set brokenRefs = null;\r\n Iterator tagItr = tags.iterator();\r\n while (tagItr.hasNext())\r\n {\r\n Map.Entry e = (Map.Entry) tagItr.next();\r\n String name = (String) e.getKey();\r\n HVal val = (HVal) e.getValue();\r\n\r\n if (val instanceof HRef)\r\n {\r\n // try to resolve the ref\r\n try\r\n {\r\n BComponent lookup = tagMgr.lookupComponent((HRef) val);\r\n if (lookup == null)\r\n throw new IllegalStateException(\"Cannot find component for \" + val);\r\n }\r\n // failed!\r\n catch (Exception e2)\r\n {\r\n LOG.warning(\r\n \"broken ref '\" + name + \"' found in \" + \r\n comp.getSlotPath());\r\n\r\n if (brokenRefs == null)\r\n brokenRefs = new HashSet();\r\n brokenRefs.add(name);\r\n }\r\n }\r\n }\r\n\r\n // at least one broken ref was found\r\n if (brokenRefs != null)\r\n {\r\n HDictBuilder hdb = new HDictBuilder();\r\n tagItr = tags.iterator();\r\n while (tagItr.hasNext())\r\n {\r\n Map.Entry e = (Map.Entry) tagItr.next();\r\n String name = (String) e.getKey();\r\n HVal val = (HVal) e.getValue();\r\n\r\n if (!brokenRefs.contains(name))\r\n hdb.add(name, val);\r\n }\r\n comp.set(\"haystack\", BHDict.make(hdb.toDict()));\r\n }\r\n }\r\n\r\n if (LOG.isTraceOn()) LOG.trace(\"END removeBrokenRefs\"); \r\n }",
"void initLOD(int r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: android.renderscript.AllocationAdapter.initLOD(int):void, dex: in method: android.renderscript.AllocationAdapter.initLOD(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.renderscript.AllocationAdapter.initLOD(int):void\");\n }",
"@Test\n\tpublic void prepSourceFile() throws Exception {\n\t\t\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"source/source.txt\"));\n\t\tfor (int i = 0; i < 125; i++) {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"source/small-source.txt\"));\n\t\t\tfor (int j = 0; j < 80000; j++) {\n\t\t\t\tbw.write(br.readLine() + \"\\n\");\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tbw.close();\n\t}",
"public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }",
"private void initializeImpl() {\n if (initialized) {\n return;\n }\n initFields();\n\n final List<ProjectScope> currentProjects;\n final ProjectScope allProjects;\n CsmObject refObject = getReferencedObject();\n CsmProject refObjectPrj = null;\n if (CsmKindUtilities.isOffsetable(refObject)) {\n CsmFile refObjFile = ((CsmOffsetable)refObject).getContainingFile();\n if (refObjFile != null) {\n refObjectPrj = refObjFile.getProject();\n }\n }\n if ((refObject != null) && !CsmKindUtilities.isLocalVariable(refObject)) {\n Collection<Project> ps = CsmRefactoringUtils.getContextProjects(this.origObject);\n if (!ps.isEmpty()) {\n defaultScope = Scope.USER_SPECIFIED;\n currentProjects = new ArrayList<>();\n Icon icon = null;\n for (Project p : ps) {\n ProjectInformation pi = ProjectUtils.getInformation(p);\n icon = pi.getIcon();\n CsmProject prj = CsmModelAccessor.getModel().getProject(p);\n ProjectScope prjScope = new ProjectScope(new JLabel(pi.getDisplayName(), icon, SwingConstants.LEFT), prj);\n currentProjects.add(prjScope);\n }\n allProjects = new ProjectScope(new JLabel(NbBundle.getMessage(WhereUsedPanel.class, \"LBL_AllProjects\"), icon, SwingConstants.LEFT), null); // NOI18N\n } else {\n defaultScope = Scope.ALL;\n currentProjects = null;\n allProjects = null;\n }\n } else if (CsmKindUtilities.isLocalVariable(refObject) && refObjectPrj != null) {\n defaultScope = Scope.CURRENT;\n ProjectScope prjScope = new ProjectScope(null, refObjectPrj);\n currentProjects = new ArrayList<>();\n currentProjects.add(prjScope);\n allProjects = null;\n } else {\n defaultScope = Scope.ALL;\n currentProjects = null;\n allProjects = null;\n }\n String labelText;\n String _isBaseClassText = null;\n boolean _needVirtualMethodPanel = false;\n boolean _needClassPanel = false;\n if (CsmKindUtilities.isMethod(refObject)) {\n CsmMethod method = (CsmMethod) CsmBaseUtilities.getFunctionDeclaration((CsmFunction) refObject);\n// CsmVisibility vis = ((CsmMember)refObject).getVisibility();\n String functionDisplayName = CsmDisplayUtilities.htmlize(method.getSignature().toString());\n methodDeclaringClass = method.getContainingClass();\n String displayClassName = methodDeclaringClass.getName().toString();\n labelText = getString(\"DSC_MethodUsages\", functionDisplayName, displayClassName); // NOI18N\n CsmVirtualInfoQuery query = CsmVirtualInfoQuery.getDefault();\n if (query.isVirtual(method)) {\n Collection<CsmMethod> baseMethods = query.getTopmostBaseDeclarations(method);\n // use only the first for now\n baseVirtualMethod = baseMethods.isEmpty() ? method : baseMethods.iterator().next();\n assert baseVirtualMethod != null : \"virtual method must have start virtual declaration\";\n methodDeclaringSuperClass = baseVirtualMethod.getContainingClass();\n if (!method.equals(baseVirtualMethod)) {\n _isBaseClassText = getString(\"LBL_UsagesOfBaseClass\", methodDeclaringSuperClass.getName().toString()); // NOI18N\n }\n _needVirtualMethodPanel = true;\n }\n } else if (CsmKindUtilities.isFunction(refObject)) {\n String functionFQN = ((CsmFunction)refObject).getSignature().toString();\n functionFQN = CsmDisplayUtilities.htmlize(functionFQN);\n labelText = getString(\"DSC_FunctionUsages\", functionFQN); // NOI18N\n } else if (CsmKindUtilities.isClass(refObject)) {\n CsmDeclaration.Kind classKind = ((CsmDeclaration)refObject).getKind();\n String key;\n if (classKind == CsmDeclaration.Kind.STRUCT) {\n key = \"DSC_StructUsages\"; // NOI18N\n } else if (classKind == CsmDeclaration.Kind.UNION) {\n key = \"DSC_UnionUsages\"; // NOI18N\n } else {\n key = \"DSC_ClassUsages\"; // NOI18N\n }\n labelText = getString(key, ((CsmClassifier)refObject).getQualifiedName().toString());\n _needClassPanel = true;\n } else if (CsmKindUtilities.isTypedef(refObject)) {\n String tdName = ((CsmTypedef)refObject).getQualifiedName().toString();\n labelText = getString(\"DSC_TypedefUsages\", tdName); // NOI18N\n } else if (CsmKindUtilities.isTypeAlias(refObject)) {\n String taName = ((CsmTypeAlias)refObject).getQualifiedName().toString();\n labelText = getString(\"DSC_TypeAliasUsages\", taName); // NOI18N \n } else if (CsmKindUtilities.isEnum(refObject)) {\n labelText = getString(\"DSC_EnumUsages\", ((CsmEnum)refObject).getQualifiedName().toString()); // NOI18N\n } else if (CsmKindUtilities.isEnumerator(refObject)) {\n CsmEnumerator enmtr = ((CsmEnumerator)refObject);\n labelText = getString(\"DSC_EnumeratorUsages\", enmtr.getName().toString(), enmtr.getEnumeration().getName().toString()); // NOI18N\n } else if (CsmKindUtilities.isField(refObject)) {\n String fieldName = ((CsmField)refObject).getName().toString();\n String displayClassName = ((CsmField)refObject).getContainingClass().getName().toString();\n labelText = getString(\"DSC_FieldUsages\", fieldName, displayClassName); // NOI18N\n } else if (CsmKindUtilities.isVariable(refObject)) {\n String varName = ((CsmVariable)refObject).getName().toString();\n labelText = getString(\"DSC_VariableUsages\", varName); // NOI18N\n } else if (CsmKindUtilities.isFile(refObject)) {\n String fileName = ((CsmFile)refObject).getName().toString();\n labelText = getString(\"DSC_FileUsages\", fileName); // NOI18N\n } else if (CsmKindUtilities.isNamespace(refObject)) {\n String nsName = ((CsmNamespace)refObject).getQualifiedName().toString();\n labelText = getString(\"DSC_NamespaceUsages\", nsName); // NOI18N\n// } else if (element.getKind() == ElementKind.CONSTRUCTOR) {\n// String methodName = element.getName();\n// String className = getClassName(element);\n// labelText = getFormattedString(\"DSC_ConstructorUsages\", methodName, className); // NOI18N\n } else if (CsmKindUtilities.isMacro(refObject)) {\n StringBuilder macroName = new StringBuilder(((CsmMacro)refObject).getName());\n if (((CsmMacro)refObject).getParameters() != null) {\n macroName.append(\"(\"); // NOI18N\n Iterator<CharSequence> params = ((CsmMacro)refObject).getParameters().iterator();\n if (params.hasNext()) {\n macroName.append(params.next());\n while (params.hasNext()) {\n macroName.append(\", \"); // NOI18N\n macroName.append(params.next());\n }\n }\n macroName.append(\")\"); // NOI18N\n }\n labelText = getString(\"DSC_MacroUsages\", macroName.toString()); // NOI18N\n } else if (CsmKindUtilities.isQualified(refObject)) {\n labelText = ((CsmQualifiedNamedElement)refObject).getQualifiedName().toString();\n } else if (refObject != null) {\n labelText = this.name;\n } else {\n labelText = getString(\"DSC_ElNotAvail\", this.name); // NOI18N\n }\n\n final StringBuilder buf = new StringBuilder();\n int col = 0;\n for(int i = 0; i < labelText.length(); i++) {\n char c = labelText.charAt(i);\n col++;\n buf.append(c);\n if (col > 72 && (c == ' ' || c == ',')) { // NOI18N\n buf.append(\"<br>\"); // NOI18N\n col = 0;\n }\n }\n\n if (refObject != null) {\n this.name = labelText;\n }\n \n// final Set<Modifier> modifiers = modif;\n final String isBaseClassText = _isBaseClassText;\n final boolean showMethodPanel = _needVirtualMethodPanel;\n final boolean showClassPanel = _needClassPanel;\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n remove(classesPanel);\n remove(methodsPanel);\n label.setText(buf.toString());\n // WARNING for now since this feature is not ready yet\n// String combinedLabelText = \"<html><font style=\\\"color: red\\\">WARNING: This feature is in development and inaccurate!</font><br><br>\" + labelText + \"</html>\"; // NOI18N\n// label.setText(combinedLabelText);\n if (showMethodPanel) {\n add(methodsPanel, BorderLayout.CENTER);\n methodsPanel.setVisible(true);\n if (isBaseClassText != null) {\n Mnemonics.setLocalizedText(m_isBaseClass, isBaseClassText);\n m_isBaseClass.setVisible(true);\n m_isBaseClass.setSelected(true);\n } else {\n m_isBaseClass.setVisible(false);\n m_isBaseClass.setSelected(false);\n }\n// if (methodDeclaringSuperClass != null) {\n// m_overriders.setVisible(true);\n// m_isBaseClass.setVisible(true);\n// m_isBaseClass.setSelected(true);\n// Mnemonics.setLocalizedText(m_isBaseClass, isBaseClassText);\n// } else {\n// m_overriders.setVisible(false);\n// m_isBaseClass.setVisible(false);\n// m_isBaseClass.setSelected(false);\n// } \n } else if (showClassPanel) {\n add(classesPanel, BorderLayout.CENTER);\n classesPanel.setVisible(true); \n } else {\n// if (element.getKind() == ElementKind.METHOD) {\n// add(methodsPanel, BorderLayout.CENTER);\n// methodsPanel.setVisible(true);\n// m_usages.setVisible(!modifiers.contains(Modifier.STATIC));\n// // TODO - worry about frozen?\n// m_overriders.setVisible(modifiers.contains(Modifier.STATIC) || modifiers.contains(Modifier.PRIVATE));\n// if (methodDeclaringSuperClass != null) {\n// m_isBaseClass.setVisible(true);\n// m_isBaseClass.setSelected(true);\n// Mnemonics.setLocalizedText(m_isBaseClass, isBaseClassText);\n// } else {\n// m_isBaseClass.setVisible(false);\n// m_isBaseClass.setSelected(false);\n// }\n// } else if ((element.getKind() == ElementKind.CLASS) || (element.getKind() == ElementKind.MODULE)) {\n// add(classesPanel, BorderLayout.CENTER);\n// classesPanel.setVisible(true);\n// } else {\n// remove(classesPanel);\n// remove(methodsPanel);\n// c_subclasses.setVisible(false);\n// m_usages.setVisible(false);\n// c_usages.setVisible(false);\n// c_directOnly.setVisible(false);\n }\n if (currentProjects != null) {\n Object[] model = new Object[currentProjects.size() + 1];\n model[0] = allProjects;\n for (int i = 0; i < currentProjects.size(); i++) {\n model[i+1] = currentProjects.get(i);\n }\n scope.setModel(new DefaultComboBoxModel(model));\n scope.setRenderer(new JLabelRenderer());\n if (defaultScope == Scope.CURRENT) {\n scopePanel.setVisible(false);\n scope.setSelectedIndex(1);\n } else {\n int defaultItem = (Integer) RefactoringModule.getOption(\"whereUsed.scope\", 0); // NOI18N\n scope.setSelectedIndex(defaultItem);\n }\n } else {\n scopePanel.setVisible(false);\n } \n validate();\n }\n });\n\n initialized = true;\n }",
"public boolean shouldIncludeInGlobalSearch() {\n/* 255 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test\n public void testDistBuiltins()\n {\n String sName = \"dist-builtins\";\n generateEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.asssertBuiltIns(sName);\n }"
] | [
"0.5855714",
"0.58275753",
"0.5778467",
"0.57646245",
"0.570275",
"0.5668533",
"0.5655039",
"0.5630103",
"0.5624753",
"0.55769354",
"0.55769354",
"0.55578065",
"0.5509325",
"0.54942036",
"0.54883903",
"0.5457668",
"0.54342145",
"0.5429356",
"0.5419641",
"0.54177815",
"0.5416745",
"0.5411489",
"0.540446",
"0.54016256",
"0.5364459",
"0.5350865",
"0.5333326",
"0.53170455",
"0.5312004",
"0.52919745",
"0.528391",
"0.527817",
"0.52739376",
"0.5267494",
"0.5255985",
"0.52487594",
"0.52480024",
"0.52476907",
"0.5235293",
"0.5227541",
"0.5226402",
"0.52032673",
"0.5200756",
"0.52006525",
"0.5198204",
"0.5189103",
"0.51797134",
"0.5173571",
"0.51518625",
"0.5139025",
"0.5132894",
"0.5122997",
"0.51135266",
"0.51112527",
"0.50999665",
"0.50981444",
"0.5093519",
"0.50903016",
"0.5087937",
"0.5080933",
"0.5078819",
"0.5070558",
"0.5070558",
"0.5065638",
"0.50640696",
"0.5055333",
"0.50486696",
"0.50485194",
"0.5048437",
"0.50460434",
"0.50246453",
"0.5020997",
"0.50178474",
"0.5015882",
"0.5007005",
"0.50036913",
"0.5002779",
"0.49965978",
"0.49957597",
"0.49826482",
"0.49780744",
"0.49756548",
"0.49667645",
"0.4950925",
"0.49414527",
"0.4940444",
"0.49403638",
"0.49325645",
"0.49311733",
"0.49309948",
"0.49307808",
"0.49206623",
"0.491768",
"0.49104023",
"0.49056208",
"0.49055094",
"0.4896757",
"0.4891201",
"0.48791072",
"0.48776785",
"0.4872422"
] | 0.0 | -1 |
"import" ident qualifiedImport ';' | private String importDeclaration()
{
String handle;
matchKeyword(Keyword.IMPORTSY);
handle = nextToken.string;
matchKeyword(Keyword.IDENTSY);
handle = qualifiedImport(handle);
matchKeyword(Keyword.SEMICOLONSY);
return handle;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ImportDeclaration createImportDeclaration();",
"Import getImport();",
"Import createImport();",
"Import createImport();",
"public final void importDeclaration() throws RecognitionException {\n int importDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"importDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(189, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 3) ) { return ; }\n // Java.g:190:5: ( 'import' ( 'static' )? qualifiedName ( '.' '*' )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:190:9: 'import' ( 'static' )? qualifiedName ( '.' '*' )? ';'\n {\n dbg.location(190,9);\n match(input,27,FOLLOW_27_in_importDeclaration154); if (state.failed) return ;\n dbg.location(190,18);\n // Java.g:190:18: ( 'static' )?\n int alt9=2;\n try { dbg.enterSubRule(9);\n try { dbg.enterDecision(9);\n\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0==28) ) {\n alt9=1;\n }\n } finally {dbg.exitDecision(9);}\n\n switch (alt9) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: 'static'\n {\n dbg.location(190,18);\n match(input,28,FOLLOW_28_in_importDeclaration156); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(9);}\n\n dbg.location(190,28);\n pushFollow(FOLLOW_qualifiedName_in_importDeclaration159);\n qualifiedName();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(190,42);\n // Java.g:190:42: ( '.' '*' )?\n int alt10=2;\n try { dbg.enterSubRule(10);\n try { dbg.enterDecision(10);\n\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==29) ) {\n alt10=1;\n }\n } finally {dbg.exitDecision(10);}\n\n switch (alt10) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:190:43: '.' '*'\n {\n dbg.location(190,43);\n match(input,29,FOLLOW_29_in_importDeclaration162); if (state.failed) return ;\n dbg.location(190,47);\n match(input,30,FOLLOW_30_in_importDeclaration164); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(10);}\n\n dbg.location(190,53);\n match(input,26,FOLLOW_26_in_importDeclaration168); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 3, importDeclaration_StartIndex); }\n }\n dbg.location(191, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"importDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public final void mIMPORT() throws RecognitionException {\r\n try {\r\n int _type = IMPORT;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:266:8: ( '#import' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:266:10: '#import'\r\n {\r\n match(\"#import\"); \r\n\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"private ParseTree parseImportSpecifier() {\n SourcePosition start = getTreeStartLocation();\n IdentifierToken importedName = eatIdOrKeywordAsId();\n IdentifierToken destinationName = null;\n if (peekPredefinedString(PredefinedName.AS)) {\n eatPredefinedString(PredefinedName.AS);\n destinationName = eatId();\n } else if (isKeyword(importedName.value)) {\n reportExpectedError(null, PredefinedName.AS);\n }\n return new ImportSpecifierTree(getTreeLocation(start), importedName, destinationName);\n }",
"TopLevelImport createTopLevelImport();",
"String getImportedNamespace();",
"public final PythonParser.import_stmt_return import_stmt() throws RecognitionException {\n PythonParser.import_stmt_return retval = new PythonParser.import_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n PythonParser.import_name_return import_name102 = null;\n\n PythonParser.import_from_return import_from103 = null;\n\n\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:769:5: ( import_name | import_from )\n int alt48=2;\n int LA48_0 = input.LA(1);\n\n if ( (LA48_0==IMPORT) ) {\n alt48=1;\n }\n else if ( (LA48_0==FROM) ) {\n alt48=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 48, 0, input);\n\n throw nvae;\n }\n switch (alt48) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:769:7: import_name\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_import_name_in_import_stmt2839);\n import_name102=import_name();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, import_name102.getTree());\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:770:7: import_from\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_import_from_in_import_stmt2847);\n import_from103=import_from();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, import_from103.getTree());\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"public final PythonParser.import_name_return import_name() throws RecognitionException {\n PythonParser.import_name_return retval = new PythonParser.import_name_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token IMPORT104=null;\n PythonParser.dotted_as_names_return dotted_as_names105 = null;\n\n\n PythonTree IMPORT104_tree=null;\n RewriteRuleTokenStream stream_IMPORT=new RewriteRuleTokenStream(adaptor,\"token IMPORT\");\n RewriteRuleSubtreeStream stream_dotted_as_names=new RewriteRuleSubtreeStream(adaptor,\"rule dotted_as_names\");\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:775:5: ( IMPORT dotted_as_names -> ^( IMPORT[$IMPORT, $dotted_as_names.atypes] ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:775:7: IMPORT dotted_as_names\n {\n IMPORT104=(Token)match(input,IMPORT,FOLLOW_IMPORT_in_import_name2865); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_IMPORT.add(IMPORT104);\n\n pushFollow(FOLLOW_dotted_as_names_in_import_name2867);\n dotted_as_names105=dotted_as_names();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_dotted_as_names.add(dotted_as_names105.getTree());\n\n\n // AST REWRITE\n // elements: IMPORT\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 776:4: -> ^( IMPORT[$IMPORT, $dotted_as_names.atypes] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:776:7: ^( IMPORT[$IMPORT, $dotted_as_names.atypes] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Import(IMPORT, IMPORT104, (dotted_as_names105!=null?dotted_as_names105.atypes:null)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"public final void mT__37() throws RecognitionException {\n try {\n int _type = T__37;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalDSL.g:20:7: ( 'import' )\n // InternalDSL.g:20:9: 'import'\n {\n match(\"import\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final EObject ruleImportNamespace() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_0=null;\r\n AntlrDatatypeRuleToken lv_importedNamespace_1_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:5309:28: ( (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) ) ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:5310:1: (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) ) )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:5310:1: (otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:5310:3: otherlv_0= 'import' ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) )\r\n {\r\n otherlv_0=(Token)match(input,78,FOLLOW_78_in_ruleImportNamespace12287); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_0, grammarAccess.getImportNamespaceAccess().getImportKeyword_0());\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:5314:1: ( (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:5315:1: (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:5315:1: (lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:5316:3: lv_importedNamespace_1_0= ruleQualifiedNameWithWildcard\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getImportNamespaceAccess().getImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleQualifiedNameWithWildcard_in_ruleImportNamespace12308);\r\n lv_importedNamespace_1_0=ruleQualifiedNameWithWildcard();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getImportNamespaceRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"importedNamespace\",\r\n \t\tlv_importedNamespace_1_0, \r\n \t\t\"QualifiedNameWithWildcard\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \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 if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"static public String[] parseImport(String value) {\n \treturn value.split(\";\");\n }",
"public final EObject ruleImport() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_importURI_1_0=null;\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:298:28: ( (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) ) ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:299:1: (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) ) )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:299:1: (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:299:3: otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) )\n {\n otherlv_0=(Token)match(input,15,FOLLOW_15_in_ruleImport672); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getImportAccess().getImportKeyword_0());\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:303:1: ( (lv_importURI_1_0= RULE_STRING ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:304:1: (lv_importURI_1_0= RULE_STRING )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:304:1: (lv_importURI_1_0= RULE_STRING )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:305:3: lv_importURI_1_0= RULE_STRING\n {\n lv_importURI_1_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleImport689); \n\n \t\t\tnewLeafNode(lv_importURI_1_0, grammarAccess.getImportAccess().getImportURISTRINGTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getImportRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"importURI\",\n \t\tlv_importURI_1_0, \n \t\t\"STRING\");\n \t \n\n }\n\n\n }\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"private static String getFullyQualifiedImport(\n\t\t\tImportDeclaration importDeclaration) {\n\t\tNameExpr nameExpr = importDeclaration.getName();\n\n\t\tString buf = nameExpr.getName();\n\n\t\twhile (nameExpr instanceof QualifiedNameExpr) {\n\t\t\tnameExpr = ((QualifiedNameExpr) nameExpr).getQualifier();\n\t\t\tbuf = nameExpr.getName() + \".\" + buf;\n\t\t}\n\n\t\treturn buf;\n\t}",
"public final void rule__AstNamespace__ImportsAssignment_4_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22690:1: ( ( ruleImport ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22691:1: ( ruleImport )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22691:1: ( ruleImport )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22692:1: ruleImport\n {\n before(grammarAccess.getAstNamespaceAccess().getImportsImportParserRuleCall_4_4_0()); \n pushFollow(FOLLOW_ruleImport_in_rule__AstNamespace__ImportsAssignment_4_445451);\n ruleImport();\n\n state._fsp--;\n\n after(grammarAccess.getAstNamespaceAccess().getImportsImportParserRuleCall_4_4_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"static boolean Import(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Import\")) return false;\n if (!nextTokenIs(b, K_IMPORT)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = SchemaImport(b, l + 1);\n if (!r) r = ModuleImport(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"public final void rule__ImportDecl__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:15488:1: ( ( 'import' ) )\r\n // InternalGo.g:15489:1: ( 'import' )\r\n {\r\n // InternalGo.g:15489:1: ( 'import' )\r\n // InternalGo.g:15490:2: 'import'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getImportDeclAccess().getImportKeyword_1()); \r\n }\r\n match(input,84,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getImportDeclAccess().getImportKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"TypeImport createTypeImport();",
"public final PythonParser.import_from_return import_from() throws RecognitionException {\n PythonParser.import_from_return retval = new PythonParser.import_from_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token FROM106=null;\n Token IMPORT108=null;\n Token STAR109=null;\n Token LPAREN110=null;\n Token COMMA111=null;\n Token RPAREN112=null;\n Token d=null;\n List list_d=null;\n PythonParser.import_as_names_return i1 = null;\n\n PythonParser.import_as_names_return i2 = null;\n\n PythonParser.dotted_name_return dotted_name107 = null;\n\n\n PythonTree FROM106_tree=null;\n PythonTree IMPORT108_tree=null;\n PythonTree STAR109_tree=null;\n PythonTree LPAREN110_tree=null;\n PythonTree COMMA111_tree=null;\n PythonTree RPAREN112_tree=null;\n PythonTree d_tree=null;\n RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,\"token RPAREN\");\n RewriteRuleTokenStream stream_IMPORT=new RewriteRuleTokenStream(adaptor,\"token IMPORT\");\n RewriteRuleTokenStream stream_STAR=new RewriteRuleTokenStream(adaptor,\"token STAR\");\n RewriteRuleTokenStream stream_FROM=new RewriteRuleTokenStream(adaptor,\"token FROM\");\n RewriteRuleTokenStream stream_DOT=new RewriteRuleTokenStream(adaptor,\"token DOT\");\n RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,\"token COMMA\");\n RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,\"token LPAREN\");\n RewriteRuleSubtreeStream stream_import_as_names=new RewriteRuleSubtreeStream(adaptor,\"rule import_as_names\");\n RewriteRuleSubtreeStream stream_dotted_name=new RewriteRuleSubtreeStream(adaptor,\"rule dotted_name\");\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:782:5: ( FROM ( (d+= DOT )* dotted_name | (d+= DOT )+ ) IMPORT ( STAR -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeStarAlias($STAR), actions.makeLevel($d)] ) | i1= import_as_names -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i1.atypes), actions.makeLevel($d)] ) | LPAREN i2= import_as_names ( COMMA )? RPAREN -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i2.atypes), actions.makeLevel($d)] ) ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:782:7: FROM ( (d+= DOT )* dotted_name | (d+= DOT )+ ) IMPORT ( STAR -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeStarAlias($STAR), actions.makeLevel($d)] ) | i1= import_as_names -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i1.atypes), actions.makeLevel($d)] ) | LPAREN i2= import_as_names ( COMMA )? RPAREN -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i2.atypes), actions.makeLevel($d)] ) )\n {\n FROM106=(Token)match(input,FROM,FOLLOW_FROM_in_import_from2899); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_FROM.add(FROM106);\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:782:12: ( (d+= DOT )* dotted_name | (d+= DOT )+ )\n int alt51=2;\n alt51 = dfa51.predict(input);\n switch (alt51) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:782:13: (d+= DOT )* dotted_name\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:782:14: (d+= DOT )*\n loop49:\n do {\n int alt49=2;\n int LA49_0 = input.LA(1);\n\n if ( (LA49_0==DOT) ) {\n alt49=1;\n }\n\n\n switch (alt49) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:782:14: d+= DOT\n \t {\n \t d=(Token)match(input,DOT,FOLLOW_DOT_in_import_from2904); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_DOT.add(d);\n\n \t if (list_d==null) list_d=new ArrayList();\n \t list_d.add(d);\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop49;\n }\n } while (true);\n\n pushFollow(FOLLOW_dotted_name_in_import_from2907);\n dotted_name107=dotted_name();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_dotted_name.add(dotted_name107.getTree());\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:782:35: (d+= DOT )+\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:782:36: (d+= DOT )+\n int cnt50=0;\n loop50:\n do {\n int alt50=2;\n int LA50_0 = input.LA(1);\n\n if ( (LA50_0==DOT) ) {\n alt50=1;\n }\n\n\n switch (alt50) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:782:36: d+= DOT\n \t {\n \t d=(Token)match(input,DOT,FOLLOW_DOT_in_import_from2913); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_DOT.add(d);\n\n \t if (list_d==null) list_d=new ArrayList();\n \t list_d.add(d);\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt50 >= 1 ) break loop50;\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n EarlyExitException eee =\n new EarlyExitException(50, input);\n throw eee;\n }\n cnt50++;\n } while (true);\n\n\n }\n break;\n\n }\n\n IMPORT108=(Token)match(input,IMPORT,FOLLOW_IMPORT_in_import_from2917); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_IMPORT.add(IMPORT108);\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:783:9: ( STAR -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeStarAlias($STAR), actions.makeLevel($d)] ) | i1= import_as_names -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i1.atypes), actions.makeLevel($d)] ) | LPAREN i2= import_as_names ( COMMA )? RPAREN -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i2.atypes), actions.makeLevel($d)] ) )\n int alt53=3;\n switch ( input.LA(1) ) {\n case STAR:\n {\n alt53=1;\n }\n break;\n case NAME:\n {\n alt53=2;\n }\n break;\n case LPAREN:\n {\n alt53=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 53, 0, input);\n\n throw nvae;\n }\n\n switch (alt53) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:783:10: STAR\n {\n STAR109=(Token)match(input,STAR,FOLLOW_STAR_in_import_from2928); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_STAR.add(STAR109);\n\n\n\n // AST REWRITE\n // elements: FROM\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 784:8: -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeStarAlias($STAR), actions.makeLevel($d)] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:784:11: ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeStarAlias($STAR), actions.makeLevel($d)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new ImportFrom(FROM, FROM106, actions.makeFromText(list_d, (dotted_name107!=null?dotted_name107.name:null)), actions.makeStarAlias(STAR109), actions.makeLevel(list_d)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:786:11: i1= import_as_names\n {\n pushFollow(FOLLOW_import_as_names_in_import_from2959);\n i1=import_as_names();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_import_as_names.add(i1.getTree());\n\n\n // AST REWRITE\n // elements: FROM\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 787:8: -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i1.atypes), actions.makeLevel($d)] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:787:11: ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i1.atypes), actions.makeLevel($d)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new ImportFrom(FROM, FROM106, actions.makeFromText(list_d, (dotted_name107!=null?dotted_name107.name:null)), actions.makeAliases((i1!=null?i1.atypes:null)), actions.makeLevel(list_d)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n break;\n case 3 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:789:11: LPAREN i2= import_as_names ( COMMA )? RPAREN\n {\n LPAREN110=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_import_from2988); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN110);\n\n pushFollow(FOLLOW_import_as_names_in_import_from2992);\n i2=import_as_names();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_import_as_names.add(i2.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:789:37: ( COMMA )?\n int alt52=2;\n int LA52_0 = input.LA(1);\n\n if ( (LA52_0==COMMA) ) {\n alt52=1;\n }\n switch (alt52) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:789:37: COMMA\n {\n COMMA111=(Token)match(input,COMMA,FOLLOW_COMMA_in_import_from2994); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_COMMA.add(COMMA111);\n\n\n }\n break;\n\n }\n\n RPAREN112=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_import_from2997); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN112);\n\n\n\n // AST REWRITE\n // elements: FROM\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 790:8: -> ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i2.atypes), actions.makeLevel($d)] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:790:11: ^( FROM[$FROM, actions.makeFromText($d, $dotted_name.name),\\n actions.makeAliases($i2.atypes), actions.makeLevel($d)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new ImportFrom(FROM, FROM106, actions.makeFromText(list_d, (dotted_name107!=null?dotted_name107.name:null)), actions.makeAliases((i2!=null?i2.atypes:null)), actions.makeLevel(list_d)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n break;\n\n }\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"Imports createImports();",
"public final EObject ruleImportCS() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_2=null;\n Token otherlv_4=null;\n Token lv_isAll_6_0=null;\n AntlrDatatypeRuleToken lv_name_3_0 = null;\n\n EObject lv_ownedPathName_5_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:4162:2: ( ( (otherlv_0= 'import' | otherlv_1= 'include' | otherlv_2= 'library' ) ( ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= ':' )? ( (lv_ownedPathName_5_0= ruleURIPathNameCS ) ) ( (lv_isAll_6_0= '::*' ) )? ) )\n // InternalMyDsl.g:4163:2: ( (otherlv_0= 'import' | otherlv_1= 'include' | otherlv_2= 'library' ) ( ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= ':' )? ( (lv_ownedPathName_5_0= ruleURIPathNameCS ) ) ( (lv_isAll_6_0= '::*' ) )? )\n {\n // InternalMyDsl.g:4163:2: ( (otherlv_0= 'import' | otherlv_1= 'include' | otherlv_2= 'library' ) ( ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= ':' )? ( (lv_ownedPathName_5_0= ruleURIPathNameCS ) ) ( (lv_isAll_6_0= '::*' ) )? )\n // InternalMyDsl.g:4164:3: (otherlv_0= 'import' | otherlv_1= 'include' | otherlv_2= 'library' ) ( ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= ':' )? ( (lv_ownedPathName_5_0= ruleURIPathNameCS ) ) ( (lv_isAll_6_0= '::*' ) )?\n {\n // InternalMyDsl.g:4164:3: (otherlv_0= 'import' | otherlv_1= 'include' | otherlv_2= 'library' )\n int alt47=3;\n switch ( input.LA(1) ) {\n case 19:\n {\n alt47=1;\n }\n break;\n case 60:\n {\n alt47=2;\n }\n break;\n case 61:\n {\n alt47=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 47, 0, input);\n\n throw nvae;\n }\n\n switch (alt47) {\n case 1 :\n // InternalMyDsl.g:4165:4: otherlv_0= 'import'\n {\n otherlv_0=(Token)match(input,19,FOLLOW_51); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_0, grammarAccess.getImportCSAccess().getImportKeyword_0_0());\n \t\t\t\n }\n\n }\n break;\n case 2 :\n // InternalMyDsl.g:4170:4: otherlv_1= 'include'\n {\n otherlv_1=(Token)match(input,60,FOLLOW_51); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_1, grammarAccess.getImportCSAccess().getIncludeKeyword_0_1());\n \t\t\t\n }\n\n }\n break;\n case 3 :\n // InternalMyDsl.g:4175:4: otherlv_2= 'library'\n {\n otherlv_2=(Token)match(input,61,FOLLOW_51); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_2, grammarAccess.getImportCSAccess().getLibraryKeyword_0_2());\n \t\t\t\n }\n\n }\n break;\n\n }\n\n // InternalMyDsl.g:4180:3: ( ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= ':' )?\n int alt48=2;\n int LA48_0 = input.LA(1);\n\n if ( (LA48_0==RULE_SIMPLE_ID) ) {\n int LA48_1 = input.LA(2);\n\n if ( (LA48_1==42) ) {\n alt48=1;\n }\n }\n else if ( (LA48_0==RULE_ESCAPED_ID) ) {\n int LA48_2 = input.LA(2);\n\n if ( (LA48_2==42) ) {\n alt48=1;\n }\n }\n switch (alt48) {\n case 1 :\n // InternalMyDsl.g:4181:4: ( (lv_name_3_0= ruleIdentifier ) ) otherlv_4= ':'\n {\n // InternalMyDsl.g:4181:4: ( (lv_name_3_0= ruleIdentifier ) )\n // InternalMyDsl.g:4182:5: (lv_name_3_0= ruleIdentifier )\n {\n // InternalMyDsl.g:4182:5: (lv_name_3_0= ruleIdentifier )\n // InternalMyDsl.g:4183:6: lv_name_3_0= ruleIdentifier\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tnewCompositeNode(grammarAccess.getImportCSAccess().getNameIdentifierParserRuleCall_1_0_0());\n \t\t\t\t\t\n }\n pushFollow(FOLLOW_28);\n lv_name_3_0=ruleIdentifier();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getImportCSRule());\n \t\t\t\t\t\t}\n \t\t\t\t\t\tset(\n \t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\"name\",\n \t\t\t\t\t\t\tlv_name_3_0,\n \t\t\t\t\t\t\t\"org.eclipse.ocl.xtext.base.Base.Identifier\");\n \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\n }\n\n }\n\n\n }\n\n otherlv_4=(Token)match(input,42,FOLLOW_51); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(otherlv_4, grammarAccess.getImportCSAccess().getColonKeyword_1_1());\n \t\t\t\n }\n\n }\n break;\n\n }\n\n // InternalMyDsl.g:4205:3: ( (lv_ownedPathName_5_0= ruleURIPathNameCS ) )\n // InternalMyDsl.g:4206:4: (lv_ownedPathName_5_0= ruleURIPathNameCS )\n {\n // InternalMyDsl.g:4206:4: (lv_ownedPathName_5_0= ruleURIPathNameCS )\n // InternalMyDsl.g:4207:5: lv_ownedPathName_5_0= ruleURIPathNameCS\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getImportCSAccess().getOwnedPathNameURIPathNameCSParserRuleCall_2_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_52);\n lv_ownedPathName_5_0=ruleURIPathNameCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getImportCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"ownedPathName\",\n \t\t\t\t\t\tlv_ownedPathName_5_0,\n \t\t\t\t\t\t\"org.eclipse.ocl.xtext.essentialocl.EssentialOCL.URIPathNameCS\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalMyDsl.g:4224:3: ( (lv_isAll_6_0= '::*' ) )?\n int alt49=2;\n int LA49_0 = input.LA(1);\n\n if ( (LA49_0==62) ) {\n alt49=1;\n }\n switch (alt49) {\n case 1 :\n // InternalMyDsl.g:4225:4: (lv_isAll_6_0= '::*' )\n {\n // InternalMyDsl.g:4225:4: (lv_isAll_6_0= '::*' )\n // InternalMyDsl.g:4226:5: lv_isAll_6_0= '::*'\n {\n lv_isAll_6_0=(Token)match(input,62,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(lv_isAll_6_0, grammarAccess.getImportCSAccess().getIsAllColonColonAsteriskKeyword_3_0());\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getImportCSRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(current, \"isAll\", true, \"::*\");\n \t\t\t\t\n }\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final EObject ruleImport() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_importURI_1_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:140:2: ( (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_IMPORT_URI ) ) ) )\n // InternalMyDsl.g:141:2: (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_IMPORT_URI ) ) )\n {\n // InternalMyDsl.g:141:2: (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_IMPORT_URI ) ) )\n // InternalMyDsl.g:142:3: otherlv_0= 'import' ( (lv_importURI_1_0= RULE_IMPORT_URI ) )\n {\n otherlv_0=(Token)match(input,19,FOLLOW_5); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getImportAccess().getImportKeyword_0());\n \t\t\n }\n // InternalMyDsl.g:146:3: ( (lv_importURI_1_0= RULE_IMPORT_URI ) )\n // InternalMyDsl.g:147:4: (lv_importURI_1_0= RULE_IMPORT_URI )\n {\n // InternalMyDsl.g:147:4: (lv_importURI_1_0= RULE_IMPORT_URI )\n // InternalMyDsl.g:148:5: lv_importURI_1_0= RULE_IMPORT_URI\n {\n lv_importURI_1_0=(Token)match(input,RULE_IMPORT_URI,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(lv_importURI_1_0, grammarAccess.getImportAccess().getImportURIIMPORT_URITerminalRuleCall_1_0());\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getImportRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"importURI\",\n \t\t\t\t\t\tlv_importURI_1_0,\n \t\t\t\t\t\t\"org.xtext.example.mydsl.MyDsl.IMPORT_URI\");\n \t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"protected String getImportStatement() {\n return \"\";\n }",
"public Import() {\n this(null, new Name(), null, null, false, false);\n }",
"@Override\n public String visit(ImportDeclaration n, Object arg) {\n return null;\n }",
"public final void mT__47() throws RecognitionException {\n try {\n int _type = T__47;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:45:7: ( 'import' )\n // InternalSpeADL.g:45:9: 'import'\n {\n match(\"import\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final void rule__XImportDeclaration__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:16750:1: ( ( 'import' ) )\r\n // InternalDroneScript.g:16751:1: ( 'import' )\r\n {\r\n // InternalDroneScript.g:16751:1: ( 'import' )\r\n // InternalDroneScript.g:16752:2: 'import'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXImportDeclarationAccess().getImportKeyword_0()); \r\n }\r\n match(input,47,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXImportDeclarationAccess().getImportKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final EObject ruleImport() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_2=null;\n Token lv_importURI_3_0=null;\n Token otherlv_4=null;\n Token lv_name_5_0=null;\n Enumerator lv_importType_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMappingDsl.g:1810:2: ( (otherlv_0= 'import' ( (lv_importType_1_0= ruleImportType ) ) otherlv_2= 'from' ( (lv_importURI_3_0= RULE_STRING ) ) otherlv_4= 'as' ( (lv_name_5_0= RULE_ID ) ) ) )\n // InternalMappingDsl.g:1811:2: (otherlv_0= 'import' ( (lv_importType_1_0= ruleImportType ) ) otherlv_2= 'from' ( (lv_importURI_3_0= RULE_STRING ) ) otherlv_4= 'as' ( (lv_name_5_0= RULE_ID ) ) )\n {\n // InternalMappingDsl.g:1811:2: (otherlv_0= 'import' ( (lv_importType_1_0= ruleImportType ) ) otherlv_2= 'from' ( (lv_importURI_3_0= RULE_STRING ) ) otherlv_4= 'as' ( (lv_name_5_0= RULE_ID ) ) )\n // InternalMappingDsl.g:1812:3: otherlv_0= 'import' ( (lv_importType_1_0= ruleImportType ) ) otherlv_2= 'from' ( (lv_importURI_3_0= RULE_STRING ) ) otherlv_4= 'as' ( (lv_name_5_0= RULE_ID ) )\n {\n otherlv_0=(Token)match(input,35,FOLLOW_45); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getImportAccess().getImportKeyword_0());\n \t\t\n // InternalMappingDsl.g:1816:3: ( (lv_importType_1_0= ruleImportType ) )\n // InternalMappingDsl.g:1817:4: (lv_importType_1_0= ruleImportType )\n {\n // InternalMappingDsl.g:1817:4: (lv_importType_1_0= ruleImportType )\n // InternalMappingDsl.g:1818:5: lv_importType_1_0= ruleImportType\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getImportAccess().getImportTypeImportTypeEnumRuleCall_1_0());\n \t\t\t\t\n pushFollow(FOLLOW_46);\n lv_importType_1_0=ruleImportType();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getImportRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"importType\",\n \t\t\t\t\t\tlv_importType_1_0,\n \t\t\t\t\t\t\"de.fhdo.ddmm.technology.mappingdsl.MappingDsl.ImportType\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_2=(Token)match(input,36,FOLLOW_41); \n\n \t\t\tnewLeafNode(otherlv_2, grammarAccess.getImportAccess().getFromKeyword_2());\n \t\t\n // InternalMappingDsl.g:1839:3: ( (lv_importURI_3_0= RULE_STRING ) )\n // InternalMappingDsl.g:1840:4: (lv_importURI_3_0= RULE_STRING )\n {\n // InternalMappingDsl.g:1840:4: (lv_importURI_3_0= RULE_STRING )\n // InternalMappingDsl.g:1841:5: lv_importURI_3_0= RULE_STRING\n {\n lv_importURI_3_0=(Token)match(input,RULE_STRING,FOLLOW_47); \n\n \t\t\t\t\tnewLeafNode(lv_importURI_3_0, grammarAccess.getImportAccess().getImportURISTRINGTerminalRuleCall_3_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getImportRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"importURI\",\n \t\t\t\t\t\tlv_importURI_3_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.STRING\");\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_4=(Token)match(input,37,FOLLOW_7); \n\n \t\t\tnewLeafNode(otherlv_4, grammarAccess.getImportAccess().getAsKeyword_4());\n \t\t\n // InternalMappingDsl.g:1861:3: ( (lv_name_5_0= RULE_ID ) )\n // InternalMappingDsl.g:1862:4: (lv_name_5_0= RULE_ID )\n {\n // InternalMappingDsl.g:1862:4: (lv_name_5_0= RULE_ID )\n // InternalMappingDsl.g:1863:5: lv_name_5_0= RULE_ID\n {\n lv_name_5_0=(Token)match(input,RULE_ID,FOLLOW_2); \n\n \t\t\t\t\tnewLeafNode(lv_name_5_0, grammarAccess.getImportAccess().getNameIDTerminalRuleCall_5_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getImportRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_5_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.ID\");\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"private String imported(String string) {\n string = IMPORT.matcher(string).replaceAll(\"\");\n string = DOT.matcher(string).replaceAll(\"/\");\n string = SEMICOLON.matcher(string).replaceAll(\"\");\n string = \"/\" + string.trim() + \".java\";\n return string;\n }",
"public void testAttributeConstrainedDynamicImport() throws Exception {\n\t\tdoTest(\";foo=bar\", TEST_IMPORT_SYM_NAME + \"_1.0.0\");\n\t}",
"@Test\r\n public void testNamedImportStringHandling() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.List\");\r\n typeParser.addImport(\"java. util . Collection \");\r\n\r\n Type t0 = typeParser.parse(\"List\");\r\n assertEquals(t0, java.util.List.class);\r\n \r\n Type t1 = typeParser.parse(\"Collection\");\r\n assertEquals(t1, java.util.Collection.class);\r\n \r\n }",
"public final void rule__Instance__ImportsAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11940:1: ( ( ruleImport ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11941:1: ( ruleImport )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11941:1: ( ruleImport )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11942:1: ruleImport\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getInstanceAccess().getImportsImportParserRuleCall_1_0()); \n }\n pushFollow(FOLLOW_ruleImport_in_rule__Instance__ImportsAssignment_123932);\n ruleImport();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getInstanceAccess().getImportsImportParserRuleCall_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public TypeScriptWriter addImport(String name, String as, String from) {\n imports.addImport(name, as, from);\n return this;\n }",
"public final void rule__XImportDeclaration__ImportedTypeAssignment_1_0_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:4183:1: ( ( ( ruleQualifiedNameInStaticImport ) ) )\n // InternalCsv.g:4184:2: ( ( ruleQualifiedNameInStaticImport ) )\n {\n // InternalCsv.g:4184:2: ( ( ruleQualifiedNameInStaticImport ) )\n // InternalCsv.g:4185:3: ( ruleQualifiedNameInStaticImport )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getImportedTypeJvmDeclaredTypeCrossReference_1_0_2_0()); \n }\n // InternalCsv.g:4186:3: ( ruleQualifiedNameInStaticImport )\n // InternalCsv.g:4187:4: ruleQualifiedNameInStaticImport\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getImportedTypeJvmDeclaredTypeQualifiedNameInStaticImportParserRuleCall_1_0_2_0_1()); \n }\n pushFollow(FOLLOW_2);\n ruleQualifiedNameInStaticImport();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getImportedTypeJvmDeclaredTypeQualifiedNameInStaticImportParserRuleCall_1_0_2_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getImportedTypeJvmDeclaredTypeCrossReference_1_0_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void addWildcardImport(PackageOrClass importEntity)\n {\n wildcardImports.add(importEntity);\n }",
"public final void imports() throws RecognitionException {\n try {\n // css21.g:46:5: ( IMPORT_SYM ( STRING | URI ) ( medium ( COMMA medium )* )? SEMI )\n // css21.g:46:9: IMPORT_SYM ( STRING | URI ) ( medium ( COMMA medium )* )? SEMI\n {\n match(input,IMPORT_SYM,FOLLOW_IMPORT_SYM_in_imports128); if (state.failed) return ;\n\n if ( input.LA(1)==STRING||input.LA(1)==URI ) {\n input.consume();\n state.errorRecovery=false;\n state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n\n // css21.g:46:33: ( medium ( COMMA medium )* )?\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0==IDENT) ) {\n alt4=1;\n }\n switch (alt4) {\n case 1 :\n // css21.g:46:34: medium ( COMMA medium )*\n {\n pushFollow(FOLLOW_medium_in_imports137);\n medium();\n\n state._fsp--;\n if (state.failed) return ;\n\n // css21.g:46:41: ( COMMA medium )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==COMMA) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // css21.g:46:42: COMMA medium\n \t {\n \t match(input,COMMA,FOLLOW_COMMA_in_imports140); if (state.failed) return ;\n\n \t pushFollow(FOLLOW_medium_in_imports142);\n \t medium();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n break;\n\n }\n\n\n match(input,SEMI,FOLLOW_SEMI_in_imports148); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }",
"@Override\n public TypeOnDemandImportDeclaration parse(Parser parser) {\n if (!parser.peekPresentAndSkip(\"import\")) {\n return null;\n }\n //whitespace required here\n if (parseWhiteSpaceAndComments(parser).isEmpty()) {\n return null;\n }\n //simple type name\n QualifiedName name = parser.next(QualifiedName.class);\n if (name == null) {\n return null;\n }\n //spacing\n parseWhiteSpaceAndComments(parser);\n //dot\n if (!parser.peekPresentAndSkip('.')) {\n return null;\n }\n //spacing\n parseWhiteSpaceAndComments(parser);\n //asterisk\n if (!parser.peekPresentAndSkip('*')) {\n return null;\n }\n //spacing\n parseWhiteSpaceAndComments(parser);\n //semicolon\n if (!parser.peekPresentAndSkip(';')) {\n return null;\n }\n return new TypeOnDemandImportDeclaration(name);\n }",
"public void visit(ImportDeclaration n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n n.f3.accept(this);\n }",
"public final void rule__XImportDeclaration__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:3421:1: ( ( 'import' ) )\n // InternalCsv.g:3422:1: ( 'import' )\n {\n // InternalCsv.g:3422:1: ( 'import' )\n // InternalCsv.g:3423:2: 'import'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getImportKeyword_0()); \n }\n match(input,39,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getImportKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__AstPackage__ImportsAssignment_4_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22508:1: ( ( ruleImport ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22509:1: ( ruleImport )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22509:1: ( ruleImport )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22510:1: ruleImport\n {\n before(grammarAccess.getAstPackageAccess().getImportsImportParserRuleCall_4_1_0()); \n pushFollow(FOLLOW_ruleImport_in_rule__AstPackage__ImportsAssignment_4_145075);\n ruleImport();\n\n state._fsp--;\n\n after(grammarAccess.getAstPackageAccess().getImportsImportParserRuleCall_4_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void addImport(String importPackage) {\r\n this.imports.add(importPackage);\r\n }",
"public final void rule__XImportDeclaration__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:16803:1: ( ( ( ';' )? ) )\r\n // InternalDroneScript.g:16804:1: ( ( ';' )? )\r\n {\r\n // InternalDroneScript.g:16804:1: ( ( ';' )? )\r\n // InternalDroneScript.g:16805:2: ( ';' )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXImportDeclarationAccess().getSemicolonKeyword_2()); \r\n }\r\n // InternalDroneScript.g:16806:2: ( ';' )?\r\n int alt128=2;\r\n int LA128_0 = input.LA(1);\r\n\r\n if ( (LA128_0==75) ) {\r\n alt128=1;\r\n }\r\n switch (alt128) {\r\n case 1 :\r\n // InternalDroneScript.g:16806:3: ';'\r\n {\r\n match(input,75,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXImportDeclarationAccess().getSemicolonKeyword_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public void addImport(java.lang.String ximport)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(IMPORT$0);\n target.setStringValue(ximport);\n }\n }",
"@Override\n\tpublic Void visit(ClauseImport clause, Void ctx) {\n\t\treturn null;\n\t}",
"public final void rule__XImportDeclaration__ImportedTypeAssignment_1_0_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:19541:1: ( ( ( ruleQualifiedNameInStaticImport ) ) )\r\n // InternalDroneScript.g:19542:2: ( ( ruleQualifiedNameInStaticImport ) )\r\n {\r\n // InternalDroneScript.g:19542:2: ( ( ruleQualifiedNameInStaticImport ) )\r\n // InternalDroneScript.g:19543:3: ( ruleQualifiedNameInStaticImport )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXImportDeclarationAccess().getImportedTypeJvmDeclaredTypeCrossReference_1_0_2_0()); \r\n }\r\n // InternalDroneScript.g:19544:3: ( ruleQualifiedNameInStaticImport )\r\n // InternalDroneScript.g:19545:4: ruleQualifiedNameInStaticImport\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXImportDeclarationAccess().getImportedTypeJvmDeclaredTypeQualifiedNameInStaticImportParserRuleCall_1_0_2_0_1()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleQualifiedNameInStaticImport();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXImportDeclarationAccess().getImportedTypeJvmDeclaredTypeQualifiedNameInStaticImportParserRuleCall_1_0_2_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXImportDeclarationAccess().getImportedTypeJvmDeclaredTypeCrossReference_1_0_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void mT__36() throws RecognitionException {\n try {\n int _type = T__36;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalUniMapperGenerator.g:15:7: ( 'import' )\n // InternalUniMapperGenerator.g:15:9: 'import'\n {\n match(\"import\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public void testDynamicImport() throws Exception {\n\t\tdoTest(\";version=\\\"[1,2)\\\"\", TEST_ALT_IMPORT_SYM_NAME + \"_1.0.0\");\n\t}",
"private static void validateImportString(String importString)\r\n {\r\n String tokens[] = importString.split(\"\\\\.\");\r\n for (int i=0; i<tokens.length; i++)\r\n {\r\n String token = tokens[i];\r\n if (!isValidJavaIdentifier(token) &&\r\n !(i == tokens.length-1 && token.equals(\"*\")))\r\n {\r\n throw new IllegalArgumentException(\r\n \"Invalid import string: \"+importString);\r\n }\r\n }\r\n }",
"public final void rule__ImportDecl__Imports2Assignment_2_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18860:1: ( ( ruleImportSpec ) )\r\n // InternalGo.g:18861:2: ( ruleImportSpec )\r\n {\r\n // InternalGo.g:18861:2: ( ruleImportSpec )\r\n // InternalGo.g:18862:3: ruleImportSpec\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getImportDeclAccess().getImports2ImportSpecParserRuleCall_2_1_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleImportSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getImportDeclAccess().getImports2ImportSpecParserRuleCall_2_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XImportDeclaration__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:3474:1: ( ( ( ';' )? ) )\n // InternalCsv.g:3475:1: ( ( ';' )? )\n {\n // InternalCsv.g:3475:1: ( ( ';' )? )\n // InternalCsv.g:3476:2: ( ';' )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getSemicolonKeyword_2()); \n }\n // InternalCsv.g:3477:2: ( ';' )?\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( (LA27_0==14) ) {\n alt27=1;\n }\n switch (alt27) {\n case 1 :\n // InternalCsv.g:3477:3: ';'\n {\n match(input,14,FOLLOW_2); if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getSemicolonKeyword_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void importClass(String klass) throws Exception;",
"public final void mT__87() throws RecognitionException {\r\n try {\r\n int _type = T__87;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:84:7: ( 'import' )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:84:9: 'import'\r\n {\r\n match(\"import\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public final void rule__Import__ImportedNamespaceAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22765:1: ( ( ruleQualifiedNameWithWildCard ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22766:1: ( ruleQualifiedNameWithWildCard )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22766:1: ( ruleQualifiedNameWithWildCard )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22767:1: ruleQualifiedNameWithWildCard\n {\n before(grammarAccess.getImportAccess().getImportedNamespaceQualifiedNameWithWildCardParserRuleCall_1_0()); \n pushFollow(FOLLOW_ruleQualifiedNameWithWildCard_in_rule__Import__ImportedNamespaceAssignment_145606);\n ruleQualifiedNameWithWildCard();\n\n state._fsp--;\n\n after(grammarAccess.getImportAccess().getImportedNamespaceQualifiedNameWithWildCardParserRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"ImportedPackage createImportedPackage();",
"public final EObject ruleTypeImport() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_importURI_1_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalNgt.g:1345:2: ( (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) ) ) )\n // InternalNgt.g:1346:2: (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) ) )\n {\n // InternalNgt.g:1346:2: (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) ) )\n // InternalNgt.g:1347:3: otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) )\n {\n otherlv_0=(Token)match(input,15,FOLLOW_5); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getTypeImportAccess().getImportKeyword_0());\n \t\t\n // InternalNgt.g:1351:3: ( (lv_importURI_1_0= RULE_STRING ) )\n // InternalNgt.g:1352:4: (lv_importURI_1_0= RULE_STRING )\n {\n // InternalNgt.g:1352:4: (lv_importURI_1_0= RULE_STRING )\n // InternalNgt.g:1353:5: lv_importURI_1_0= RULE_STRING\n {\n lv_importURI_1_0=(Token)match(input,RULE_STRING,FOLLOW_2); \n\n \t\t\t\t\tnewLeafNode(lv_importURI_1_0, grammarAccess.getTypeImportAccess().getImportURISTRINGTerminalRuleCall_1_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getTypeImportRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"importURI\",\n \t\t\t\t\t\tlv_importURI_1_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.STRING\");\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final void rule__Import__ImportedNamespaceAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16834:1: ( ( ruleQualifiedName ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16835:1: ( ruleQualifiedName )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16835:1: ( ruleQualifiedName )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16836:1: ruleQualifiedName\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getImportAccess().getImportedNamespaceQualifiedNameParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_ruleQualifiedName_in_rule__Import__ImportedNamespaceAssignment_133961);\r\n ruleQualifiedName();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getImportAccess().getImportedNamespaceQualifiedNameParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"@Test\r\n public void testImportStringAmbiguity() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n typeParser.addImport(\"java.awt.*\");\r\n try\r\n {\r\n typeParser.parse(\"List\");\r\n fail(\"Expected exception\");\r\n }\r\n catch (IllegalArgumentException e)\r\n {\r\n // Expected\r\n }\r\n }",
"ImportOption[] getImports();",
"public static boolean SchemaImport(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"SchemaImport\")) return false;\n if (!nextTokenIs(b, K_IMPORT)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, SCHEMA_IMPORT, null);\n r = consumeTokens(b, 2, K_IMPORT, K_SCHEMA);\n p = r; // pin = 2\n r = r && report_error_(b, SchemaImport_2(b, l + 1));\n r = p && report_error_(b, URILiteral(b, l + 1)) && r;\n r = p && report_error_(b, SchemaImport_4(b, l + 1)) && r;\n r = p && Separator(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public void testVersionConstrainedDynamicImport() throws Exception {\n\t\tdoTest(\";version=\\\"[1,1.5)\\\"\" , TEST_IMPORT_SYM_NAME + \"_1.1.0\");\n\t}",
"public final void rule__ImportDecl__ImportsAssignment_2_0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18845:1: ( ( ruleImportSpec ) )\r\n // InternalGo.g:18846:2: ( ruleImportSpec )\r\n {\r\n // InternalGo.g:18846:2: ( ruleImportSpec )\r\n // InternalGo.g:18847:3: ruleImportSpec\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getImportDeclAccess().getImportsImportSpecParserRuleCall_2_0_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleImportSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getImportDeclAccess().getImportsImportSpecParserRuleCall_2_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Import__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2575:1: ( ( 'import' ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2576:1: ( 'import' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2576:1: ( 'import' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2577:1: 'import'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getImportAccess().getImportKeyword_0()); \n }\n match(input,33,FOLLOW_33_in_rule__Import__Group__0__Impl5547); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getImportAccess().getImportKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Import__ImportedNamespaceAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11970:1: ( ( ruleQualifiedNameWithWildCard ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11971:1: ( ruleQualifiedNameWithWildCard )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11971:1: ( ruleQualifiedNameWithWildCard )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11972:1: ruleQualifiedNameWithWildCard\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getImportAccess().getImportedNamespaceQualifiedNameWithWildCardParserRuleCall_1_0()); \n }\n pushFollow(FOLLOW_ruleQualifiedNameWithWildCard_in_rule__Import__ImportedNamespaceAssignment_123994);\n ruleQualifiedNameWithWildCard();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getImportAccess().getImportedNamespaceQualifiedNameWithWildCardParserRuleCall_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XImportDeclaration__Alternatives_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:823:1: ( ( ( rule__XImportDeclaration__Group_1_0__0 ) ) | ( ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 ) ) | ( ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 ) ) )\n int alt9=3;\n alt9 = dfa9.predict(input);\n switch (alt9) {\n case 1 :\n // InternalCsv.g:824:2: ( ( rule__XImportDeclaration__Group_1_0__0 ) )\n {\n // InternalCsv.g:824:2: ( ( rule__XImportDeclaration__Group_1_0__0 ) )\n // InternalCsv.g:825:3: ( rule__XImportDeclaration__Group_1_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getGroup_1_0()); \n }\n // InternalCsv.g:826:3: ( rule__XImportDeclaration__Group_1_0__0 )\n // InternalCsv.g:826:4: rule__XImportDeclaration__Group_1_0__0\n {\n pushFollow(FOLLOW_2);\n rule__XImportDeclaration__Group_1_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getGroup_1_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // InternalCsv.g:830:2: ( ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 ) )\n {\n // InternalCsv.g:830:2: ( ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 ) )\n // InternalCsv.g:831:3: ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getImportedTypeAssignment_1_1()); \n }\n // InternalCsv.g:832:3: ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 )\n // InternalCsv.g:832:4: rule__XImportDeclaration__ImportedTypeAssignment_1_1\n {\n pushFollow(FOLLOW_2);\n rule__XImportDeclaration__ImportedTypeAssignment_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getImportedTypeAssignment_1_1()); \n }\n\n }\n\n\n }\n break;\n case 3 :\n // InternalCsv.g:836:2: ( ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 ) )\n {\n // InternalCsv.g:836:2: ( ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 ) )\n // InternalCsv.g:837:3: ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getImportedNamespaceAssignment_1_2()); \n }\n // InternalCsv.g:838:3: ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 )\n // InternalCsv.g:838:4: rule__XImportDeclaration__ImportedNamespaceAssignment_1_2\n {\n pushFollow(FOLLOW_2);\n rule__XImportDeclaration__ImportedNamespaceAssignment_1_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getImportedNamespaceAssignment_1_2()); \n }\n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void addImport(String importString) {\n\t\t\tdynamicImports.add(importString);\n\t\t}",
"public final void rule__Import__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2605:1: ( ( ( rule__Import__ImportedNamespaceAssignment_1 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2606:1: ( ( rule__Import__ImportedNamespaceAssignment_1 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2606:1: ( ( rule__Import__ImportedNamespaceAssignment_1 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2607:1: ( rule__Import__ImportedNamespaceAssignment_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getImportAccess().getImportedNamespaceAssignment_1()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2608:1: ( rule__Import__ImportedNamespaceAssignment_1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:2608:2: rule__Import__ImportedNamespaceAssignment_1\n {\n pushFollow(FOLLOW_rule__Import__ImportedNamespaceAssignment_1_in_rule__Import__Group__1__Impl5605);\n rule__Import__ImportedNamespaceAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getImportAccess().getImportedNamespaceAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final EObject ruleTopLevelImport() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_importURI_1_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalNgt.g:210:2: ( (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) ) ) )\n // InternalNgt.g:211:2: (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) ) )\n {\n // InternalNgt.g:211:2: (otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) ) )\n // InternalNgt.g:212:3: otherlv_0= 'import' ( (lv_importURI_1_0= RULE_STRING ) )\n {\n otherlv_0=(Token)match(input,15,FOLLOW_5); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getTopLevelImportAccess().getImportKeyword_0());\n \t\t\n // InternalNgt.g:216:3: ( (lv_importURI_1_0= RULE_STRING ) )\n // InternalNgt.g:217:4: (lv_importURI_1_0= RULE_STRING )\n {\n // InternalNgt.g:217:4: (lv_importURI_1_0= RULE_STRING )\n // InternalNgt.g:218:5: lv_importURI_1_0= RULE_STRING\n {\n lv_importURI_1_0=(Token)match(input,RULE_STRING,FOLLOW_2); \n\n \t\t\t\t\tnewLeafNode(lv_importURI_1_0, grammarAccess.getTopLevelImportAccess().getImportURISTRINGTerminalRuleCall_1_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getTopLevelImportRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"importURI\",\n \t\t\t\t\t\tlv_importURI_1_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.STRING\");\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public void setImport (final String parg) throws CGException {\n ivImport = UTIL.ConvertToString(UTIL.clone(parg));\n }",
"@Test\r\n public void testImportStringHandling() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.List\");\r\n try\r\n {\r\n typeParser.addImport(\"java.awt.List\");\r\n fail(\"Expected exception\");\r\n }\r\n catch (IllegalArgumentException e)\r\n {\r\n // Expected\r\n }\r\n }",
"@Test\r\n public void testImportRedundancy() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n typeParser.addImport(\"java.util.*\");\r\n Type t1 = typeParser.parse(\"List\");\r\n assertEquals(t1, java.util.List.class);\r\n }",
"public final void rule__XImportDeclaration__Alternatives_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:3507:1: ( ( ( rule__XImportDeclaration__Group_1_0__0 ) ) | ( ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 ) ) | ( ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 ) ) )\r\n int alt43=3;\r\n alt43 = dfa43.predict(input);\r\n switch (alt43) {\r\n case 1 :\r\n // InternalDroneScript.g:3508:2: ( ( rule__XImportDeclaration__Group_1_0__0 ) )\r\n {\r\n // InternalDroneScript.g:3508:2: ( ( rule__XImportDeclaration__Group_1_0__0 ) )\r\n // InternalDroneScript.g:3509:3: ( rule__XImportDeclaration__Group_1_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXImportDeclarationAccess().getGroup_1_0()); \r\n }\r\n // InternalDroneScript.g:3510:3: ( rule__XImportDeclaration__Group_1_0__0 )\r\n // InternalDroneScript.g:3510:4: rule__XImportDeclaration__Group_1_0__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XImportDeclaration__Group_1_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXImportDeclarationAccess().getGroup_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalDroneScript.g:3514:2: ( ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 ) )\r\n {\r\n // InternalDroneScript.g:3514:2: ( ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 ) )\r\n // InternalDroneScript.g:3515:3: ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXImportDeclarationAccess().getImportedTypeAssignment_1_1()); \r\n }\r\n // InternalDroneScript.g:3516:3: ( rule__XImportDeclaration__ImportedTypeAssignment_1_1 )\r\n // InternalDroneScript.g:3516:4: rule__XImportDeclaration__ImportedTypeAssignment_1_1\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XImportDeclaration__ImportedTypeAssignment_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXImportDeclarationAccess().getImportedTypeAssignment_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // InternalDroneScript.g:3520:2: ( ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 ) )\r\n {\r\n // InternalDroneScript.g:3520:2: ( ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 ) )\r\n // InternalDroneScript.g:3521:3: ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXImportDeclarationAccess().getImportedNamespaceAssignment_1_2()); \r\n }\r\n // InternalDroneScript.g:3522:3: ( rule__XImportDeclaration__ImportedNamespaceAssignment_1_2 )\r\n // InternalDroneScript.g:3522:4: rule__XImportDeclaration__ImportedNamespaceAssignment_1_2\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XImportDeclaration__ImportedNamespaceAssignment_1_2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXImportDeclarationAccess().getImportedNamespaceAssignment_1_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public XtypeGrammarAccess.XImportDeclarationElements getXImportDeclarationAccess() {\r\n\t\treturn gaXtype.getXImportDeclarationAccess();\r\n\t}",
"public void addNormalImport(String name, JavaEntity importEntity)\n {\n normalImports.put(name, importEntity);\n }",
"public void setImporte(java.lang.String importe) {\n this.importe = importe;\n }",
"public XtypeGrammarAccess.XImportDeclarationElements getXImportDeclarationAccess() {\n\t\treturn gaXtype.getXImportDeclarationAccess();\n\t}",
"public XtypeGrammarAccess.XImportDeclarationElements getXImportDeclarationAccess() {\n\t\treturn gaXtype.getXImportDeclarationAccess();\n\t}",
"public static boolean importStatement(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"importStatement\")) return false;\n if (!nextTokenIs(b, \"<import statement>\", AT, IMPORT)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, IMPORT_STATEMENT, \"<import statement>\");\n r = importStatement_0(b, l + 1);\n r = r && consumeToken(b, IMPORT);\n r = r && uriElement(b, l + 1);\n p = r; // pin = 3\n r = r && report_error_(b, importStatement_3(b, l + 1));\n r = p && report_error_(b, importStatement_4(b, l + 1)) && r;\n r = p && report_error_(b, importStatement_5(b, l + 1)) && r;\n r = p && consumeToken(b, SEMICOLON) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public final void rule__Import__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:4133:1: ( ( ';' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:4134:1: ( ';' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:4134:1: ( ';' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:4135:1: ';'\n {\n before(grammarAccess.getImportAccess().getSemicolonKeyword_2()); \n match(input,49,FOLLOW_49_in_rule__Import__Group__2__Impl8883); \n after(grammarAccess.getImportAccess().getSemicolonKeyword_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XImportDeclaration__ImportedNamespaceAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:4255:1: ( ( ruleQualifiedNameWithWildcard ) )\n // InternalCsv.g:4256:2: ( ruleQualifiedNameWithWildcard )\n {\n // InternalCsv.g:4256:2: ( ruleQualifiedNameWithWildcard )\n // InternalCsv.g:4257:3: ruleQualifiedNameWithWildcard\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleQualifiedNameWithWildcard();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void importPackage(String pack) throws Exception;",
"protected void sequence_ImportDecl(ISerializationContext context, ImportDecl semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}",
"public final void entryRuleXImportDeclaration() throws RecognitionException {\n try {\n // InternalCsv.g:605:1: ( ruleXImportDeclaration EOF )\n // InternalCsv.g:606:1: ruleXImportDeclaration EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationRule()); \n }\n pushFollow(FOLLOW_1);\n ruleXImportDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationRule()); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public final EObject ruleImportedType() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_1=null;\n\n\n \tenterRule();\n\n try {\n // InternalMappingDsl.g:3271:2: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '::' ( ( ruleQualifiedName ) ) ) )\n // InternalMappingDsl.g:3272:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '::' ( ( ruleQualifiedName ) ) )\n {\n // InternalMappingDsl.g:3272:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '::' ( ( ruleQualifiedName ) ) )\n // InternalMappingDsl.g:3273:3: ( (otherlv_0= RULE_ID ) ) otherlv_1= '::' ( ( ruleQualifiedName ) )\n {\n // InternalMappingDsl.g:3273:3: ( (otherlv_0= RULE_ID ) )\n // InternalMappingDsl.g:3274:4: (otherlv_0= RULE_ID )\n {\n // InternalMappingDsl.g:3274:4: (otherlv_0= RULE_ID )\n // InternalMappingDsl.g:3275:5: otherlv_0= RULE_ID\n {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getImportedTypeRule());\n \t\t\t\t\t}\n \t\t\t\t\n otherlv_0=(Token)match(input,RULE_ID,FOLLOW_32); \n\n \t\t\t\t\tnewLeafNode(otherlv_0, grammarAccess.getImportedTypeAccess().getImportImportCrossReference_0_0());\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,29,FOLLOW_7); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getImportedTypeAccess().getColonColonKeyword_1());\n \t\t\n // InternalMappingDsl.g:3290:3: ( ( ruleQualifiedName ) )\n // InternalMappingDsl.g:3291:4: ( ruleQualifiedName )\n {\n // InternalMappingDsl.g:3291:4: ( ruleQualifiedName )\n // InternalMappingDsl.g:3292:5: ruleQualifiedName\n {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getImportedTypeRule());\n \t\t\t\t\t}\n \t\t\t\t\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getImportedTypeAccess().getTypeTypeCrossReference_2_0());\n \t\t\t\t\n pushFollow(FOLLOW_2);\n ruleQualifiedName();\n\n state._fsp--;\n\n\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final void rule__FinModelFile__ImportsAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16804:1: ( ( ruleImport ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16805:1: ( ruleImport )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16805:1: ( ruleImport )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16806:1: ruleImport\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getFinModelFileAccess().getImportsImportParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_ruleImport_in_rule__FinModelFile__ImportsAssignment_133899);\r\n ruleImport();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getFinModelFileAccess().getImportsImportParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"private static boolean ModuleImport_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"ModuleImport_4_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, K_AT);\n r = r && ModuleImportPath(b, l + 1);\n r = r && ModuleImport_4_0_2(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"public final void rule__Compilation_initial__ImportdeclAssignment_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:15695:1: ( ( ruleImportDecl ) )\r\n // InternalGo.g:15696:2: ( ruleImportDecl )\r\n {\r\n // InternalGo.g:15696:2: ( ruleImportDecl )\r\n // InternalGo.g:15697:3: ruleImportDecl\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getCompilation_initialAccess().getImportdeclImportDeclParserRuleCall_1_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleImportDecl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getCompilation_initialAccess().getImportdeclImportDeclParserRuleCall_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public boolean isI_IsImported();",
"public TpImport(){\r\n\t\t\r\n\t}",
"public final void rule__Import__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:4074:1: ( ( 'import' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:4075:1: ( 'import' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:4075:1: ( 'import' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:4076:1: 'import'\n {\n before(grammarAccess.getImportAccess().getImportKeyword_0()); \n match(input,54,FOLLOW_54_in_rule__Import__Group__0__Impl8764); \n after(grammarAccess.getImportAccess().getImportKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final EObject ruleComplexTypeImport() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_2=null;\n Token lv_importURI_3_0=null;\n Token otherlv_4=null;\n Token lv_name_5_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalMappingDsl.g:5386:2: ( (otherlv_0= 'import' otherlv_1= 'datatypes' otherlv_2= 'from' ( (lv_importURI_3_0= RULE_STRING ) ) otherlv_4= 'as' ( (lv_name_5_0= RULE_ID ) ) ) )\n // InternalMappingDsl.g:5387:2: (otherlv_0= 'import' otherlv_1= 'datatypes' otherlv_2= 'from' ( (lv_importURI_3_0= RULE_STRING ) ) otherlv_4= 'as' ( (lv_name_5_0= RULE_ID ) ) )\n {\n // InternalMappingDsl.g:5387:2: (otherlv_0= 'import' otherlv_1= 'datatypes' otherlv_2= 'from' ( (lv_importURI_3_0= RULE_STRING ) ) otherlv_4= 'as' ( (lv_name_5_0= RULE_ID ) ) )\n // InternalMappingDsl.g:5388:3: otherlv_0= 'import' otherlv_1= 'datatypes' otherlv_2= 'from' ( (lv_importURI_3_0= RULE_STRING ) ) otherlv_4= 'as' ( (lv_name_5_0= RULE_ID ) )\n {\n otherlv_0=(Token)match(input,35,FOLLOW_102); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getComplexTypeImportAccess().getImportKeyword_0());\n \t\t\n otherlv_1=(Token)match(input,70,FOLLOW_46); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getComplexTypeImportAccess().getDatatypesKeyword_1());\n \t\t\n otherlv_2=(Token)match(input,36,FOLLOW_41); \n\n \t\t\tnewLeafNode(otherlv_2, grammarAccess.getComplexTypeImportAccess().getFromKeyword_2());\n \t\t\n // InternalMappingDsl.g:5400:3: ( (lv_importURI_3_0= RULE_STRING ) )\n // InternalMappingDsl.g:5401:4: (lv_importURI_3_0= RULE_STRING )\n {\n // InternalMappingDsl.g:5401:4: (lv_importURI_3_0= RULE_STRING )\n // InternalMappingDsl.g:5402:5: lv_importURI_3_0= RULE_STRING\n {\n lv_importURI_3_0=(Token)match(input,RULE_STRING,FOLLOW_47); \n\n \t\t\t\t\tnewLeafNode(lv_importURI_3_0, grammarAccess.getComplexTypeImportAccess().getImportURISTRINGTerminalRuleCall_3_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getComplexTypeImportRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"importURI\",\n \t\t\t\t\t\tlv_importURI_3_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.STRING\");\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_4=(Token)match(input,37,FOLLOW_7); \n\n \t\t\tnewLeafNode(otherlv_4, grammarAccess.getComplexTypeImportAccess().getAsKeyword_4());\n \t\t\n // InternalMappingDsl.g:5422:3: ( (lv_name_5_0= RULE_ID ) )\n // InternalMappingDsl.g:5423:4: (lv_name_5_0= RULE_ID )\n {\n // InternalMappingDsl.g:5423:4: (lv_name_5_0= RULE_ID )\n // InternalMappingDsl.g:5424:5: lv_name_5_0= RULE_ID\n {\n lv_name_5_0=(Token)match(input,RULE_ID,FOLLOW_2); \n\n \t\t\t\t\tnewLeafNode(lv_name_5_0, grammarAccess.getComplexTypeImportAccess().getNameIDTerminalRuleCall_5_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getComplexTypeImportRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_5_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.ID\");\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final void ruleImport() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:103:2: ( ( ( rule__Import__Group__0 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:104:1: ( ( rule__Import__Group__0 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:104:1: ( ( rule__Import__Group__0 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:105:1: ( rule__Import__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getImportAccess().getGroup()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:106:1: ( rule__Import__Group__0 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:106:2: rule__Import__Group__0\n {\n pushFollow(FOLLOW_rule__Import__Group__0_in_ruleImport160);\n rule__Import__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getImportAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"ImportConfig createImportConfig();",
"public final void entryRuleXImportDeclaration() throws RecognitionException {\r\n try {\r\n // InternalDroneScript.g:2320:1: ( ruleXImportDeclaration EOF )\r\n // InternalDroneScript.g:2321:1: ruleXImportDeclaration EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXImportDeclarationRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleXImportDeclaration();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXImportDeclarationRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }",
"boolean hasPlainImport();",
"public final PythonParser.import_as_names_return import_as_names() throws RecognitionException {\n PythonParser.import_as_names_return retval = new PythonParser.import_as_names_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token COMMA113=null;\n List list_n=null;\n PythonParser.import_as_name_return n = null;\n n = null;\n PythonTree COMMA113_tree=null;\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:798:5: (n+= import_as_name ( COMMA n+= import_as_name )* )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:798:7: n+= import_as_name ( COMMA n+= import_as_name )*\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_import_as_name_in_import_as_names3052);\n n=import_as_name();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, n.getTree());\n if (list_n==null) list_n=new ArrayList();\n list_n.add(n.getTree());\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:798:25: ( COMMA n+= import_as_name )*\n loop54:\n do {\n int alt54=2;\n int LA54_0 = input.LA(1);\n\n if ( (LA54_0==COMMA) ) {\n int LA54_2 = input.LA(2);\n\n if ( (LA54_2==NAME) ) {\n alt54=1;\n }\n\n\n }\n\n\n switch (alt54) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:798:26: COMMA n+= import_as_name\n \t {\n \t COMMA113=(Token)match(input,COMMA,FOLLOW_COMMA_in_import_as_names3055); if (state.failed) return retval;\n \t pushFollow(FOLLOW_import_as_name_in_import_as_names3060);\n \t n=import_as_name();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, n.getTree());\n \t if (list_n==null) list_n=new ArrayList();\n \t list_n.add(n.getTree());\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop54;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n\n retval.atypes = list_n;\n \n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"public TypeScriptWriter addDefaultImport(String name, String from) {\n imports.addDefaultImport(name, from);\n return this;\n }",
"public static String get_import(String s)\n {\n read_if_needed_();\n \n return (String) _map_imports.get(s);\n \n }"
] | [
"0.7297213",
"0.6927376",
"0.6869112",
"0.6869112",
"0.6726019",
"0.65833557",
"0.6527192",
"0.6387113",
"0.63391083",
"0.6320513",
"0.61759996",
"0.615494",
"0.6150417",
"0.6132946",
"0.6132816",
"0.6125451",
"0.61242175",
"0.6068295",
"0.6054266",
"0.6037715",
"0.60300815",
"0.6006647",
"0.60020643",
"0.5994148",
"0.599241",
"0.59811777",
"0.59572923",
"0.5931732",
"0.5924993",
"0.5888999",
"0.5884684",
"0.5877516",
"0.58523995",
"0.5848971",
"0.5845489",
"0.58383214",
"0.5834613",
"0.57686263",
"0.5737545",
"0.57360834",
"0.5704114",
"0.57015026",
"0.5696141",
"0.56953955",
"0.56847537",
"0.5652964",
"0.56512445",
"0.5640729",
"0.5628379",
"0.5627672",
"0.5617046",
"0.5607524",
"0.56052864",
"0.5571875",
"0.5570158",
"0.5568559",
"0.5543751",
"0.5534128",
"0.55108595",
"0.550119",
"0.5481575",
"0.5479934",
"0.5456146",
"0.54535747",
"0.54532474",
"0.5451916",
"0.5446124",
"0.54449743",
"0.5436539",
"0.54334277",
"0.5428898",
"0.5427999",
"0.54186857",
"0.5409602",
"0.54021424",
"0.5394786",
"0.5394394",
"0.53873837",
"0.53873837",
"0.53827536",
"0.53753185",
"0.53612316",
"0.5354341",
"0.53480494",
"0.5347241",
"0.5339417",
"0.533583",
"0.5328752",
"0.53259015",
"0.5306211",
"0.52983767",
"0.5296898",
"0.529679",
"0.52918434",
"0.52843183",
"0.5262294",
"0.52606004",
"0.5257735",
"0.5247355",
"0.5245553"
] | 0.7769017 | 0 |
[ modifiers ] ( classDeclaration | interfaceDeclaration ) | private void classOrInterfaceDeclaration(Modifier modifier, Scope scope, String basename)
{
for(int x; (x = classModifier()) != 0; modifier.add(x));
if (nextSymbol == Keyword.CLASSSY)
classDeclaration(modifier, scope, basename);
else if (nextSymbol == Keyword.INTERFACESY)
interfaceDeclaration(modifier, scope, basename);
else
{
error("Keyword " + Keyword.CLASSSY.string + " or " + Keyword.INTERFACESY.string + " expected, not " + nextToken.string);
lookAhead();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ClassDeclaring extends SymDeclaring {\n public ModsAttrs getMods();\n}",
"public interface IClass extends IVisible, IMetaDataListHolder, INamableNode, IAsDocHolder, ICommentHolder\n{\n /**\n * @return\n */\n List< IAttribute > getAttributes();\n\n /**\n * @return\n */\n double getAverageCyclomaticComplexity();\n\n /**\n * @return\n */\n IParserNode getBlock();\n\n /**\n * @return\n */\n List< IConstant > getConstants();\n\n /**\n * @return\n */\n IFunction getConstructor();\n\n /**\n * @return\n */\n String getExtensionName();\n\n /**\n * @return\n */\n List< IFunction > getFunctions();\n\n /**\n * @return\n */\n List< IParserNode > getImplementations();\n\n /**\n * @return\n */\n boolean isBindable();\n\n /**\n * @return\n */\n boolean isFinal();\n}",
"public final void classOrInterfaceDeclaration() throws RecognitionException {\n int classOrInterfaceDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"classOrInterfaceDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(198, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 5) ) { return ; }\n // Java.g:199:5: ( classOrInterfaceModifiers ( classDeclaration | interfaceDeclaration ) )\n dbg.enterAlt(1);\n\n // Java.g:199:9: classOrInterfaceModifiers ( classDeclaration | interfaceDeclaration )\n {\n dbg.location(199,9);\n pushFollow(FOLLOW_classOrInterfaceModifiers_in_classOrInterfaceDeclaration224);\n classOrInterfaceModifiers();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(199,35);\n // Java.g:199:35: ( classDeclaration | interfaceDeclaration )\n int alt12=2;\n try { dbg.enterSubRule(12);\n try { dbg.enterDecision(12);\n\n int LA12_0 = input.LA(1);\n\n if ( (LA12_0==ENUM||LA12_0==37) ) {\n alt12=1;\n }\n else if ( (LA12_0==46||LA12_0==73) ) {\n alt12=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 12, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(12);}\n\n switch (alt12) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:199:36: classDeclaration\n {\n dbg.location(199,36);\n pushFollow(FOLLOW_classDeclaration_in_classOrInterfaceDeclaration227);\n classDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:199:55: interfaceDeclaration\n {\n dbg.location(199,55);\n pushFollow(FOLLOW_interfaceDeclaration_in_classOrInterfaceDeclaration231);\n interfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(12);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 5, classOrInterfaceDeclaration_StartIndex); }\n }\n dbg.location(200, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"classOrInterfaceDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"private void interfaceBodyDeclaration(Modifier modify, ClassType object)\r\n {\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n lookAhead();\r\n return;\r\n }\r\n\r\n Modifier m = new Modifier(modify);\r\n m.cur = 0;\r\n\r\n for(int x; (x = modifier()) != 0; m.add(x));\r\n\r\n if ((m.cur & m.constructors) == 0)\r\n m.cur |= modify.cur & modify.constructors;\r\n\r\n if ((m.cur & Keyword.NATIVESY.value) != 0)\r\n Errors.warning(nextToken.source, nextToken.line, nextToken.col, \"native detected!\", false);\r\n\r\n interfaceMemberDecl(m, object);\r\n }",
"private void interfaceDeclaration(Modifier modify, Scope scope, String basename)\r\n {\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n x.modify = (x.modify & ~Keyword.CLASSSY.value) | Keyword.INTERFACESY.value;\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n matchKeyword(Keyword.INTERFACESY);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modify.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modify.check(modify.interfaces | modify.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n x.extend = new ClassType(\"Object\");//!!!!!!!!!!!!!!!!!!!\r\n x.scope = new Scope(scope, Scope.heap, x.name.string);\r\n\r\n if ((modify.cur & modify.constructors) == 0)\r\n modify.cur |= Keyword.PUBLICSY.value & modify.access;\r\n\r\n interfaceBody(modify, x);\r\n\r\n unresolved = dummy;\r\n writeList(x);\r\n }",
"private void interfaceMemberDecl(Modifier modify, ClassType object)\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 object.statics.add(op);\r\n resetComment();\r\n }\r\n\r\n if (nextSymbol == Keyword.VOIDSY)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = new MethodType(modify.cur);\r\n\r\n x.type = new Type();\r\n x.type.type = Keyword.VOIDSY;\r\n x.scope = new Scope(object.scope, Scope.automatic, \"\");\r\n\r\n lookAhead();\r\n if (nextSymbol == Keyword.INVERTSY)\r\n { // allow prefix ~ for destructor method\r\n lookAhead();\r\n nextToken.string = '~' + nextToken.string;\r\n }\r\n x.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n voidInterfaceMethodDeclaratorRest(x);\r\n insertThis(object, x);\r\n object.scope.declInsertOverload(x);\r\n }\r\n else if (nextSymbol == Keyword.CLASSSY)\r\n {\r\n modify.check(modify.classes | modify.access);\r\n Modifier m = new Modifier(modify);\r\n m.cur = modify.cur | Keyword.STATICSY.value;\r\n classDeclaration(m, object.scope, \"\");\r\n }\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n {\r\n modify.check(modify.interfaces | modify.access);\r\n interfaceDeclaration(modify, object.scope, \"\");\r\n }\r\n else\r\n interfaceMethodOrFieldDeclaration(modify, object);\r\n }",
"public interface Declarations {\n\n /**\n * Tests whether one type, method, or field declaration hides another.\n *\n * @param sub the first member\n * @param sup the second member\n * @return <tt>true</tt> if and only if the first member hides\n *\t\tthe second\n */\n boolean hides(MemberDeclaration sub, MemberDeclaration sup);\n\n /**\n * Tests whether one method overrides another. When a\n * non-abstract method overrides an abstract one, the\n * former is also said to <i>implement</i> the latter.\n *\n * @param sub the first method\n * @param sup the second method\n * @return <tt>true</tt> if and only if the first method overrides\n *\t\tthe second\n */\n boolean overrides(MethodDeclaration sub, MethodDeclaration sup);\n}",
"public void visit(ClassOrInterfaceDeclaration arg0, Object arg1) {\n\t \tclassName = arg0.getName();\n\t \tisInterface = arg0.toString().indexOf(\"interface\")!=-1;\n\t \tisAbstract = arg0.toString().indexOf(\"abstract\")!=-1;\n\t \tmyClasses.add(className);\n\t \tfor(Iterator<?> it = arg0.getImplements().iterator(); it.hasNext();)\n\t \t\tinheritance += className + \" ..|> \" + it.next() + \"\\n\";\n\t \tfor(Iterator<?> it = arg0.getExtends().iterator(); it.hasNext();)\n\t \t\tinheritance += className + \" ---|> \" +it.next() + \"\\n\";\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}",
"private void classDeclaration(Modifier modifier, Scope scope, String basename)\r\n {\r\n Vector queue = new Vector();\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n matchKeyword(Keyword.CLASSSY);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modifier.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modifier.check(modifier.classes | modifier.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) == 0)\r\n modifier.methods &= ~Keyword.ABSTRACTSY.value;\r\n else\r\n modifier.methods |= Keyword.ABSTRACTSY.value;\r\n\r\n x.modify |= modifier.cur;\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n Type t = type();\r\n x.extend = new ClassType(t.ident.string.substring(t.ident.string.lastIndexOf('.') + 1));\r\n }\r\n else if (((x.modify & Keyword.STATICSY.value) != 0 || (Scope)scopeStack.get(0) == scope) && x.name.string.compareTo(\"Object\") != 0)\r\n {\r\n x.extend = new ClassType(\"Object\");\r\n unresolved.add(x.extend.name.string);\r\n }\r\n else\r\n x.extend = new ClassType();\r\n\r\n if (nextSymbol == Keyword.IMPLEMENTSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) != 0 && (modifier.cur & modifier.constructors) == 0)\r\n modifier.cur |= Keyword.PUBLICSY.value ;\r\n\r\n modifier.cur &= modifier.constructors;\r\n\r\n classBody(x, new Modifier(), \"\", queue);\r\n\r\n Iterator iter = x.scope.iterator();\r\n\r\n while(iter.hasNext())\r\n {\r\n Basic b = (Basic)iter.next();\r\n\r\n if (b instanceof MethodType)\r\n if ((b.modify & Keyword.STATICSY.value) != 0)\r\n { // remove this from static method\r\n MethodType m = (MethodType)b;\r\n m.scope.remove(\"§this\");\r\n if (m.parameter.length > 0 && m.parameter[0].name.string.compareTo(\"§this\") == 0)\r\n {\r\n Parameter [] p = new Parameter[m.parameter.length - 1];\r\n\r\n for(int i = 0; i < p.length; i++)\r\n p[i] = m.parameter[i + 1];\r\n\r\n m.parameter = p;\r\n }\r\n }\r\n }\r\n\r\n // add queue to constructors\r\n addToConstructor(x, queue);\r\n unresolved = dummy;\r\n\r\n writeList(x);\r\n }",
"@Override\n\tpublic void inAInterfaceBody(AInterfaceBody node) {\n // Determine the start and end line numbers.\n int begin = findInterfaceBeginLine(node);\n int end = node.getRBrace().getLine();\n String cname = null;\n Node parentNode = node.parent();\n if (parentNode instanceof AInterfaceDeclaration) {\n // This handles normal class declarations, as well as\n // named inner class declaractions.\n AInterfaceDeclaration parent = (AInterfaceDeclaration) parentNode;\n TIdentifier name = parent.getIdentifier();\n cname = name.getText();\n\n }\n int braceLine = node.getLBrace().getLine();\n ClassDefinition cd = new ClassDefinition(cname, braceLine, begin, end);\n classLines.add(cd);\n }",
"@Override\n public void visit(ClassOrInterfaceDeclaration n, Object arg) {\n \tif(n.getJavaDoc()!=null){\n \t\tclassInfo.add(n.getName());\n\t \tString comment = n.getJavaDoc().getContent();\n\t \tcomment = comment.replaceAll(\"\\\\* @param (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @return (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @throws (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* \",\"\");\n\t \tcomment = comment.replaceAll(\"(?s)\\\\*(.*)\",\"\");\n\t \tclassInfo.add(comment.trim()); \n \t}\n \t}",
"public final void classOrInterfaceModifiers() throws RecognitionException {\n int classOrInterfaceModifiers_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"classOrInterfaceModifiers\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(202, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 6) ) { return ; }\n // Java.g:203:5: ( ( classOrInterfaceModifier )* )\n dbg.enterAlt(1);\n\n // Java.g:203:9: ( classOrInterfaceModifier )*\n {\n dbg.location(203,9);\n // Java.g:203:9: ( classOrInterfaceModifier )*\n try { dbg.enterSubRule(13);\n\n loop13:\n do {\n int alt13=2;\n try { dbg.enterDecision(13);\n\n int LA13_0 = input.LA(1);\n\n if ( (LA13_0==73) ) {\n int LA13_2 = input.LA(2);\n\n if ( (LA13_2==Identifier) ) {\n alt13=1;\n }\n\n\n }\n else if ( (LA13_0==28||(LA13_0>=31 && LA13_0<=36)) ) {\n alt13=1;\n }\n\n\n } finally {dbg.exitDecision(13);}\n\n switch (alt13) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: classOrInterfaceModifier\n \t {\n \t dbg.location(203,9);\n \t pushFollow(FOLLOW_classOrInterfaceModifier_in_classOrInterfaceModifiers255);\n \t classOrInterfaceModifier();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop13;\n }\n } while (true);\n } finally {dbg.exitSubRule(13);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 6, classOrInterfaceModifiers_StartIndex); }\n }\n dbg.location(204, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"classOrInterfaceModifiers\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public interface ClassBody extends Term\n{\n /**\n * List of the class's members.\n * @return A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n List<ClassMember> members();\n\n /**\n * Set the class's members.\n * @param members A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n ClassBody members(List<ClassMember> members);\n\n /**\n * Add a member to the class, returning a new node.\n */\n ClassBody addMember(ClassMember member);\n}",
"public final void classOrInterfaceModifier() throws RecognitionException {\n int classOrInterfaceModifier_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"classOrInterfaceModifier\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(206, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 7) ) { return ; }\n // Java.g:207:5: ( annotation | 'public' | 'protected' | 'private' | 'abstract' | 'static' | 'final' | 'strictfp' )\n int alt14=8;\n try { dbg.enterDecision(14);\n\n switch ( input.LA(1) ) {\n case 73:\n {\n alt14=1;\n }\n break;\n case 31:\n {\n alt14=2;\n }\n break;\n case 32:\n {\n alt14=3;\n }\n break;\n case 33:\n {\n alt14=4;\n }\n break;\n case 34:\n {\n alt14=5;\n }\n break;\n case 28:\n {\n alt14=6;\n }\n break;\n case 35:\n {\n alt14=7;\n }\n break;\n case 36:\n {\n alt14=8;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(14);}\n\n switch (alt14) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:207:9: annotation\n {\n dbg.location(207,9);\n pushFollow(FOLLOW_annotation_in_classOrInterfaceModifier275);\n annotation();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:208:9: 'public'\n {\n dbg.location(208,9);\n match(input,31,FOLLOW_31_in_classOrInterfaceModifier288); if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:209:9: 'protected'\n {\n dbg.location(209,9);\n match(input,32,FOLLOW_32_in_classOrInterfaceModifier303); if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:210:9: 'private'\n {\n dbg.location(210,9);\n match(input,33,FOLLOW_33_in_classOrInterfaceModifier315); if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:211:9: 'abstract'\n {\n dbg.location(211,9);\n match(input,34,FOLLOW_34_in_classOrInterfaceModifier329); if (state.failed) return ;\n\n }\n break;\n case 6 :\n dbg.enterAlt(6);\n\n // Java.g:212:9: 'static'\n {\n dbg.location(212,9);\n match(input,28,FOLLOW_28_in_classOrInterfaceModifier342); if (state.failed) return ;\n\n }\n break;\n case 7 :\n dbg.enterAlt(7);\n\n // Java.g:213:9: 'final'\n {\n dbg.location(213,9);\n match(input,35,FOLLOW_35_in_classOrInterfaceModifier357); if (state.failed) return ;\n\n }\n break;\n case 8 :\n dbg.enterAlt(8);\n\n // Java.g:214:9: 'strictfp'\n {\n dbg.location(214,9);\n match(input,36,FOLLOW_36_in_classOrInterfaceModifier373); if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 7, classOrInterfaceModifier_StartIndex); }\n }\n dbg.location(215, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"classOrInterfaceModifier\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public interface ClassNode\n{\n}",
"public interface KClass<T> extends KDeclarationContainer, KAnnotatedElement {\n}",
"public final void synpred152_Java_fragment() throws RecognitionException {\n // Java.g:602:9: ( classOrInterfaceDeclaration )\n dbg.enterAlt(1);\n\n // Java.g:602:9: classOrInterfaceDeclaration\n {\n dbg.location(602,9);\n pushFollow(FOLLOW_classOrInterfaceDeclaration_in_synpred152_Java3241);\n classOrInterfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }",
"public interface ClassAccessorElementTypes\n{\n\tIElementType RESERVED_MK_RO_ACCESSORS = new ClassAccessorSubElementType(\"MK_RO_ACCESSORS\");\n\tIElementType RESERVED_MK_WO_ACCESSORS = new ClassAccessorSubElementType(\"MK_WO_ACCESSORS\");\n\tIElementType RESERVED_MK_ACCESSORS = new ClassAccessorSubElementType(\"MK_ACCESSORS\");\n\tIElementType RESERVED_FOLLOW_BEST_PRACTICE = new ClassAccessorSubElementType(\"FOLLOW_BEST_PRACTICE\")\n\t{\n\t\t@NotNull\n\t\t@Override\n\t\tpublic ASTNode createLeafNode(CharSequence leafText)\n\t\t{\n\t\t\treturn new PerlClassAccessorFollowBestPracticeImpl(this, leafText);\n\t\t}\n\t};\n\n\tIElementType CLASS_ACCESSOR_DECLARATION = new ClassAccessorDeclarationStubElementType(\"CLASS_ACCESSOR_DECLARATION\");\n}",
"@Override\r\n\tpublic void visit(ClassDeclNode classDeclaration) {\n\t\tsuper.visit(classDeclaration);\r\n\t}",
"public interface IGosuStatementList extends IGosuStatement, PsiCodeBlock\n{\n}",
"private void classBodyDeclaration(ClassType object, Modifier modifier, Vector queue)\r\n {\r\n Modifier x = new Modifier(modifier);\r\n x.cur = 0;\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n lookAhead();\r\n return;\r\n }\r\n\r\n if (nextSymbol == Keyword.STATICSY)\r\n {\r\n x.add(modifier());\r\n queue = object.statics;\r\n }\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n Vector label = new Vector();\r\n //label.add(\"\" + Operation.newLabel());\r\n block(null, null, object.scope, label, Scope.MAIN, null, queue);\r\n }\r\n else\r\n {\r\n for(int y = modifier1(); y != 0; y = modifier())\r\n x.add(y);\r\n\r\n if ((x.cur & Keyword.NATIVESY.value) != 0)\r\n Errors.warning(nextToken.source, nextToken.line, nextToken.col, \"native detected!\", false);\r\n\r\n if ((x.cur & x.constructors) == 0)\r\n x.cur |= modifier.cur & modifier.constructors;\r\n\r\n if ((x.cur & Keyword.STATICSY.value) != 0)\r\n queue = object.statics;\r\n\r\n memberDecl(x, object, queue);\r\n }\r\n }",
"public List<Declaration> implicitMembers();",
"declaration getDeclaration();",
"public final void interfaceDeclaration() throws RecognitionException {\n int interfaceDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(265, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 19) ) { return ; }\n // Java.g:266:5: ( normalInterfaceDeclaration | annotationTypeDeclaration )\n int alt32=2;\n try { dbg.enterDecision(32);\n\n int LA32_0 = input.LA(1);\n\n if ( (LA32_0==46) ) {\n alt32=1;\n }\n else if ( (LA32_0==73) ) {\n alt32=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 32, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(32);}\n\n switch (alt32) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:266:9: normalInterfaceDeclaration\n {\n dbg.location(266,9);\n pushFollow(FOLLOW_normalInterfaceDeclaration_in_interfaceDeclaration756);\n normalInterfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:267:9: annotationTypeDeclaration\n {\n dbg.location(267,9);\n pushFollow(FOLLOW_annotationTypeDeclaration_in_interfaceDeclaration766);\n annotationTypeDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 19, interfaceDeclaration_StartIndex); }\n }\n dbg.location(268, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"private static boolean classModifiers_1_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"classModifiers_1_1_0\")) return false;\n boolean r;\n r = consumeToken(b, BASE);\n if (!r) r = consumeToken(b, INTERFACE);\n if (!r) r = consumeToken(b, FINAL);\n return r;\n }",
"public interface IContinueStatement extends ITerminalStatement\n{\n}",
"boolean isDeclaredInInterface() {\n return (declaringClass != null) && (declaringClass.isInterface());\n }",
"public void masterDeclaration();",
"public void visit(ClassDeclaration n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }",
"public void visit(InterfaceDeclaration n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }",
"public interface i {\n}",
"@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}",
"public interface ClassType extends Importable, ReferenceType, MemberInstance\n{\n public static class Kind extends Enum {\n public Kind(String name) {\n super(name);\n }\n }\n\n public static final Kind TOP_LEVEL = new Kind(\"top-level\");\n public static final Kind MEMBER = new Kind(\"member\");\n public static final Kind LOCAL = new Kind(\"local\");\n public static final Kind ANONYMOUS = new Kind(\"anonymous\");\n\n /** Get the class's kind. */\n Kind kind();\n\n /**\n * Return true if the class is top-level (i.e., not inner).\n * Equivalent to kind() == TOP_LEVEL.\n */\n boolean isTopLevel();\n\n /**\n * Return true if the class is an inner class.\n * Equivalent to kind() == MEMBER || kind() == LOCAL || kind() == ANONYMOUS.\n * @deprecated Was incorrectly defined. Use isNested for nested classes,\n * and isInnerClass for inner classes.\n */\n boolean isInner();\n\n /**\n * Return true if the class is a nested.\n * Equivalent to kind() == MEMBER || kind() == LOCAL || kind() == ANONYMOUS.\n */\n boolean isNested();\n\n /**\n * Return true if the class is an inner class, that is, it is a nested\n * class that is not explicitly or implicitly declared static; an interface\n * is never an inner class.\n */\n boolean isInnerClass();\n\n /**\n * Return true if the class is a member class.\n * Equivalent to kind() == MEMBER.\n */\n boolean isMember();\n\n /**\n * Return true if the class is a local class.\n * Equivalent to kind() == LOCAL.\n */\n boolean isLocal();\n\n /**\n * Return true if the class is an anonymous class.\n * Equivalent to kind() == ANONYMOUS.\n */\n boolean isAnonymous();\n\n /**\n * Return true if the class declaration occurs in a static context.\n * Is used to determine if a nested class is implicitly static.\n */\n boolean inStaticContext();\n\n /**\n * The class's constructors.\n * A list of <code>ConstructorInstance</code>.\n * @see polyglot.types.ConstructorInstance\n */\n List constructors();\n\n /**\n * The class's member classes.\n * A list of <code>ClassType</code>.\n * @see polyglot.types.ClassType\n */\n List memberClasses();\n\n /** Returns the member class with the given name, or null. */\n ClassType memberClassNamed(String name);\n\n /** Get a field by name, or null. */\n FieldInstance fieldNamed(String name);\n\n /** Return true if the class is strictly contained in <code>outer</code>. */\n boolean isEnclosed(ClassType outer);\n\n /**\n * Implementation of <code>isEnclosed</code>.\n * This method should only be called by the <code>TypeSystem</code>\n * or by a subclass.\n */\n boolean isEnclosedImpl(ClassType outer);\n\n /** Return true if an object of the class has\n * an enclosing instance of <code>encl</code>. */\n boolean hasEnclosingInstance(ClassType encl);\n\n /**\n * Implementation of <code>hasEnclosingInstance</code>.\n * This method should only be called by the <code>TypeSystem</code>\n * or by a subclass.\n */\n boolean hasEnclosingInstanceImpl(ClassType encl);\n\n /** The class's outer class if this is a nested class, or null. */\n ClassType outer();\n}",
"public interface PackageFragmentDescriptor extends ClassOrPackageFragmentDescriptor {\n @NotNull\n ModuleDescriptor getContainingDeclaration();\n\n @NotNull\n FqName getFqName();\n\n @NotNull\n MemberScope getMemberScope();\n}",
"InstrumentedType withModifiers(int modifiers);",
"public interface AnonymousClass0It {\n void A29(C04080Iy v, AbstractC27431Py v2);\n\n boolean A2R();\n\n boolean AAH();\n\n boolean AB6();\n}",
"public final void typeDeclaration() throws RecognitionException {\n int typeDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"typeDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(193, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 4) ) { return ; }\n // Java.g:194:5: ( classOrInterfaceDeclaration | ';' )\n int alt11=2;\n try { dbg.enterDecision(11);\n\n int LA11_0 = input.LA(1);\n\n if ( (LA11_0==ENUM||LA11_0==28||(LA11_0>=31 && LA11_0<=37)||LA11_0==46||LA11_0==73) ) {\n alt11=1;\n }\n else if ( (LA11_0==26) ) {\n alt11=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 11, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(11);}\n\n switch (alt11) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:194:9: classOrInterfaceDeclaration\n {\n dbg.location(194,9);\n pushFollow(FOLLOW_classOrInterfaceDeclaration_in_typeDeclaration191);\n classOrInterfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:195:9: ';'\n {\n dbg.location(195,9);\n match(input,26,FOLLOW_26_in_typeDeclaration201); if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 4, typeDeclaration_StartIndex); }\n }\n dbg.location(196, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"typeDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"@Override\n\tpublic void inAClassBody(AClassBody node) {\n // Determine the start and end line numbers.\n int begin = findBeginLine(node);\n int end = node.getRBrace().getLine();\n String cname = null;\n Node parentNode = node.parent();\n if (parentNode instanceof AClassDeclaration) {\n // This handles normal class declarations, as well as\n // named inner class declaractions.\n AClassDeclaration parent = (AClassDeclaration) parentNode;\n TIdentifier name = parent.getIdentifier();\n cname = name.getText();\n\n } else if (parentNode instanceof\n ASimpleClassInstanceCreationExpression\n || parentNode instanceof\n AQualifiedClassInstanceCreationExpression\n || parentNode instanceof\n AInnerclassClassInstanceCreationExpression) {\n // This handles an anonymous inner class declaration.\n // Use special value of 'new' for anonymous classes.\n cname = ANONYMOUS_CLASS_NAME;\n }\n int braceLine = node.getLBrace().getLine();\n ClassDefinition cd = new ClassDefinition(cname, braceLine, begin, end);\n classLines.add(cd);\n }",
"public interface MCDecoration {\n}",
"public interface c {\n}",
"@Override\n\tpublic Void visit(ClassDef classDef) {\n\t\tprintIndent(\"class\");\n\t\tindent++;\n\t\tclassDef.self_type.accept(this);\n\t\tclassDef.base_type.accept(this);\n\t\tfor (var v : classDef.body)\n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"public interface AdditionalOperations extends Statements {\n}",
"public interface a {\n }",
"public final void interfaceBodyDeclaration() throws RecognitionException {\n int interfaceBodyDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceBodyDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(322, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 31) ) { return ; }\n // Java.g:323:5: ( modifiers interfaceMemberDecl | ';' )\n int alt44=2;\n try { dbg.enterDecision(44);\n\n int LA44_0 = input.LA(1);\n\n if ( ((LA44_0>=Identifier && LA44_0<=ENUM)||LA44_0==28||(LA44_0>=31 && LA44_0<=37)||LA44_0==40||(LA44_0>=46 && LA44_0<=47)||(LA44_0>=52 && LA44_0<=63)||LA44_0==73) ) {\n alt44=1;\n }\n else if ( (LA44_0==26) ) {\n alt44=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 44, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(44);}\n\n switch (alt44) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:323:9: modifiers interfaceMemberDecl\n {\n dbg.location(323,9);\n pushFollow(FOLLOW_modifiers_in_interfaceBodyDeclaration1178);\n modifiers();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(323,19);\n pushFollow(FOLLOW_interfaceMemberDecl_in_interfaceBodyDeclaration1180);\n interfaceMemberDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:324:9: ';'\n {\n dbg.location(324,9);\n match(input,26,FOLLOW_26_in_interfaceBodyDeclaration1190); if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 31, interfaceBodyDeclaration_StartIndex); }\n }\n dbg.location(325, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceBodyDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public interface bj\n extends bl\n{\n\n public abstract void a(a a1);\n\n public abstract void b(a a1);\n\n public abstract Ad c();\n\n public abstract String d();\n\n public abstract a e();\n\n public abstract b f();\n\n // Unreferenced inner class com/vungle/publisher/bj$a\n /* block-local class not found */\n class a {}\n\n\n // Unreferenced inner class com/vungle/publisher/bj$b\n /* block-local class not found */\n class b {}\n\n}",
"public interface class_25 {\r\n\r\n // $FF: renamed from: b (int, int) boolean\r\n boolean method_103(int var1, int var2);\r\n\r\n // $FF: renamed from: c (int, int) gI\r\n class_1069 method_104(int var1, int var2);\r\n\r\n // $FF: renamed from: d (int, int) gI\r\n class_1069 method_105(int var1, int var2);\r\n\r\n // $FF: renamed from: b (gG, int, int) void\r\n void method_106(class_25 var1, int var2, int var3);\r\n\r\n // $FF: renamed from: b (boolean, vu) boolean\r\n boolean method_107(boolean var1, class_81 var2);\r\n\r\n // $FF: renamed from: a () boolean\r\n boolean method_108();\r\n\r\n // $FF: renamed from: b () boolean\r\n boolean method_109();\r\n\r\n // $FF: renamed from: c () java.lang.String\r\n String method_110();\r\n\r\n // $FF: renamed from: b (as, int, int, int) java.util.List\r\n List method_111(class_922 var1, int var2, int var3, int var4);\r\n\r\n // $FF: renamed from: b (ahb, java.lang.String, int, int, int) dd\r\n class_1034 method_112(ahb var1, String var2, int var3, int var4, int var5);\r\n\r\n // $FF: renamed from: d () int\r\n int method_113();\r\n\r\n // $FF: renamed from: f (int, int) void\r\n void method_114(int var1, int var2);\r\n\r\n // $FF: renamed from: e () void\r\n void method_115();\r\n}",
"public ClassInfo declaringClass();",
"public interface AnonymousClass05L {\n}",
"public void handleDeclaration(HtmlObjects.Declaration t)\n {\n }",
"public interface C13719g {\n}",
"public interface AllClass extends AllClassAndEnum\r\n{\r\n}",
"interface A3 extends A1, A2{\r\n\t\r\n}",
"public interface Compound extends Clause {}",
"public interface C46409a {\n}",
"public interface C0389gj extends C0388gi {\n}",
"public interface InitializerDef extends CodeDef, MemberDef\n{\n InitializerInstance asInstance();\n}",
"public interface Program extends AstItem {\n}",
"public interface C0385a {\n }",
"public List<Declaration> getIntroducedMembers();",
"public interface Igual extends ComplexInstruction\n{\n}",
"public final void compilationUnit() throws RecognitionException {\n int compilationUnit_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"compilationUnit\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(177, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 1) ) { return ; }\n // Java.g:178:5: ( annotations ( packageDeclaration ( importDeclaration )* ( typeDeclaration )* | classOrInterfaceDeclaration ( typeDeclaration )* ) | ( packageDeclaration )? ( importDeclaration )* ( typeDeclaration )* )\n int alt8=2;\n try { dbg.enterDecision(8);\n\n try {\n isCyclicDecision = true;\n alt8 = dfa8.predict(input);\n }\n catch (NoViableAltException nvae) {\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(8);}\n\n switch (alt8) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:178:9: annotations ( packageDeclaration ( importDeclaration )* ( typeDeclaration )* | classOrInterfaceDeclaration ( typeDeclaration )* )\n {\n dbg.location(178,9);\n pushFollow(FOLLOW_annotations_in_compilationUnit44);\n annotations();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(179,9);\n // Java.g:179:9: ( packageDeclaration ( importDeclaration )* ( typeDeclaration )* | classOrInterfaceDeclaration ( typeDeclaration )* )\n int alt4=2;\n try { dbg.enterSubRule(4);\n try { dbg.enterDecision(4);\n\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0==25) ) {\n alt4=1;\n }\n else if ( (LA4_0==ENUM||LA4_0==28||(LA4_0>=31 && LA4_0<=37)||LA4_0==46||LA4_0==73) ) {\n alt4=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(4);}\n\n switch (alt4) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:179:13: packageDeclaration ( importDeclaration )* ( typeDeclaration )*\n {\n dbg.location(179,13);\n pushFollow(FOLLOW_packageDeclaration_in_compilationUnit58);\n packageDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(179,32);\n // Java.g:179:32: ( importDeclaration )*\n try { dbg.enterSubRule(1);\n\n loop1:\n do {\n int alt1=2;\n try { dbg.enterDecision(1);\n\n int LA1_0 = input.LA(1);\n\n if ( (LA1_0==27) ) {\n alt1=1;\n }\n\n\n } finally {dbg.exitDecision(1);}\n\n switch (alt1) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: importDeclaration\n \t {\n \t dbg.location(179,32);\n \t pushFollow(FOLLOW_importDeclaration_in_compilationUnit60);\n \t importDeclaration();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n } finally {dbg.exitSubRule(1);}\n\n dbg.location(179,51);\n // Java.g:179:51: ( typeDeclaration )*\n try { dbg.enterSubRule(2);\n\n loop2:\n do {\n int alt2=2;\n try { dbg.enterDecision(2);\n\n int LA2_0 = input.LA(1);\n\n if ( (LA2_0==ENUM||LA2_0==26||LA2_0==28||(LA2_0>=31 && LA2_0<=37)||LA2_0==46||LA2_0==73) ) {\n alt2=1;\n }\n\n\n } finally {dbg.exitDecision(2);}\n\n switch (alt2) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: typeDeclaration\n \t {\n \t dbg.location(179,51);\n \t pushFollow(FOLLOW_typeDeclaration_in_compilationUnit63);\n \t typeDeclaration();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop2;\n }\n } while (true);\n } finally {dbg.exitSubRule(2);}\n\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:180:13: classOrInterfaceDeclaration ( typeDeclaration )*\n {\n dbg.location(180,13);\n pushFollow(FOLLOW_classOrInterfaceDeclaration_in_compilationUnit78);\n classOrInterfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(180,41);\n // Java.g:180:41: ( typeDeclaration )*\n try { dbg.enterSubRule(3);\n\n loop3:\n do {\n int alt3=2;\n try { dbg.enterDecision(3);\n\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==ENUM||LA3_0==26||LA3_0==28||(LA3_0>=31 && LA3_0<=37)||LA3_0==46||LA3_0==73) ) {\n alt3=1;\n }\n\n\n } finally {dbg.exitDecision(3);}\n\n switch (alt3) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: typeDeclaration\n \t {\n \t dbg.location(180,41);\n \t pushFollow(FOLLOW_typeDeclaration_in_compilationUnit80);\n \t typeDeclaration();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n } finally {dbg.exitSubRule(3);}\n\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(4);}\n\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:182:9: ( packageDeclaration )? ( importDeclaration )* ( typeDeclaration )*\n {\n dbg.location(182,9);\n // Java.g:182:9: ( packageDeclaration )?\n int alt5=2;\n try { dbg.enterSubRule(5);\n try { dbg.enterDecision(5);\n\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0==25) ) {\n alt5=1;\n }\n } finally {dbg.exitDecision(5);}\n\n switch (alt5) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: packageDeclaration\n {\n dbg.location(182,9);\n pushFollow(FOLLOW_packageDeclaration_in_compilationUnit101);\n packageDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(5);}\n\n dbg.location(182,29);\n // Java.g:182:29: ( importDeclaration )*\n try { dbg.enterSubRule(6);\n\n loop6:\n do {\n int alt6=2;\n try { dbg.enterDecision(6);\n\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0==27) ) {\n alt6=1;\n }\n\n\n } finally {dbg.exitDecision(6);}\n\n switch (alt6) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: importDeclaration\n \t {\n \t dbg.location(182,29);\n \t pushFollow(FOLLOW_importDeclaration_in_compilationUnit104);\n \t importDeclaration();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop6;\n }\n } while (true);\n } finally {dbg.exitSubRule(6);}\n\n dbg.location(182,48);\n // Java.g:182:48: ( typeDeclaration )*\n try { dbg.enterSubRule(7);\n\n loop7:\n do {\n int alt7=2;\n try { dbg.enterDecision(7);\n\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0==ENUM||LA7_0==26||LA7_0==28||(LA7_0>=31 && LA7_0<=37)||LA7_0==46||LA7_0==73) ) {\n alt7=1;\n }\n\n\n } finally {dbg.exitDecision(7);}\n\n switch (alt7) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: typeDeclaration\n \t {\n \t dbg.location(182,48);\n \t pushFollow(FOLLOW_typeDeclaration_in_compilationUnit107);\n \t typeDeclaration();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop7;\n }\n } while (true);\n } finally {dbg.exitSubRule(7);}\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 1, compilationUnit_StartIndex); }\n }\n dbg.location(183, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"compilationUnit\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}",
"public interface C21597a {\n }",
"interface I {}",
"public interface AnonymousClass0RF {\n}",
"@Override\n public void visitClass(@NotNull PsiClass aClass) {\n }",
"public interface AnonymousClass4O {\n}",
"interface C2578d {\n}",
"@Override\n public ClassTree declaration() {\n return null;\n }",
"public interface AstWhileStatement extends AstStatement {\r\n\tpublic AstKeyword get_while();\r\n\r\n\tpublic AstPunctuator get_lparanth();\r\n\r\n\tpublic AstExpression get_condition();\r\n\r\n\tpublic AstPunctuator get_rparanth();\r\n\r\n\tpublic AstStatement get_body();\r\n}",
"public interface Handler extends Action, Syntax {\n\n}",
"interface NewInterface extends Interface1,Interface2,Interface3{\n\n\tpublic void getD();\n\n}",
"public interface AnonymousClass0Y6 {\n void A3h();\n\n void A41();\n}",
"public void visit(ClassBodyDeclaration n) {\n n.f0.accept(this);\n }",
"private List<JCTree> makeInterfaceOuterAccessorMembers(JFXClassDeclaration cdecl) {\n ListBuffer<JCTree> members = ListBuffer.lb();\n if (cdecl.sym != null && toJava.hasOuters.contains(cdecl.sym)) {\n Symbol typeOwner = cdecl.sym.owner;\n while (typeOwner != null && typeOwner.kind != Kinds.TYP) {\n typeOwner = typeOwner.owner;\n }\n \n if (typeOwner != null) {\n ClassSymbol returnSym = typeMorpher.reader.enterClass(names.fromString(typeOwner.type.toString() + interfaceSuffix));\n JCMethodDecl accessorMethod = make.MethodDef(make.Modifiers(Flags.PUBLIC), outerAccessorName, make.Ident(returnSym), List.<JCTypeParameter>nil(), List.<JCVariableDecl>nil(),\n List.<JCExpression>nil(), null, null);\n \n accessorMethod.type = new MethodType(List.<Type>nil(), returnSym.type, List.<Type>nil(), returnSym);\n accessorMethod.sym = new MethodSymbol(Flags.PUBLIC, outerAccessorName, returnSym.type, returnSym);\n \n members.append(accessorMethod);\n }\n }\n return members.toList();\n }",
"public interface C11910c {\n}",
"interface I4 {\n public default void m1() { // <- Modifier 'public' is redundant for interface methods\n System.out.println(\"I4.m1()\");\n } // public is redundant\n\n /**\n * it is public, but NOT abstract (error: Illegal combination of modifiers: 'abstract' and 'default')\n */\n default void m2() {\n System.out.println(\"I4.m2()\");\n }\n}",
"public interface AnonymousClass1MS {\n void AHV();\n\n void AHo();\n}",
"public interface i {\n int a();\n\n boolean b();\n\n void c();\n}",
"public interface C22379d {\n}",
"public interface g {\n\n /* compiled from: AccessibilityViewCommand */\n public static abstract class a {\n\n /* renamed from: a reason: collision with root package name */\n private static final Bundle f2690a = new Bundle();\n\n /* renamed from: b reason: collision with root package name */\n Bundle f2691b;\n\n public void a(Bundle bundle) {\n this.f2691b = bundle;\n }\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class b extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class c extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class d extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class e extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class f extends a {\n }\n\n /* renamed from: b.g.i.a.g$g reason: collision with other inner class name */\n /* compiled from: AccessibilityViewCommand */\n public static final class C0028g extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class h extends a {\n }\n\n boolean a(View view, a aVar);\n}",
"public interface StandaloneObject {\n // marker\n}",
"public interface C32115a {\n}",
"public interface C0938b {\n }",
"public interface C0136c {\n }",
"@Override\n\tpublic String visitClassDeclaration(ClassDeclarationContext ctx){\n\t\ttable.enterScope();\t\t\n\t\tvisit(ctx.getChild(4)); //visit methodList. \n\t\ttable.exitScope();\n\t\treturn null;\n\t}",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"public interface C22383h {\n}",
"public interface Classifier extends NamedDisplayElement {\n}",
"public interface SystemType3 extends HVACSystem{\n //Marker Interface\n}",
"private List<JCTree> makeClassOuterAccessorMembers(JFXClassDeclaration cdecl) {\n ListBuffer<JCTree> members = ListBuffer.lb();\n if (cdecl.sym != null && toJava.hasOuters.contains(cdecl.sym)) {\n Symbol typeOwner = cdecl.sym.owner;\n while (typeOwner != null && typeOwner.kind != Kinds.TYP) {\n typeOwner = typeOwner.owner;\n }\n \n if (typeOwner != null) {\n // If FINAL class, it is an anonymous class. There is no interface for it and we need to have the type of the\n // type, not it's interface.\n ClassSymbol returnSym = (typeOwner.flags_field & Flags.FINAL) != 0 ? (ClassSymbol)typeOwner.type.tsym :\n typeMorpher.reader.enterClass(names.fromString(typeOwner.type.toString() + interfaceSuffix));\n // Create the field to store the outer instance reference\n JCVariableDecl accessorField = make.VarDef(make.Modifiers(Flags.PUBLIC), outerAccessorFieldName, make.Ident(returnSym), null);\n VarSymbol vs = new VarSymbol(Flags.PUBLIC, outerAccessorFieldName, returnSym.type, cdecl.sym);\n accessorField.type = returnSym.type;\n accessorField.sym = vs;\n \n // Create the interface method with it's type(s) and symbol(s)\n ListBuffer<JCStatement> mStats = new ListBuffer<JCStatement>();\n JCIdent retIdent = make.Ident(vs);\n JCReturn retRet = make.Return(retIdent);\n retRet.type = vs.type;\n mStats.append(retRet);\n \n JCMethodDecl accessorMethod = make.MethodDef(make.Modifiers(Flags.PUBLIC), outerAccessorName, make.Ident(returnSym), List.<JCTypeParameter>nil(), List.<JCVariableDecl>nil(),\n List.<JCExpression>nil(), make.Block(0L, mStats.toList()), null);\n \n accessorMethod.type = new MethodType(List.<Type>nil(), returnSym.type, List.<Type>nil(), returnSym);\n accessorMethod.sym = new MethodSymbol(Flags.PUBLIC, outerAccessorName, returnSym.type, returnSym);\n members.append(accessorMethod);\n members.append(accessorField);\n \n // Now add the constructor taking the outer instance reference\n JCVariableDecl accessorParam = make.VarDef(make.Modifiers(0L), outerAccessorFieldName, make.Ident(returnSym), null);\n VarSymbol vs1 = new VarSymbol(0L, outerAccessorFieldName, returnSym.type, cdecl.sym);\n accessorParam.type = returnSym.type;\n accessorParam.sym = vs1;\n \n ListBuffer<JCStatement> cStats = new ListBuffer<JCStatement>();\n JCIdent cSelected = make.Ident(names._this);\n cSelected.type = returnSym.type;\n cSelected.sym = returnSym;\n \n JCFieldAccess cSelect = make.Select(cSelected, outerAccessorFieldName);\n cSelect.sym = accessorField.sym;\n cSelect.type = accessorField.type;\n \n JCIdent paramIdent = make.Ident(outerAccessorFieldName);\n paramIdent.type = accessorParam.type;\n paramIdent.sym = accessorParam.sym;\n \n JCAssign assignStat = make.Assign(cSelect, paramIdent);\n assignStat.type = returnSym.type;\n \n JCStatement assignWrapper = make.Exec(assignStat);\n assignWrapper.type = assignStat.type;\n \n cStats.append(assignWrapper);\n \n JCMethodDecl ctor = make.MethodDef(make.Modifiers(Flags.PUBLIC), names.init, make.TypeIdent(TypeTags.VOID), List.<JCTypeParameter>nil(), List.<JCVariableDecl>of(accessorParam),\n List.<JCExpression>nil(), make.Block(0L, cStats.toList()), null);\n \n accessorMethod.type = new MethodType(List.<Type>of(accessorParam.type), returnSym.type, List.<Type>nil(), returnSym);\n accessorMethod.sym = new MethodSymbol(Flags.PUBLIC, outerAccessorName, returnSym.type, returnSym);\n members.append(ctor);\n }\n }\n return members.toList();\n }",
"public interface AnInterface {\n void f();\n\n void g();\n\n void h();\n}",
"public interface IDynamicSymbol extends IFunctionSymbol\n{\n IScriptPartId getScriptPart();\n IGosuClass getGosuClass();\n}",
"AttributeDeclarations createAttributeDeclarations();",
"public interface IInstanceVariable extends INameNode {\n}",
"@Override\n\tpublic void notationDeclaration() {\n\t\t\n\t}",
"public interface a extends IInterface {\n}",
"public void testInClassDeclaringType2() throws Exception {\n String contents = \n \"class Baz {\\n\" +\n \" def method = {\\n\" +\n \" other\\n\" +\n \" }\\n\" +\n \"}\";\n int start = contents.lastIndexOf(\"other\");\n int end = start + \"other\".length();\n assertDeclaringType(contents, start, end, \"Baz\", false, true);\n }",
"public interface PHPDocTagKinds {\n\n public static final int ABSTRACT = 0;\n\n public static final int AUTHOR = 1;\n\n public static final int DEPRECATED = 2;\n\n public static final int FINAL = 3;\n\n public static final int GLOBAL = 4;\n\n public static final int NAME = 5;\n\n public static final int RETURN = 6;\n\n public static final int PARAM = 7;\n\n public static final int SEE = 8;\n\n public static final int STATIC = 9;\n\n public static final int STATICVAR = 10;\n\n public static final int TODO = 11;\n\n public static final int VAR = 12;\n\n public static final int PACKAGE = 13;\n\n public static final int ACCESS = 14;\n\n public static final int CATEGORY = 15;\n\n public static final int COPYRIGHT = 16;\n\n public static final int DESC = 17;\n\n public static final int EXAMPLE = 18;\n\n public static final int FILESOURCE = 19;\n\n public static final int IGNORE = 20;\n\n public static final int INTERNAL = 21;\n\n public static final int LICENSE = 22;\n\n public static final int LINK = 23;\n\n public static final int SINCE = 24;\n\n public static final int SUBPACKAGE = 25;\n\n public static final int TUTORIAL = 26;\n\n public static final int USES = 27;\n\n public static final int VERSION = 28;\n\n public static final int THROWS = 29;\n\n public static final int PROPERTY = 30;\n\n public static final int PROPERTY_READ = 31;\n\n public static final int PROPERTY_WRITE = 32;\n\n public static final int METHOD = 33;\n\n}",
"public interface StructureDefinition {\n}"
] | [
"0.73354304",
"0.6807213",
"0.6725895",
"0.6576674",
"0.6572468",
"0.64241594",
"0.6405288",
"0.6379699",
"0.63604915",
"0.6260103",
"0.61969733",
"0.6107958",
"0.608032",
"0.6071477",
"0.59817153",
"0.59410524",
"0.59347016",
"0.591614",
"0.5879841",
"0.5869939",
"0.5747583",
"0.5740653",
"0.5721954",
"0.56962776",
"0.5685925",
"0.5668868",
"0.5653021",
"0.5630806",
"0.5583036",
"0.55693495",
"0.55693024",
"0.556076",
"0.5549307",
"0.5547518",
"0.5541017",
"0.549285",
"0.5471745",
"0.54623026",
"0.54344076",
"0.53977835",
"0.5389912",
"0.5377269",
"0.53763324",
"0.5362615",
"0.5333588",
"0.5332316",
"0.5327765",
"0.5324866",
"0.5321044",
"0.5321012",
"0.5320807",
"0.53181636",
"0.53161556",
"0.53044844",
"0.5301698",
"0.5296588",
"0.5292447",
"0.5289723",
"0.52672964",
"0.52636784",
"0.52634037",
"0.525183",
"0.52319276",
"0.5224456",
"0.52231103",
"0.52112454",
"0.520938",
"0.5206892",
"0.5199022",
"0.5192019",
"0.51805156",
"0.5177684",
"0.5163921",
"0.51575094",
"0.5149343",
"0.5147286",
"0.51417136",
"0.5140274",
"0.51384574",
"0.51362777",
"0.5129989",
"0.51198673",
"0.5114438",
"0.5114012",
"0.5099835",
"0.509182",
"0.50879264",
"0.5079808",
"0.5077564",
"0.5073047",
"0.5071348",
"0.50684017",
"0.5067511",
"0.50645477",
"0.5062791",
"0.50603974",
"0.5058831",
"0.50551784",
"0.5054353",
"0.50528747"
] | 0.7595943 | 0 |
( basicType | qualident ) bracketsOpt | private Type type()
{
Type t = new Type();
t.ident = nextToken;
t.type = basicType();
if (t.type == Keyword.NONESY)
{
unresolved.add(t.ident.string = qualident());
}
else
t.ident.string = null;
t.dim = bracketsOpt();
return t;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Keyword basicType()\r\n {\r\n Keyword x = Keyword.NONESY;\r\n\r\n if (typeKW.contains(nextSymbol))\r\n {\r\n x = nextSymbol;\r\n lookAhead();\r\n }\r\n\r\n return x;\r\n }",
"@Override\r\n public DSCP opBrackets() {\r\n /*put codegen here.*/\r\n return elementType.pushStack();\r\n }",
"void type() throws IOException {\n\t\tmatch(Tag.BASIC);\n\t\tif (look.tag != '[')\n\t\t\treturn; // Type -> basic\t\t\t\t\t// dims -> epsilon\n\t\telse\n\t\t\tdims(); // parse array type\n\t}",
"public String getBracket()\r\n\t{\r\n\t\treturn _bracket;\r\n\t}",
"Syntax getSyntax();",
"public interface Compound extends Clause {}",
"public void setBracket(String val)\r\n\t{\r\n\t\t_bracket = val;\r\n\t}",
"public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }",
"private void processBracket() {\r\n\t\tif (expression[currentIndex] == '(') {\r\n\t\t\ttoken = new Token(TokenType.OPEN_BRACKET, expression[currentIndex]);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.CLOSED_BRACKET, expression[currentIndex]);\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}",
"private void tagBracketPrinter(String tag, int printType, String... token) {\n String temp = Arrays.toString(token).substring(1, Arrays.toString(token).length() - 1);\n tabPrinter();\n if (printType == 0) {\n writer.println(\"<\" + tag + \">\");\n tabs++;\n } else if (printType == 1) {\n tabs--;\n writer.println(\"</\" + tag + \">\");\n } else if (printType == 2)\n\n writer.println(\"<\" + tag + \"> \" + temp + \" </\" + tag + \">\");\n\n }",
"@Override\r\n\tpublic void visit(RoundBracketExpression roundBracketExpression) {\n\r\n\t}",
"@NotNull\n String getSyntax();",
"@Override\n\tpublic Object visit(ASTPCGenBracket node, Object data)\n\t{\n\t\t//Should be stripped by the function\n\t\tFormulaSemantics semantics = (FormulaSemantics) data;\n\t\tFormulaSemanticsUtilities.setInvalid(semantics,\n\t\t\t\"Parse Error: Invalid Class: \" + node.getClass().getName()\n\t\t\t\t+ \" found in operable location (class cannot be evaluated)\");\n\t\treturn semantics;\n\t}",
"public boolean parseBracket(String s) {\n return false;\n }",
"private Operation identifierSuffix(Operation root, Operation next, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.LBRACKETSY)\r\n {\r\n lookAhead();\r\n lookAhead();\r\n unresolved.add(\"JavaArray\");\r\n\r\n bracketsOpt();\r\n\r\n matchKeyword(Keyword.DOTSY);\r\n\r\n matchKeyword(Keyword.CLASSSY);\r\n\r\n next.left.operator = Keyword.CLASSSY;\r\n }\r\n else if (nextSymbol == Keyword.DOTSY)\r\n {\r\n lookAhead();\r\n\r\n if (nextSymbol == Keyword.CLASSSY)\r\n {\r\n lookAhead();\r\n next.left.operator = Keyword.CLASSSY;\r\n }\r\n else\r\n {\r\n next = (next.right = new Operation());\r\n next.left = new Operation();\r\n next.left.operator = nextSymbol;\r\n matchKeyword(Keyword.THISSY);\r\n }\r\n }\r\n else\r\n {\r\n next.left.left = argumentsOpt(scope, null, queue);\r\n }\r\n\r\n return root;\r\n }",
"public Bracket getBracket() {\n return b;\n }",
"private boolean isBracketAhead() {\r\n\t\treturn expression[currentIndex] == '(' || expression[currentIndex] == ')';\r\n\t}",
"public VariType visit(BracketExpression n, Table argu) {\n\t VariType _ret=null;\n\t n.f0.accept(this, argu);\n\t _ret = n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t return _ret;\n\t }",
"public MType visit(BracketExpression n, MType argu) {\n \tMType _ret = n.f1.accept(this, argu);\n \treturn _ret;\n }",
"Exp getQualifierExp();",
"public ASTNode visitBracket(BracketContext ctx) {\n return visit(ctx.expr());\n }",
"public static void main(String[] args) {\n\t\tString s = \"((({}{}[])))\";\n\t\tValidBrackets vb = new ValidBrackets();\n\t\tSystem.out.println(vb.isValid(s));\n\t\t\n\t}",
"@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 final void mRBRACKET() throws RecognitionException {\n try {\n int _type = RBRACKET;\n // /Users/benjamincoe/HackWars/C.g:201:12: ( ']' )\n // /Users/benjamincoe/HackWars/C.g:201:14: ']'\n {\n match(']'); \n\n }\n\n this.type = _type;\n }\n finally {\n }\n }",
"@Override\n public R visit(BrackettedExpression n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.expression.accept(this, argu);\n n.nodeToken1.accept(this, argu);\n return _ret;\n }",
"SquareType ( char symbol ) {\n this.symbol = symbol;\n }",
"public Syntax getSyntax() {\n\t\treturn SyntaxJ.reporterSyntax(\n\t\t\t\tnew int[] { Syntax.ListType(), Syntax.WildcardType() },\n\t\t\t\tSyntax.WildcardType());\n\t}",
"@Override\n\tpublic void notationDeclaration() {\n\t\t\n\t}",
"public interface qy extends rh {\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n int a(@NonNull ra raVar, boolean z);\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void a(float f, int i, int i2);\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void a(@NonNull qz qzVar, int i, int i2);\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void a(@NonNull ra raVar, int i, int i2);\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void a(boolean z, float f, int i, int i2, int i3);\n\n boolean a();\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void b(@NonNull ra raVar, int i, int i2);\n\n @NonNull\n SpinnerStyle getSpinnerStyle();\n\n @NonNull\n View getView();\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void setPrimaryColors(@ColorInt int... iArr);\n}",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();",
"public Arginfo visit(BracketExpression n, Arginfo argu) {\n Arginfo _ret=null;\n n.f0.accept(this, argu);\n Arginfo temp = n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n \n //System.err.println(argu.classname+\" \"+argu.methodname+\" \");\n if(temp==null){\n \t //System.err.println(\"noo\");\n }\n \n return temp;\n }",
"private boolean syntaxOkay(String in){\n\t\tint numOpenBraces = 0;\n\t\tint numCloseBraces = 0;\n\t\tint countQuote = 0;\n\t\tfor(int i = 0; i < in.length(); i++){\n\t\t\tchar currentChar = in.charAt(i);\n\t\t\tif(currentChar == '{'){\n\t\t\t\tint open = i;\n\t\t\t\tnumOpenBraces++;\n\t\t\t}else if(currentChar == '}'){\n\t\t\t\tint close = i;\n\t\t\t\tnumCloseBraces++;\n\t\t\t}else if(currentChar == '\"'){\n\t\t\t\tcountQuote++;\n\t\t\t}\n\t\t}\n\t\treturn numOpenBraces == numCloseBraces && countQuote % 2 == 0;\n\t}",
"public T caseBracketExpCS(BracketExpCS object) {\r\n return null;\r\n }",
"public org.emftext.language.textAML3.resource.textAML3.ui.ITextAML3BracketHandler getBracketHandler();",
"public void array() throws SyntaxException{\n if(cursor.getType().equals(TokenType.RIGHT_BRACKET))\n return;\n else\n {\n elements();\n match(TokenType.RIGHT_BRACKET);\n }\n }",
"private boolean parseOpeningBracket() {\n if (index < end && source.charAt(index) == '[') {\n index++;\n return true;\n }\n return false;\n }",
"public final void mRBRACKET() throws RecognitionException {\n try {\n int _type = RBRACKET;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2715:3: ( ']' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2716:3: ']'\n {\n match(']'); if (state.failed) return ;\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"GeneralClause createGeneralClause();",
"public final void mRSQ_BRACKET() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = RSQ_BRACKET;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:418:12: ( ']' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:418:16: ']'\n\t\t\t{\n\t\t\tmatch(']'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public String visit(BracketExpression n, Object argu) \n\t{\n\t\tString _ret=null;\n\t _ret = n.f1.accept(this, argu);\n\t return _ret;\n\t}",
"public final void rule__LiteralType__Group_2__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:14867:1: ( ( ']' ) )\r\n // InternalGo.g:14868:1: ( ']' )\r\n {\r\n // InternalGo.g:14868:1: ( ']' )\r\n // InternalGo.g:14869:2: ']'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getLiteralTypeAccess().getRightSquareBracketKeyword_2_2()); \r\n }\r\n match(input,55,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getLiteralTypeAccess().getRightSquareBracketKeyword_2_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"static boolean validBrackets(String s){\n ArrayList<Character> arr = new ArrayList<Character>();\n for(int i = 0; i < s.length(); i++){\n if(s.charAt(i) == '{' || s.charAt(i) == '[' || s.charAt(i) == '('){\n arr.add(s.charAt(i));\n }else if(s.charAt(i) == '}'){\n if(arr.get(arr.size()-1) != '{'){\n return false;\n }\n arr.remove(arr.size()-1);\n }else if(s.charAt(i) == ']'){\n if(arr.get(arr.size()-1) != '['){\n return false;\n }\n arr.remove(arr.size()-1);\n }else if(s.charAt(i) == ')'){\n if(arr.get(arr.size()-1) != '('){\n return false;\n }\n arr.remove(arr.size()-1);\n }\n }\n return arr.isEmpty();\n }",
"public void setUnionForBounds(NodeUnion<? extends DeclaredTypeListNode> bounds) throws NullPointerException;",
"public interface QuotedL1Node {\n\n}",
"@Override\n protected void paintAbsolute(Rectangle r, Graphics g, boolean inverted){\n int lry = r.height + r.y;\n int lrx = r.width + r.x - 1;\n // draw the bracket according to the OrientationType provided\n switch (this.getOrientation()) {\n case east:\n case west:\n if (! useCharacters) {\n // doesn't look better if enabled\n if (false && r.height <= this.fontHeight) {\n if (this.getOrientation() == Orientation.west) {\n g.drawString(\"[\", r.x, r.y + r.height);\n } else {\n g.drawString(\"]\", lrx - fontWidth, r.y + r.height);\n }\n } else {\n g.drawLine(r.x, r.y, lrx, r.y);\n g.drawLine(r.x, lry, lrx, lry);\n if (this.getOrientation() == Orientation.west) lrx = r.x;\n g.drawLine(lrx, r.y, lrx, lry);\n }\n } else {\n // This would be the preferred way of painting Brackets and Braces,\n // but the fonts are rendered strangely, and support seems incomplete?\n int bc = (this.getOrientation() == Orientation.west) ? 6 : 9;\n if (r.height <= this.fontHeight) {\n g.drawString(bc == 6 ? \"[\" : \"]\", r.x, r.y - this.fontOffset);\n } else {\n int y = r.y - this.fontOffset;\n int x = r.x;\n g.drawString(BRACKET_CHARS.substring(bc,bc+1), x , y );\n int yLast = r.y + r.height - this.fontHeight - this.fontOffset;\n g.drawString(BRACKET_CHARS.substring(bc+2,bc+3), x , yLast);\n yLast -= this.fontHeight;\n while (y < yLast) {\n y += this.fontHeight;\n g.drawString(BRACKET_CHARS.substring(bc+1,bc+2), x, y);\n }\n }\n }\n break;\n case north:\n case south:\n g.drawLine(r.x, lry, r.x, r.y);\n g.drawLine(lrx, r.y, lrx, lry);\n if (this.getOrientation() == Orientation.north) lry = r.y;\n g.drawLine(r.x, lry, lrx, lry);\n break;\n } // end switch\n }",
"public interface ValueType {\n /** synonyms. */\n String SYNONYMS = \"synonyms\";\n /** patterns. */\n String PATTERNS = \"patterns\";\n }",
"private String syntax(ArrayList<String> tokens){\r\n String tkn=\"Done\";\r\n boolean VarDeclFlag = true;\r\n boolean exitFlag = false;\r\n ArrayList<String> temp = new ArrayList<>();\r\n //TODO return error\r\n //TODO return error method\r\n for(int i=0; i<tokens.size(); i++){\r\n if(VarDeclFlag){ \r\n if(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isLeftParen(tokens.get(i))){\r\n VarDeclFlag=false;\r\n tokensDef.add(\"LeftParen\");\r\n i++;\r\n while(!isRightParen(tokens.get(i)) && exitFlag){\r\n if(exitFlag && !isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n if(tokens.get(i).endsWith(\",\")){\r\n\t\t\t\t\t\t\t\t\t\r\n if(isId(removeLast(tokens.get(i)))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n }\r\n }\r\n else{\r\n if(isId(tokens.get(i))){\r\n exitFlag = true;\r\n tokensDef.add(\"Var\");\r\n i++; \r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n\t\tif(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isLeftParen(tokens.get(i))){\r\n VarDeclFlag=false;\r\n\t\t\ttokensDef.add(\"LeftParen\");\r\n i++;\r\n if(!isRightParen(tokens.get(i))){\r\n while(!isRightParen(tokens.get(i))){\r\n if(exitFlag && !isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n if(tokens.get(i).endsWith(\",\")){\r\n if(isId(removeLast(tokens.get(i)))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n }\r\n else \r\n return \"error\";\r\n }\r\n else{\r\n if(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isRightParen(tokens.get(i))){\r\n tokensDef.add(\"RightParen\");\r\n i++;\r\n }\r\n else\r\n return \"error\";\r\n }\r\n }\r\n \r\n }\r\n }\r\n else{\r\n tokensDef.add(\"RightParen\");\r\n i++;\r\n } \r\n }\r\n }\r\n }\r\n }\r\n\t\t\r\n return tkn;\r\n \r\n }",
"public interface sym {\n /* terminals */\n public static final int SHORT = 47;\n public static final int ANDEQ = 94;\n public static final int IMPLEMENTS = 4;\n public static final int CONST = 27;\n public static final int BITNOT = 68;\n public static final int STRICTFP = 35;\n public static final int NOTEQ = 74;\n public static final int PLUSEQ = 90;\n public static final int RBRACK = 60;\n public static final int CATCH = 20;\n public static final int COMMA = 62;\n public static final int RBRACE = 58;\n public static final int THROW = 22;\n public static final int RPAREN = 56;\n public static final int LBRACK = 59;\n public static final int ANDAND = 75;\n public static final int NUMERO = 101;\n public static final int OROR = 76;\n public static final int DOUBLE = 51;\n public static final int LBRACE = 57;\n public static final int TRANSIENT = 32;\n public static final int LPAREN = 55;\n public static final int XOREQ = 96;\n public static final int PROTECTED = 37;\n public static final int FALSE = 54;\n public static final int NOT = 67;\n public static final int COMENTARIO = 102;\n public static final int FINAL = 29;\n public static final int FLOAT = 49;\n public static final int URSHIFTEQ = 45;\n public static final int PACKAGE = 25;\n public static final int MOD = 86;\n public static final int CLASS = 2;\n public static final int SUPER = 34;\n public static final int ABSTRACT = 28;\n public static final int TRUE = 53;\n public static final int NATIVE = 30;\n public static final int PLUS = 79;\n public static final int LONG = 50;\n public static final int QUESTION = 69;\n public static final int WHILE = 17;\n public static final int EQUAL = 64;\n public static final int EXTENDS = 3;\n public static final int INTERFACE = 5;\n public static final int CHAR = 46;\n public static final int BOOLEAN = 44;\n public static final int SWITCH = 16;\n public static final int DO = 11;\n public static final int FOR = 14;\n public static final int RSHIFTEQ = 99;\n public static final int GREATER = 65;\n public static final int DIV = 82;\n public static final int VOID = 40;\n public static final int MULT = 81;\n public static final int PUBLIC = 36;\n public static final int RETURN = 15;\n public static final int ELSE = 13;\n public static final int TRY = 19;\n public static final int GTEQ = 73;\n public static final int BREAK = 7;\n public static final int DOT = 63;\n public static final int INT = 48;\n public static final int THROWS = 23;\n public static final int EQEQ = 71;\n public static final int NULL = 41;\n public static final int EOF = 0;\n public static final int SEMICOLON = 61;\n public static final int THIS = 42;\n public static final int DEFAULT = 10;\n public static final int MULTEQ = 92;\n public static final int IMPORT = 24;\n public static final int MINUS = 80;\n public static final int LTEQ = 72;\n public static final int OR = 84;\n public static final int URSHIFT = 89;\n public static final int error = 1;\n public static final int SYNCHRONIZED = 31;\n public static final int DIVEQ = 93;\n public static final int LSHIFTEQ = 98;\n public static final int FINALLY = 21;\n public static final int CONTINUE = 9;\n public static final int IF = 12;\n public static final int INSTANCEOF = 43;\n public static final int ID = 100;\n public static final int MODEQ = 97;\n public static final int MINUSMINUS = 78;\n public static final int COLON = 70;\n public static final int ASSERT = 18;\n public static final int OREQ = 95;\n public static final int VOLATILE = 33;\n public static final int PLUSPLUS = 77;\n public static final int CASE = 8;\n public static final int NEW = 6;\n public static final int RSHIFT = 88;\n public static final int STRING = 52;\n public static final int LESS = 66;\n public static final int BYTE = 26;\n public static final int AND = 83;\n public static final int PRIVATE = 38;\n public static final int STATIC = 39;\n public static final int LSHIFT = 87;\n public static final int XOR = 85;\n public static final int MINUSEQ = 91;\n}",
"public Snippet visit(TypeAnnotatedExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t Snippet type =n.typeAnnotation.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t inTypeAnnotatedExpression = true;\n\t \n\t _ret = n.expression.accept(this, argu);\n\t if(!inTypeAnnotatedExpression){\n\t \t if(type.expType instanceof X10Region || type.expType instanceof X10ValueArray || type.expType instanceof X10Point)\n\t\t\t\t{\n\t\t\t\t\t_ret.returnTemp = \"(\" + type.expType.getTypeName() + \")(\" + _ret.returnTemp+\"\";\n\t\t\t\t\t\n\t\t\t\t}\n\t }else{\n\t \t if(type.expType instanceof X10Region || type.expType instanceof X10ValueArray || type.expType instanceof X10Point)\n\t\t\t\t{\n\t\t\t\t\t_ret.returnTemp = \"(\" + type.expType.getTypeName() + \")(\" + _ret.returnTemp+\")\";\n\t\t\t\t\t\n\t\t\t\t} \n\t }\n\t inTypeAnnotatedExpression = false;\n\t n.nodeToken3.accept(this, argu);\n\t\t\t_ret.expType = type.expType;\n\t return _ret;\n\t }",
"public interface Equality extends Clause {}",
"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 Snippet visit(TypeAnnotation n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t _ret = n.nodeChoice.accept(this, argu);\n\t return _ret;\n\t }",
"public String visit(BracketExpression n, String s) {\n n.f1.accept(this, null);\n return null;\n }",
"public interface Symbols {\n /* terminals */\n public static final int BAG = 68;\n public static final int RETRIEVE = 93;\n public static final int AS = 34;\n public static final int TIMES = 13;\n public static final int LCURLY = 54;\n public static final int TYPE = 58;\n public static final int LEAVESBY = 91;\n public static final int LOWEREQUALS = 33;\n public static final int LAZY_FAILURE = 97;\n public static final int CLOSEUNIQUEBY = 90;\n public static final int NAME = 7;\n public static final int ENUM = 70;\n public static final int FORSOME = 41;\n public static final int CATCH = 114;\n public static final int DATEPREC = 109;\n public static final int COMMA = 29;\n public static final int VIRTUAL = 99;\n public static final int RANDOM = 110;\n public static final int DOUBLE_LITERAL = 4;\n public static final int SUM = 48;\n public static final int THROW = 116;\n public static final int JOIN = 28;\n public static final int RPAREN = 19;\n public static final int ON_NAVIGATE = 106;\n public static final int STRUCT = 69;\n public static final int NOT_MATCH_STRING = 23;\n public static final int LPAREN = 18;\n public static final int NOW = 108;\n public static final int INTEGER_LITERAL = 2;\n public static final int NOT = 24;\n public static final int VIEW = 98;\n public static final int INSTANCE = 73;\n public static final int DIFFERENT = 21;\n public static final int DATE_LITERAL = 6;\n public static final int MIN = 43;\n public static final int THEN = 65;\n public static final int EXTERNAL = 67;\n public static final int RECORD = 57;\n public static final int SEROID = 120;\n public static final int REVERSE = 107;\n public static final int ON_UPDATE = 103;\n public static final int LOWER = 31;\n public static final int INSERTCOPY = 83;\n public static final int BOOLEAN_LITERAL = 5;\n public static final int TEMPORAL = 80;\n public static final int CLASS = 71;\n public static final int SEED = 101;\n public static final int IMPLEMENT = 95;\n public static final int MODULO = 17;\n public static final int UNIQUEREF = 47;\n public static final int PLUS = 10;\n public static final int FORALL = 42;\n public static final int DIVIDE = 14;\n public static final int EXISTS = 49;\n public static final int GREATEREQUALS = 32;\n public static final int WHILE = 84;\n public static final int UNION = 16;\n public static final int DELETE = 77;\n public static final int EXTENDS = 72;\n public static final int MODULE = 53;\n public static final int INTERFACE = 117;\n public static final int ASSIGN = 61;\n public static final int RSQUARE = 52;\n public static final int FOR = 86;\n public static final int DO = 85;\n public static final int SCHEMADEF = 96;\n public static final int MATCH_STRING = 22;\n public static final int GREATER = 30;\n public static final int RANGEAS = 119;\n public static final int MAX = 44;\n public static final int RETURN = 60;\n public static final int TRY = 113;\n public static final int ELSE = 66;\n public static final int DOTDOT = 50;\n public static final int BREAK = 87;\n public static final int DOT = 26;\n public static final int PERMANENT = 79;\n public static final int AVG = 45;\n public static final int TRANSACTION_ABORT = 112;\n public static final int STRING_LITERAL = 3;\n public static final int EOF = 0;\n public static final int SEMICOLON = 8;\n public static final int INTERSECT = 15;\n public static final int LSQUARE = 51;\n public static final int WHERE = 27;\n public static final int COUNT = 25;\n public static final int LOCAL = 81;\n public static final int IMPORT = 56;\n public static final int IS = 59;\n public static final int UNIQUE = 46;\n public static final int IN = 36;\n public static final int OR = 39;\n public static final int error = 1;\n public static final int HYPHEN = 11;\n public static final int LEAVESUNIQUEBY = 92;\n public static final int FINALLY = 115;\n public static final int CONTINUE = 88;\n public static final int INSTANCEOF = 74;\n public static final int IF = 64;\n public static final int CONTAINS = 37;\n public static final int COLON = 9;\n public static final int SUBTRACT = 12;\n public static final int CREATE = 78;\n public static final int DEREF = 62;\n public static final int FOREACH = 63;\n public static final int REF = 75;\n public static final int ON_DELETE = 104;\n public static final int DESEROID = 121;\n public static final int CLOSEBY = 89;\n public static final int RENAME = 122;\n public static final int UPDATE = 94;\n public static final int INSERT = 82;\n public static final int OBJECTS = 100;\n public static final int AND = 40;\n public static final int SESSION = 76;\n public static final int ON_RETRIEVE = 102;\n public static final int GROUPAS = 35;\n public static final int ON_NEW = 105;\n public static final int ORDERBY = 38;\n public static final int DISTINCT = 118;\n public static final int RCURLY = 55;\n public static final int EQUALS = 20;\n public static final int TRANSACTION_CAPABLE = 111;\n}",
"interface GAAllele {\r\n interface Type {\r\n int ENUMERATED = 1;\r\n int BOUNDED = 2;\r\n int DISCRETIZED = 3;\r\n }\r\n\r\n interface BoundType {\r\n int NONE = 0;\r\n int INCLUSIVE = 1;\r\n int EXCLUSIVE = 2;\r\n }\r\n}",
"@Override\r\n public void gotoMatchingBracket() {\r\n ISourceViewer sourceViewer = getSourceViewer();\r\n IDocument document = sourceViewer.getDocument();\r\n if (document == null)\r\n return;\r\n\r\n IRegion selection = getSignedSelection(sourceViewer);\r\n\r\n int selectionLength = Math.abs(selection.getLength());\r\n if (selectionLength > 1) {\r\n setStatusLineErrorMessage(\"No bracket selected\");\r\n sourceViewer.getTextWidget().getDisplay().beep();\r\n return;\r\n }\r\n\r\n // #26314\r\n int sourceCaretOffset = selection.getOffset() + selection.getLength();\r\n if (isSurroundedByBrackets(document, sourceCaretOffset))\r\n sourceCaretOffset -= selection.getLength();\r\n\r\n IRegion region = bracketMatcher.match(document, sourceCaretOffset);\r\n if (region == null) {\r\n setStatusLineErrorMessage(\"No matching bracket found\");\r\n sourceViewer.getTextWidget().getDisplay().beep();\r\n return;\r\n }\r\n\r\n int offset = region.getOffset();\r\n int length = region.getLength();\r\n\r\n if (length < 1)\r\n return;\r\n\r\n int anchor = bracketMatcher.getAnchor();\r\n // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195\r\n int targetOffset = (ICharacterPairMatcher.RIGHT == anchor) ? offset + 1 : offset + length;\r\n\r\n boolean visible = false;\r\n if (sourceViewer instanceof ITextViewerExtension5) {\r\n ITextViewerExtension5 extension = (ITextViewerExtension5) sourceViewer;\r\n visible = (extension.modelOffset2WidgetOffset(targetOffset) > -1);\r\n } else {\r\n IRegion visibleRegion = sourceViewer.getVisibleRegion();\r\n // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195\r\n visible = (targetOffset >= visibleRegion.getOffset()\r\n && targetOffset <= visibleRegion.getOffset() + visibleRegion.getLength());\r\n }\r\n\r\n if (!visible) {\r\n setStatusLineErrorMessage(\"Matching bracket is outside selected element\");\r\n sourceViewer.getTextWidget().getDisplay().beep();\r\n return;\r\n }\r\n\r\n if (selection.getLength() < 0)\r\n targetOffset -= selection.getLength();\r\n\r\n sourceViewer.setSelectedRange(targetOffset, selection.getLength());\r\n sourceViewer.revealRange(targetOffset, selection.getLength());\r\n }",
"@Test\n public void nonBracket(){\n assertTrue(BalancedBrackets.hasBalancedBrackets(\"\"));\n }",
"private void parseQuestionMark(@NotNull ParserState state) {\n if (state.is(m_types.C_FUN_PARAMS)) {\n state.mark(m_types.C_FUN_PARAM)\n .mark(m_types.C_NAMED_PARAM);\n }\n // Start of a new optional parameter :: let f x |>?<|(y ...\n else if (state.is(m_types.C_FUN_PARAM) && !state.hasScopeToken()) {\n state.complete().popEnd()\n .mark(m_types.C_FUN_PARAM)\n .mark(m_types.C_NAMED_PARAM);\n }\n // Condition ?\n else if (state.is(m_types.C_BINARY_CONDITION) && !state.isPrevious(m_types.C_MATCH_EXPR)) {\n IElementType nextType = state.rawLookup(1);\n // ... |>?<| ... : ...\n if (nextType != m_types.LIDENT) {\n state.popEnd();\n }\n }\n }",
"Kind kind();",
"public String visit(BracketExpression n, LLVMRedux argu) throws Exception {\n\n\n return n.f1.accept(this,argu);\n }",
"String ensureTypeSpecFormat(Context pContext, TypeRef pTypeRef, Executable.ExecKind pExecKind,\n\t\t\tExecInterface pInterface) {\n\t\t\n\t\tif((pExecKind != null) && pExecKind.isFragment() && (pInterface.getParamCount() != 0)) \n\t\t\treturn \"Mal-form TypeSpec: A fragment should not have a parameter.\" +\n\t\t\t\t\t\"(Executable type \"+pTypeRef+\").\";\n\t\t\n\t\treturn null;\n\t}",
"public interface InterpolationMethodBaseType extends CodeType {\r\n}",
"public String visit(ArrayType n, String argu) {\n return \"ArrayType\"; \n }",
"private Operation selector(Scope scope, Vector queue)\r\n {\r\n Operation root;\r\n\r\n root = new Operation();\r\n\r\n if (nextSymbol == Keyword.DOTSY)\r\n {\r\n lookAhead();\r\n\r\n root.operator = nextSymbol;\r\n\r\n if (nextSymbol == Keyword.IDENTSY)\r\n {\r\n root.name = nextToken;\r\n lookAhead();\r\n root.left = argumentsOpt(scope, null, queue);\r\n }\r\n else if (nextSymbol == Keyword.SUPERSY)\r\n {\r\n matchKeyword(Keyword.SUPERSY);\r\n root.left = arguments(scope, null, queue);\r\n }\r\n else\r\n {\r\n matchKeyword(Keyword.NEWSY);\r\n root.left = innerCreator(scope, queue);\r\n }\r\n }\r\n else\r\n {\r\n root.operator = nextSymbol;\r\n matchKeyword(Keyword.LBRACKETSY);\r\n follower.add(Keyword.RBRACKETSY);\r\n unresolved.add(\"JavaArray\");\r\n root.left = expression(scope, queue);\r\n follower.remove(follower.size() - 1);\r\n matchKeyword(Keyword.RBRACKETSY);\r\n }\r\n\r\n return root;\r\n }",
"protected abstract String getQualifier();",
"Token match(Kind... kinds) throws SyntaxException {\r\n\t\tToken tmp = t;\r\n\t\tif (isKind(kinds)) {\r\n\t\t\tconsume();\r\n\t\t\treturn tmp;\r\n\t\t}\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tfor (Kind kind1 : kinds) {\r\n\t\t\tsb.append(kind1).append(kind1).append(\" \");\r\n\t\t}\r\n\t\terror(kinds);\r\n\t\treturn null; // unreachable\r\n\t}",
"InstrumentedType.WithFlexibleName represent(TypeDescription typeDescription);",
"public interface SKOSNotationProperty extends SKOSDataProperty {\n}",
"String kind();",
"String kind();",
"char[][][] getTypeParameterBounds();",
"public interface SRSTet extends Tetromino {\r\n @Override\r\n default String getName() {\r\n return \"SRS \" + getType();\r\n }\r\n}",
"public String getSyntax(){\n\t\treturn syntax;\n\t}",
"private @Nullable Token eatOpt(TokenType expectedTokenType) {\n if (peek(expectedTokenType)) {\n return eat(expectedTokenType);\n }\n return null;\n }",
"private String getAltRegType() { // TODO - fix Register reference hardcoded in reg defines parm default?\n\t\tString firstChar = regProperties.getId().substring(0, 1);\n\t\t// change case of first character in name to create type\n\t\tString regTypeParam;\n\t\tif (firstChar.equals(firstChar.toUpperCase()))\n\t\t regTypeParam = regProperties.getId().replaceFirst(firstChar, firstChar.toLowerCase()); // change to lc\n\t\telse\n\t\t regTypeParam = regProperties.getId().replaceFirst(firstChar, firstChar.toUpperCase()); // change to uc \n\t\tString regBaseType = regProperties.isReplicated()? \"RegisterArray\" : \"Register\";\n\t\treturn regBaseType + \" #(\" + getAltBlockType() + \"::\" + regTypeParam + \")\"; // TODO - make parameterizable, getAddressMapName() + \"_\" + regProperties.getBaseName() + \"_t\" \n\t}",
"public interface SString extends SInlinedSQLType\n{\n}",
"public String extended() {\r\n final StringBuilder sb = new StringBuilder();\r\n if(type != null) sb.append(\"[\" + code() + \"] \");\r\n return sb + simple();\r\n }",
"public String kind() { return kind; }",
"public interface s extends a {\n void a();\n\n void a(g gVar);\n\n void a(String str, boolean z);\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}",
"public interface FrequencyConstraintShapeType extends ExternalConstraintShapeType {\n}",
"public interface MagicType extends Type {\n\n\t/**\n\t * Given that we are a type specified in a replacement rule (e.g. a Var or\n\t * Atom), can we consume a submatch of the given type in the match?\n\t *\n\t * Alternatively, we could have overriden .equals().\n\t */\n\tboolean replacementfor(Type o);\n}",
"@Override\n public boolean isNotationDeclared(String name) { return false; }",
"public String getSyntax() {\n return syntax;\n }",
"private Operation creator(Scope scope, Vector queue)\r\n {\r\n Operation root = null;\r\n Type t = new Type();\r\n\r\n if ((t.type = basicType()) != Keyword.NONESY)\r\n {\r\n root = arrayCreatorRest(t, scope, queue);\r\n }\r\n else\r\n {\r\n Token x = nextToken;\r\n\r\n t.ident = new Token(nextToken);\r\n t.ident.string = x.string = qualident();\r\n unresolved.add(x.string);\r\n\r\n if (nextSymbol == Keyword.LBRACKETSY)\r\n {\r\n root = arrayCreatorRest(t, scope, queue);\r\n }\r\n else\r\n {\r\n root = classCreatorRest(x, scope, queue);\r\n }\r\n }\r\n\r\n return root;\r\n }",
"public Rule nonSimpleMapTypes()\n \t{\n \t\treturn sequence(\n \t\t\t\tfirstOf(funcType(), mapType(), simpleType()),\n \t\t\t\toptional(\n \t\t\t\t// Not enforcing [] because of problems with maps like this Str:int[\"\":5]\n \t\t\t\tsequence(noNl(), optional(SP_QMARK), noNl(), SQ_BRACKET_L, SQ_BRACKET_R)), // list of '?[]'\n \t\t\t\toptional(sequence(noNl(), SP_QMARK))); // nullable\n \t}",
"public final void rule__AstType__Group_0_1_2__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20660:1: ( ( ']' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20661:1: ( ']' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20661:1: ( ']' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20662:1: ']'\n {\n before(grammarAccess.getAstTypeAccess().getRightSquareBracketKeyword_0_1_2_4()); \n match(input,82,FOLLOW_82_in_rule__AstType__Group_0_1_2__4__Impl41445); \n after(grammarAccess.getAstTypeAccess().getRightSquareBracketKeyword_0_1_2_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void mC_BRACKET() throws RecognitionException {\r\n try {\r\n int _type = C_BRACKET;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // Satmc.g:9:11: ( ']' )\r\n // Satmc.g:9:13: ']'\r\n {\r\n match(']'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"private void emptyBracket() {\n\n\t\twhile (!stack.peek().matches(\"[(]\")) {\n\t\t\tqueue.add(stack.pop());\n\t\t}\n\t\t// Remove opening bracket from the stack.\n\t\tstack.pop();\n\t}",
"public final void mRBRACKET() throws RecognitionException {\n try {\n int _type = RBRACKET;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:43:10: ( ']' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:43:12: ']'\n {\n match(']'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private String toStringBody(int depth) {\n if (depth <= 1) return \"\";\n\n String ret;\n if (operator == null) {\n ret = \"\\nOperator: null\";\n }\n else {\n ret = \"\\nOperator: \" + operator.getName().toString() + \" \"\n + operator.getUid() + \" \";\n }\n\n if (unboundedBoundSymbols!=null && unboundedBoundSymbols.length > 0) {\n ret += \"\\nUnbounded bound symbols: \";\n for (int i = 0; i < unboundedBoundSymbols.length; i++) {\n ret += Strings.indent(2,unboundedBoundSymbols[i].toString(depth-1));\n }\n }\n\n if (boundedBoundSymbols != null && boundedBoundSymbols.length > 0) {\n ret += \"\\nBounded bound symbols: \" + getNumberOfBoundedBoundSymbols();\n for (int i = 0; i < boundedBoundSymbols.length; i++) {\n if (boundedBoundSymbols[i] != null && boundedBoundSymbols[i].length > 0) {\n for (int j = 0; j < boundedBoundSymbols[i].length; j++) {\n ret += Strings.indent(2, \"\\n[\" + i + \",\" + j + \"]\" +\n Strings.indent(2,boundedBoundSymbols[i][j].toString(depth-1)));\n }\n }\n }\n }\n\n if (ranges.length > 0) {\n ret += \"\\nRanges: \";\n for (int i = 0; i < ranges.length; i++)\n ret += Strings.indent(2,(ranges[i] != null ?\n ranges[i].toString(depth-1) : \"null\" ));\n }\n\n if (tupleOrs != null && tupleOrs.length > 0 /* && tupleOrs[0] */) {\n ret += \"\\nTupleOrs: \";\n for (int i = 0; i < tupleOrs.length; i++) {\n ret += Strings.indent(2, (tupleOrs[i] ? \"\\ntrue\" : \"\\nfalse\"));\n }\n }\n\n if (operands != null) {\n if (operands.length > 0) {\n ret += \"\\nOperands: \" + operands.length;\n for (int i = 0; i < operands.length; i++) {\n ret += Strings.indent(2,\n (operands[i] == null ? \"\\nnull\" : operands[i].toString(depth-1)));\n }\n }\n }\n else {\n ret += \"\\nOperands: null\";\n }\n return Strings.indent(2, ret);\n }",
"public interface FType {\n boolean isPointer();\n boolean isDimension();\n String getCanonicalText();\n FTypeParamValue getKind();\n}",
"public Rule simpleMapType()\n \t{\n \t\treturn sequence(nonSimpleMapTypes(), noNl(), SP_COL, noNl(), nonSimpleMapTypes(),\n \t\t\t\toptional(\n \t\t\t\t// Not enforcing [] because of problems with maps like this Str:int[\"\":5]\n \t\t\t\tsequence(noNl(), optional(SP_QMARK), noNl(), SQ_BRACKET_L, SQ_BRACKET_R)), // list of '?[]'\n \t\t\t\toptional(sequence(noNl(), SP_QMARK))); // nullable\n \t}",
"private void superSuffix(Operation base, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.LPARSY)\r\n base.left.left = arguments(scope, null, queue);\r\n else\r\n {\r\n matchKeyword(Keyword.DOTSY);\r\n\r\n base = base.right = new Operation();\r\n base.left = new Operation();\r\n base.left.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n base.left.left = argumentsOpt(scope, null, queue);\r\n }\r\n }",
"public Rule mapType()\n \t{\n \t\treturn sequence(SQ_BRACKET_L, noNl(), nonSimpleMapTypes(), noNl(), SP_COL, noNl(), nonSimpleMapTypes(), noNl(), SQ_BRACKET_R);\n \t}",
"interface WithKind {\n /**\n * Specifies the kind property: The Kind of the resource..\n *\n * @param kind The Kind of the resource.\n * @return the next definition stage.\n */\n WithCreate withKind(String kind);\n }",
"public interface C0389gj extends C0388gi {\n}",
"Kind getKind();",
"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}",
"public String getQualificationType() {\n return qualificationType;\n }"
] | [
"0.53828233",
"0.5248631",
"0.52035296",
"0.51779157",
"0.5121753",
"0.51214796",
"0.5098495",
"0.50723284",
"0.4999124",
"0.49503645",
"0.4935717",
"0.49148068",
"0.49064595",
"0.4879312",
"0.48409843",
"0.48174262",
"0.481043",
"0.48070893",
"0.47988924",
"0.4793367",
"0.4767481",
"0.4764035",
"0.47400314",
"0.47335443",
"0.46931654",
"0.46868104",
"0.46693903",
"0.46502453",
"0.46465644",
"0.46403757",
"0.46349916",
"0.4622027",
"0.4616214",
"0.46152234",
"0.45859754",
"0.45801917",
"0.45716128",
"0.45701587",
"0.45607454",
"0.4559208",
"0.45584288",
"0.45456186",
"0.45398986",
"0.4538406",
"0.452896",
"0.45200783",
"0.4519864",
"0.45149973",
"0.45137176",
"0.45081183",
"0.4506521",
"0.45021996",
"0.4487607",
"0.4482702",
"0.44788352",
"0.44629425",
"0.44578236",
"0.44575125",
"0.4453258",
"0.44523457",
"0.44471657",
"0.4434578",
"0.44331333",
"0.44287363",
"0.442817",
"0.44145897",
"0.4397869",
"0.439291",
"0.4390865",
"0.4390865",
"0.4378735",
"0.4373342",
"0.43554476",
"0.4355338",
"0.4346537",
"0.43430558",
"0.43320677",
"0.43306026",
"0.43174726",
"0.43093812",
"0.43028232",
"0.42964903",
"0.429296",
"0.429211",
"0.4290581",
"0.42858854",
"0.42807204",
"0.427803",
"0.427295",
"0.42688447",
"0.42687747",
"0.4268239",
"0.42676398",
"0.4263044",
"0.42630234",
"0.42602405",
"0.42519704",
"0.4251939",
"0.42439386",
"0.42430618"
] | 0.5172428 | 4 |
( NONESY | typeKW ) | private Keyword basicType()
{
Keyword x = Keyword.NONESY;
if (typeKW.contains(nextSymbol))
{
x = nextSymbol;
lookAhead();
}
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean isKeyword();",
"void setTypeKeyword(String keyword) {\n this.fTypeKeyword = keyword;\n }",
"boolean isTypeKey(String key);",
"public Rule nonFunctionTypes()\n \t{\n \t\treturn sequence(\n \t\t\t\t// Don't allow simpleMap starting with '|' as this confuses with closinf Function.\n \t\t\t\tfirstOf(sequence(testNot(SP_PIPE), simpleMapType()), mapType(), simpleType()),\n \t\t\t\toptional(\n \t\t\t\tsequence(noNl(), optional(SP_QMARK), noNl(), enforcedSequence(\n \t\t\t\tSQ_BRACKET_L, SQ_BRACKET_R))), // list of '?[]'\n \t\t\t\toptional(sequence(noNl(), SP_QMARK))); // nullable\n \t}",
"public interface TypeKey {\n}",
"boolean isNotKeyWord(String word);",
"java.lang.String getKeyword();",
"private String createTypeKey(int type, String key) {\r\n\t\treturn type + \"-\" + key;\r\n\t}",
"@Override\n public String getType()\n {\n return \"OO\";\n }",
"boolean hasKeyword();",
"String getKeyword();",
"@Override\n public String getKeyword() {\n return null;\n }",
"@Override\n public String getKeyword() {\n return null;\n }",
"public Builder setUnicodeLocaleKeyword(String key, String type) {\n/* 1668 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public Keywords.Type getType() {\n\t\treturn type;\n\t}",
"public void settype(String cat) { this.type = cat; }",
"public boolean hasKeyType() {\n return fieldSetFlags()[2];\n }",
"@Override\n public boolean isKeywordMultiField() {\n return !isKeyword() && fieldMap.containsKey(ES_MAPPING_TYPE_KEYWORD)\n && fieldMap.get(ES_MAPPING_TYPE_KEYWORD).isKeyword();\n }",
"@Override\n\tpublic boolean keyTyped(char arg0) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean keyTyped(char arg0) {\n\t\treturn false;\n\t}",
"public abstract boolean isKeyword(@Nullable String text);",
"public final AntlrDatatypeRuleToken ruleprimTypes() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token kw=null;\n\n\n \tenterRule();\n\n try {\n // InternalSafetyParser.g:6198:2: ( (kw= Real | kw= Bool | kw= Int ) )\n // InternalSafetyParser.g:6199:2: (kw= Real | kw= Bool | kw= Int )\n {\n // InternalSafetyParser.g:6199:2: (kw= Real | kw= Bool | kw= Int )\n int alt84=3;\n switch ( input.LA(1) ) {\n case Real:\n {\n alt84=1;\n }\n break;\n case Bool:\n {\n alt84=2;\n }\n break;\n case Int:\n {\n alt84=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 84, 0, input);\n\n throw nvae;\n }\n\n switch (alt84) {\n case 1 :\n // InternalSafetyParser.g:6200:3: kw= Real\n {\n kw=(Token)match(input,Real,FollowSets000.FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tcurrent.merge(kw);\n \t\t\tnewLeafNode(kw, grammarAccess.getPrimTypesAccess().getRealKeyword_0());\n \t\t\n }\n\n }\n break;\n case 2 :\n // InternalSafetyParser.g:6206:3: kw= Bool\n {\n kw=(Token)match(input,Bool,FollowSets000.FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tcurrent.merge(kw);\n \t\t\tnewLeafNode(kw, grammarAccess.getPrimTypesAccess().getBoolKeyword_1());\n \t\t\n }\n\n }\n break;\n case 3 :\n // InternalSafetyParser.g:6212:3: kw= Int\n {\n kw=(Token)match(input,Int,FollowSets000.FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tcurrent.merge(kw);\n \t\t\tnewLeafNode(kw, grammarAccess.getPrimTypesAccess().getIntKeyword_2());\n \t\t\n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"@ParameterizedTest\n @EnumSource(KeyType.class)\n void testNonToken(KeyType keyType) throws NoSuchAlgorithmException {\n final Pair<String, PrivateKey> keyPair = generateKeypair(keyType);\n\n final String jwt = Jwts.builder()\n .setHeaderParam(\"kid\", UUID.randomUUID())\n .setAudience(\"localhost:3002/v1/Token/auth\")\n .setIssuer(\"macaroon\")\n .setSubject(\"macaroon\")\n .setId(UUID.randomUUID().toString())\n .setExpiration(Date.from(Instant.now().plus(5, ChronoUnit.MINUTES)))\n .signWith(keyPair.getRight(), APIAuthHelpers.getSigningAlgorithm(keyType))\n .compact();\n\n // Submit the JWT\n Response response = RESOURCE.target(\"/v1/Token/validate\")\n .request()\n .accept(MediaType.APPLICATION_JSON)\n .post(Entity.entity(jwt, MediaType.TEXT_PLAIN));\n\n assertEquals(400, response.getStatus(), \"Should not be valid\");\n assertTrue(response.readEntity(String.class).contains(\"Client token is not formatted correctly\"), \"Should have correct exception\");\n }",
"public native void keyType(char c);",
"boolean hasPlaceholderType();",
"public int getKeywordId()\n {\n return keywordType;\n }",
"private boolean is(TK tk)\n {\n return tk == tok.kind;\n }",
"@Override\n public boolean keyTyped(char arg0) {\n return false;\n }",
"public final void mKEYWORD_27() throws RecognitionException {\n try {\n int _type = KEYWORD_27;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.leta.plugin.ui/src-gen/org/ui/contentassist/antlr/lexer/InternalLetaLexer.g:29:12: ( ( 'V' | 'v' ) ( 'E' | 'e' ) ( 'R' | 'r' ) ( 'I' | 'i' ) ( 'F' | 'f' ) ( 'Y' | 'y' ) )\n // ../org.leta.plugin.ui/src-gen/org/ui/contentassist/antlr/lexer/InternalLetaLexer.g:29:14: ( 'V' | 'v' ) ( 'E' | 'e' ) ( 'R' | 'r' ) ( 'I' | 'i' ) ( 'F' | 'f' ) ( 'Y' | 'y' )\n {\n if ( input.LA(1)=='V'||input.LA(1)=='v' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='E'||input.LA(1)=='e' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='R'||input.LA(1)=='r' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='I'||input.LA(1)=='i' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='F'||input.LA(1)=='f' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='Y'||input.LA(1)=='y' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private boolean isKeyword(String value) {\n return Keywords.isKeyword(value);\n }",
"void createKeyword(String name);",
"public Bytypeandyiji() {\r\n\t\tsuper();\r\n\t}",
"public boolean hasKeyword() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"QuoteTypeAttr createQuoteTypeAttr();",
"private static AbstractType<?> keyType(CollectionType<?> type)\n {\n return type.nameComparator();\n }",
"private boolean is(TK tk) {\n return tk == tok.kind;\n }",
"@Override\r\n\t\t\tpublic boolean hasKeyword(String name) {\n\t\t\t\treturn false;\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic boolean hasKeyword(String name) {\n\t\t\t\treturn false;\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic boolean hasKeyword(String name) {\n\t\t\t\treturn false;\r\n\t\t\t}",
"public String getKeyword()\n {\n switch (keywordType)\n {\n case ASTokenTypes.TOKEN_KEYWORD_FUNCTION:\n return IASKeywordConstants.FUNCTION;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_EXTENDS:\n return IASKeywordConstants.EXTENDS;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_IMPLEMENTS:\n return IASKeywordConstants.IMPLEMENTS;\n \n case ASTokenTypes.TOKEN_KEYWORD_VAR:\n return IASKeywordConstants.VAR;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_GET:\n return IASKeywordConstants.GET;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_SET:\n return IASKeywordConstants.SET;\n \n case ASTokenTypes.TOKEN_KEYWORD_NEW:\n return IASKeywordConstants.NEW;\n \n case ASTokenTypes.TOKEN_KEYWORD_CONST:\n return IASKeywordConstants.CONST;\n \n case ASTokenTypes.TOKEN_KEYWORD_CLASS:\n return IASKeywordConstants.CLASS;\n \n case ASTokenTypes.TOKEN_KEYWORD_INTERFACE:\n return IASKeywordConstants.INTERFACE;\n \n case ASTokenTypes.TOKEN_DIRECTIVE_DEFAULT_XML:\n return IASKeywordConstants.DEFAULT_XML_NAMESPACE;\n }\n\n assert false : \"Unknown keyword type \" + keywordType;\n return \"\";\n }",
"public String createKey(String type) {\n int i = 0;\n for(i=0; i<EnumFactory.numberOfTypes; i++) {\n if (type.equals(EnumFactory.typeStrings[i])) {\n break;\n }\n }\n countKeys[i]++;\n String key = String.format(\"%s$%d\", EnumFactory.typeStrings[i],countKeys[i]);\n return key;\n }",
"abstract public String getType();",
"public interface Keys {\n String STRING = \"string\";\n String NUM = \"num\";\n String PERSON = \"person\";\n}",
"public interface ValueType {\n /** synonyms. */\n String SYNONYMS = \"synonyms\";\n /** patterns. */\n String PATTERNS = \"patterns\";\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();",
"boolean isSetCapitalInKind();",
"public boolean hasKeyword() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"protected abstract String getType();",
"private void insureMinimumLettersInTypeCode(StringBuffer buffer, String type) {\r\n buffer.append(type.charAt(1));\r\n int ndx = 2;\r\n char ch = type.charAt(ndx);\r\n while (isVowel(ch)) {\r\n buffer.append(ch);\r\n ndx++;\r\n ch = type.charAt(ndx);\r\n }\r\n buffer.append(ch);\r\n }",
"private Type type()\r\n {\r\n Type t = new Type();\r\n\r\n t.ident = nextToken;\r\n t.type = basicType();\r\n if (t.type == Keyword.NONESY)\r\n {\r\n unresolved.add(t.ident.string = qualident());\r\n }\r\n else\r\n t.ident.string = null;\r\n\r\n t.dim = bracketsOpt();\r\n\r\n return t;\r\n }",
"public TypeFilterHonSearch(String key) {\r\n\t\temptyKey = StringUtils.isEmpty(key);\r\n\t\tif (emptyKey == false) {\r\n\t\t\tkey = key.trim().toLowerCase();\r\n\t\t\tif (key.length() > 0) {\r\n\t\t\t\tif (key.charAt(key.length() - 1) != '*') {\r\n\t\t\t\t\tkey += '*';\r\n\t\t\t\t}\r\n\t\t\t\tpattern = Pattern.compile(StringUtils.replace(key, \"*\", \".*\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"Class<?> getKeyType();",
"public Rule type()\n \t{\n \t\treturn firstOf(simpleMapType(), nonSimpleMapTypes());\n \t}",
"public Rule nonSimpleMapTypes()\n \t{\n \t\treturn sequence(\n \t\t\t\tfirstOf(funcType(), mapType(), simpleType()),\n \t\t\t\toptional(\n \t\t\t\t// Not enforcing [] because of problems with maps like this Str:int[\"\":5]\n \t\t\t\tsequence(noNl(), optional(SP_QMARK), noNl(), SQ_BRACKET_L, SQ_BRACKET_R)), // list of '?[]'\n \t\t\t\toptional(sequence(noNl(), SP_QMARK))); // nullable\n \t}",
"public void addType(String value) {\n/* 380 */ addStringToBag(\"type\", value);\n/* */ }",
"public static String toLegacyType(String keyword, String value) {\n/* 1300 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private TYPE getType(final String type) {\n String temp = type.replaceAll(\"-\", \"_\");\n TYPE answer = Arrays.stream(\n TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(TYPE.unknown);\n return answer;\n }",
"protected void keyTyped(char par1, int par2) {}",
"public M csseTypeNull(){if(this.get(\"csseTypeNot\")==null)this.put(\"csseTypeNot\", \"\");this.put(\"csseType\", null);return this;}",
"public final void mKEYWORD_24() throws RecognitionException {\n try {\n int _type = KEYWORD_24;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.leta.plugin.ui/src-gen/org/ui/contentassist/antlr/lexer/InternalLetaLexer.g:33:12: ( ( 'N' | 'n' ) ( 'U' | 'u' ) ( 'L' | 'l' ) ( 'L' | 'l' ) )\n // ../org.leta.plugin.ui/src-gen/org/ui/contentassist/antlr/lexer/InternalLetaLexer.g:33:14: ( 'N' | 'n' ) ( 'U' | 'u' ) ( 'L' | 'l' ) ( 'L' | 'l' )\n {\n if ( input.LA(1)=='N'||input.LA(1)=='n' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='U'||input.LA(1)=='u' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='L'||input.LA(1)=='l' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n if ( input.LA(1)=='L'||input.LA(1)=='l' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"static int type_of_inx(String passed){\n\t\treturn 1;\n\t}",
"public String getType () { return getAttributeOrDefault(ATTNAMECOMMONPREFIX + ATTNAMESUFFIX_TYPE , \"\"); }",
"static int type_of_ori(String passed){\n\t\treturn 1;\n\t}"
] | [
"0.58210975",
"0.57967234",
"0.547723",
"0.5416261",
"0.53778636",
"0.53186935",
"0.5282334",
"0.52204984",
"0.5171363",
"0.51595783",
"0.51573145",
"0.51208764",
"0.51208764",
"0.50908846",
"0.50637645",
"0.50481313",
"0.50438434",
"0.5031178",
"0.5022374",
"0.5022374",
"0.5011859",
"0.5006877",
"0.5006541",
"0.50001",
"0.49544373",
"0.49525288",
"0.49384692",
"0.49223626",
"0.49187356",
"0.49013308",
"0.48921248",
"0.48907992",
"0.48906484",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.4879037",
"0.48584738",
"0.48555565",
"0.4843629",
"0.48356482",
"0.48356482",
"0.48356482",
"0.48110023",
"0.48044068",
"0.48038912",
"0.48031446",
"0.47971773",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47970834",
"0.47964478",
"0.47941348",
"0.47934955",
"0.47926825",
"0.4791506",
"0.4789673",
"0.47893783",
"0.4782132",
"0.4770144",
"0.475838",
"0.4751915",
"0.47420472",
"0.47366717",
"0.47365573",
"0.4730351",
"0.47291487",
"0.47152066",
"0.47151434"
] | 0.72760373 | 0 |
[ FINALSY ] type variableDeclaratorId | private Parameter formalParameter()
{
Parameter x = new Parameter();
x.modify = 0;
if (nextSymbol == Keyword.FINALSY)
{
x.modify = nextSymbol.value;
lookAhead();
}
x.type = type();
variableDeclaratorId(x);
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ASTVariableDeclaratorId getVarId() {\n return (ASTVariableDeclaratorId) getChild(1);\n }",
"public final ValidateStateTransitionsParser.variableDeclarator_return variableDeclarator() throws RecognitionException {\r\n ValidateStateTransitionsParser.variableDeclarator_return retval = new ValidateStateTransitionsParser.variableDeclarator_return();\r\n retval.start = input.LT(1);\r\n\r\n int variableDeclarator_StartIndex = input.index();\r\n\r\n ValidateStateTransitionsParser_JavaTreeParser.variableDeclaratorId_return variableDeclaratorId8 =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 296) ) { return retval; }\r\n\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:288:5: ( ^( VAR_DECLARATOR variableDeclaratorId ( variableInitializer )? ) )\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:288:9: ^( VAR_DECLARATOR variableDeclaratorId ( variableInitializer )? )\r\n {\r\n match(input,VAR_DECLARATOR,FOLLOW_VAR_DECLARATOR_in_variableDeclarator867); if (state.failed) return retval;\r\n\r\n match(input, Token.DOWN, null); if (state.failed) return retval;\r\n pushFollow(FOLLOW_variableDeclaratorId_in_variableDeclarator881);\r\n variableDeclaratorId8=variableDeclaratorId();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n\r\n if ( state.backtracking==0 ) {\r\n retval.isState = (variableDeclaratorId8!=null?(input.getTokenStream().toString(input.getTreeAdaptor().getTokenStartIndex(variableDeclaratorId8.start),input.getTreeAdaptor().getTokenStopIndex(variableDeclaratorId8.start))):null).matches(getParamS(\"stateConstants\"));\r\n if (retval.isState){\r\n getLogger().fine(\"Detected state variable \"+(variableDeclaratorId8!=null?(input.getTokenStream().toString(input.getTreeAdaptor().getTokenStartIndex(variableDeclaratorId8.start),input.getTreeAdaptor().getTokenStopIndex(variableDeclaratorId8.start))):null));\r\n knownStates.put((variableDeclaratorId8!=null?(input.getTokenStream().toString(input.getTreeAdaptor().getTokenStartIndex(variableDeclaratorId8.start),input.getTreeAdaptor().getTokenStopIndex(variableDeclaratorId8.start))):null), new State((variableDeclaratorId8!=null?(input.getTokenStream().toString(input.getTreeAdaptor().getTokenStartIndex(variableDeclaratorId8.start),input.getTreeAdaptor().getTokenStopIndex(variableDeclaratorId8.start))):null)));\r\n // original declaration is deleted\r\n tokens.delete(\r\n input.getTreeAdaptor().getTokenStartIndex(((CommonTree)retval.start)),\r\n input.getTreeAdaptor().getTokenStopIndex(((CommonTree)retval.start))\r\n );\r\n }\r\n }\r\n\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:302:13: ( variableInitializer )?\r\n int alt16=2;\r\n int LA16_0 = input.LA(1);\r\n\r\n if ( (LA16_0==ARRAY_INITIALIZER||LA16_0==EXPR) ) {\r\n alt16=1;\r\n }\r\n switch (alt16) {\r\n case 1 :\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:302:13: variableInitializer\r\n {\r\n pushFollow(FOLLOW_variableInitializer_in_variableDeclarator909);\r\n variableInitializer();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input, Token.UP, null); if (state.failed) return retval;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 296, variableDeclarator_StartIndex); }\r\n\r\n }\r\n return retval;\r\n }",
"public final void variableDeclarator() throws RecognitionException {\n int variableDeclarator_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"variableDeclarator\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(384, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 43) ) { return ; }\n // Java.g:385:5: ( variableDeclaratorId ( '=' variableInitializer )? )\n dbg.enterAlt(1);\n\n // Java.g:385:9: variableDeclaratorId ( '=' variableInitializer )?\n {\n dbg.location(385,9);\n pushFollow(FOLLOW_variableDeclaratorId_in_variableDeclarator1682);\n variableDeclaratorId();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(385,30);\n // Java.g:385:30: ( '=' variableInitializer )?\n int alt58=2;\n try { dbg.enterSubRule(58);\n try { dbg.enterDecision(58);\n\n int LA58_0 = input.LA(1);\n\n if ( (LA58_0==51) ) {\n alt58=1;\n }\n } finally {dbg.exitDecision(58);}\n\n switch (alt58) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:385:31: '=' variableInitializer\n {\n dbg.location(385,31);\n match(input,51,FOLLOW_51_in_variableDeclarator1685); if (state.failed) return ;\n dbg.location(385,35);\n pushFollow(FOLLOW_variableInitializer_in_variableDeclarator1687);\n variableInitializer();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(58);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 43, variableDeclarator_StartIndex); }\n }\n dbg.location(386, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"variableDeclarator\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"private ASTVariableDeclaratorId getDeclaration(ASTLocalVariableDeclaration node) {\n ASTType type = node.getTypeNode();\n if (type != null) {\n if (MAP_CLASSES.keySet().contains(type.getTypeImage())) {\n return node.getFirstDescendantOfType(ASTVariableDeclaratorId.class);\n }\n }\n return null;\n }",
"public IString getVariableIdentifier() {\n\treturn VARIABLE_IDENTIFIER.get(getNd(), this.address);\n }",
"private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }",
"public void visit(VariableDeclaratorId n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }",
"public final void variableDeclaratorId() throws RecognitionException {\n int variableDeclaratorId_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"variableDeclaratorId\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(396, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 46) ) { return ; }\n // Java.g:397:5: ( Identifier ( '[' ']' )* )\n dbg.enterAlt(1);\n\n // Java.g:397:9: Identifier ( '[' ']' )*\n {\n dbg.location(397,9);\n match(input,Identifier,FOLLOW_Identifier_in_variableDeclaratorId1770); if (state.failed) return ;\n dbg.location(397,20);\n // Java.g:397:20: ( '[' ']' )*\n try { dbg.enterSubRule(61);\n\n loop61:\n do {\n int alt61=2;\n try { dbg.enterDecision(61);\n\n int LA61_0 = input.LA(1);\n\n if ( (LA61_0==48) ) {\n alt61=1;\n }\n\n\n } finally {dbg.exitDecision(61);}\n\n switch (alt61) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:397:21: '[' ']'\n \t {\n \t dbg.location(397,21);\n \t match(input,48,FOLLOW_48_in_variableDeclaratorId1773); if (state.failed) return ;\n \t dbg.location(397,25);\n \t match(input,49,FOLLOW_49_in_variableDeclaratorId1775); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop61;\n }\n } while (true);\n } finally {dbg.exitSubRule(61);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 46, variableDeclaratorId_StartIndex); }\n }\n dbg.location(398, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"variableDeclaratorId\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"String getVarDeclare();",
"public final Type id_type() throws RecognitionException {\r\n Type type = null;\r\n\r\n\r\n Token LOCAL_VARIABLE108=null;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:658:5: ( LOCAL_VARIABLE )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:658:7: LOCAL_VARIABLE\r\n {\r\n LOCAL_VARIABLE108=(Token)match(input,LOCAL_VARIABLE,FOLLOW_LOCAL_VARIABLE_in_id_type3717); \r\n\r\n type = typeFactory.getIDType((LOCAL_VARIABLE108!=null?LOCAL_VARIABLE108.getText():null));\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return type;\r\n }",
"public final EObject ruleStateVariableDeclaration() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_1_0=null;\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1166:6: ( ( 'var' ( (lv_name_1_0= RULE_ID ) ) ';' ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1167:1: ( 'var' ( (lv_name_1_0= RULE_ID ) ) ';' )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1167:1: ( 'var' ( (lv_name_1_0= RULE_ID ) ) ';' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1167:3: 'var' ( (lv_name_1_0= RULE_ID ) ) ';'\n {\n match(input,30,FOLLOW_30_in_ruleStateVariableDeclaration1939); \n\n createLeafNode(grammarAccess.getStateVariableDeclarationAccess().getVarKeyword_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1171:1: ( (lv_name_1_0= RULE_ID ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1172:1: (lv_name_1_0= RULE_ID )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1172:1: (lv_name_1_0= RULE_ID )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:1173:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)input.LT(1);\n match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleStateVariableDeclaration1956); \n\n \t\t\tcreateLeafNode(grammarAccess.getStateVariableDeclarationAccess().getNameIDTerminalRuleCall_1_0(), \"name\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getStateVariableDeclarationRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"name\",\n \t \t\tlv_name_1_0, \n \t \t\t\"ID\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n\n match(input,18,FOLLOW_18_in_ruleStateVariableDeclaration1971); \n\n createLeafNode(grammarAccess.getStateVariableDeclarationAccess().getSemicolonKeyword_2(), null); \n \n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final VarDecl varDecl() throws RecognitionException {\n\t\tVarDecl v = null;\n\n\n\t\tTypeNode t =null;\n\t\tId i =null;\n\n\t\ttry {\n\t\t\t// ul.g:78:27: (t= compoundType i= id SEMI )\n\t\t\t// ul.g:79:2: t= compoundType i= id SEMI\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_compoundType_in_varDecl261);\n\t\t\tt=compoundType();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return v;\n\t\t\tpushFollow(FOLLOW_id_in_varDecl267);\n\t\t\ti=id();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return v;\n\t\t\tmatch(input,SEMI,FOLLOW_SEMI_in_varDecl269); if (state.failed) return v;\n\t\t\tif ( state.backtracking==0 ) {v = new VarDecl(t, i, i.line, i.offset);}\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn v;\n\t}",
"public AssrtIntVarNameNode(int ttype, Token t)\n\t{\n\t\tsuper(t);\n\t}",
"private ELOperandToken readVarToken() {\r\n \t\tfState = STATE_VAR;\r\n \t\tint endOfToken = index;\r\n \t\tint ch;\r\n \t\tint type = ELOperandToken.EL_PROPERTY_NAME_TOKEN;\r\n \t\twhile((ch = readCharBackward()) != -1) {\r\n \t\t\tif (!Character.isJavaIdentifierPart(ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t\t\t}\r\n \t\t}\r\n \t\treleaseChar();\r\n \t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t}",
"public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}",
"public final JavaliParser.varDecl_return varDecl() throws RecognitionException {\n\t\tJavaliParser.varDecl_return retval = new JavaliParser.varDecl_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken Identifier14=null;\n\t\tToken char_literal15=null;\n\t\tToken Identifier16=null;\n\t\tToken char_literal17=null;\n\t\tToken Identifier18=null;\n\t\tToken char_literal19=null;\n\t\tParserRuleReturnScope declStart =null;\n\n\t\tObject Identifier14_tree=null;\n\t\tObject char_literal15_tree=null;\n\t\tObject Identifier16_tree=null;\n\t\tObject char_literal17_tree=null;\n\t\tObject Identifier18_tree=null;\n\t\tObject char_literal19_tree=null;\n\t\tRewriteRuleTokenStream stream_77=new RewriteRuleTokenStream(adaptor,\"token 77\");\n\t\tRewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,\"token 73\");\n\t\tRewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,\"token Identifier\");\n\t\tRewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,\"rule type\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:275:2: (declStart= type Identifier ';' -> ^( VarDecl[$declStart.start, \\\"VarDecl\\\"] type Identifier ) |declStart= type Identifier ( ',' Identifier )+ ';' -> ^( VarDeclList[$declStart.start, \\\"VarDeclList\\\"] type ( Identifier )+ ) )\n\t\t\tint alt7=2;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase 92:\n\t\t\t\t{\n\t\t\t\tint LA7_1 = input.LA(2);\n\t\t\t\tif ( (LA7_1==Identifier) ) {\n\t\t\t\t\tint LA7_5 = input.LA(3);\n\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\talt7=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\talt7=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA7_1==84) ) {\n\t\t\t\t\tint LA7_6 = input.LA(3);\n\t\t\t\t\tif ( (LA7_6==85) ) {\n\t\t\t\t\t\tint LA7_10 = input.LA(4);\n\t\t\t\t\t\tif ( (LA7_10==Identifier) ) {\n\t\t\t\t\t\t\tint LA7_5 = input.LA(5);\n\t\t\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\t\t\talt7=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 10, input);\n\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 6, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 1, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 90:\n\t\t\t\t{\n\t\t\t\tint LA7_2 = input.LA(2);\n\t\t\t\tif ( (LA7_2==Identifier) ) {\n\t\t\t\t\tint LA7_5 = input.LA(3);\n\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\talt7=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\talt7=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA7_2==84) ) {\n\t\t\t\t\tint LA7_6 = input.LA(3);\n\t\t\t\t\tif ( (LA7_6==85) ) {\n\t\t\t\t\t\tint LA7_10 = input.LA(4);\n\t\t\t\t\t\tif ( (LA7_10==Identifier) ) {\n\t\t\t\t\t\t\tint LA7_5 = input.LA(5);\n\t\t\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\t\t\talt7=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 10, input);\n\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 6, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 2, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 86:\n\t\t\t\t{\n\t\t\t\tint LA7_3 = input.LA(2);\n\t\t\t\tif ( (LA7_3==Identifier) ) {\n\t\t\t\t\tint LA7_5 = input.LA(3);\n\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\talt7=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\talt7=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA7_3==84) ) {\n\t\t\t\t\tint LA7_6 = input.LA(3);\n\t\t\t\t\tif ( (LA7_6==85) ) {\n\t\t\t\t\t\tint LA7_10 = input.LA(4);\n\t\t\t\t\t\tif ( (LA7_10==Identifier) ) {\n\t\t\t\t\t\t\tint LA7_5 = input.LA(5);\n\t\t\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\t\t\talt7=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 10, input);\n\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 6, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 3, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase Identifier:\n\t\t\t\t{\n\t\t\t\tint LA7_4 = input.LA(2);\n\t\t\t\tif ( (LA7_4==84) ) {\n\t\t\t\t\tint LA7_7 = input.LA(3);\n\t\t\t\t\tif ( (LA7_7==85) ) {\n\t\t\t\t\t\tint LA7_11 = input.LA(4);\n\t\t\t\t\t\tif ( (LA7_11==Identifier) ) {\n\t\t\t\t\t\t\tint LA7_5 = input.LA(5);\n\t\t\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\t\t\talt7=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 11, input);\n\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 7, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA7_4==Identifier) ) {\n\t\t\t\t\tint LA7_5 = input.LA(3);\n\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\talt7=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\talt7=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 4, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 7, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt7) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:275:4: declStart= type Identifier ';'\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_type_in_varDecl392);\n\t\t\t\t\tdeclStart=type();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_type.add(declStart.getTree());\n\t\t\t\t\tIdentifier14=(Token)match(input,Identifier,FOLLOW_Identifier_in_varDecl394); \n\t\t\t\t\tstream_Identifier.add(Identifier14);\n\n\t\t\t\t\tchar_literal15=(Token)match(input,77,FOLLOW_77_in_varDecl396); \n\t\t\t\t\tstream_77.add(char_literal15);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: type, Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 276:3: -> ^( VarDecl[$declStart.start, \\\"VarDecl\\\"] type Identifier )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:276:6: ^( VarDecl[$declStart.start, \\\"VarDecl\\\"] type Identifier )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VarDecl, (declStart!=null?(declStart.start):null), \"VarDecl\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_type.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_Identifier.nextNode());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:277:4: declStart= type Identifier ( ',' Identifier )+ ';'\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_type_in_varDecl418);\n\t\t\t\t\tdeclStart=type();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_type.add(declStart.getTree());\n\t\t\t\t\tIdentifier16=(Token)match(input,Identifier,FOLLOW_Identifier_in_varDecl420); \n\t\t\t\t\tstream_Identifier.add(Identifier16);\n\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:277:30: ( ',' Identifier )+\n\t\t\t\t\tint cnt6=0;\n\t\t\t\t\tloop6:\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tint alt6=2;\n\t\t\t\t\t\tint LA6_0 = input.LA(1);\n\t\t\t\t\t\tif ( (LA6_0==73) ) {\n\t\t\t\t\t\t\talt6=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (alt6) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:277:32: ',' Identifier\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchar_literal17=(Token)match(input,73,FOLLOW_73_in_varDecl424); \n\t\t\t\t\t\t\tstream_73.add(char_literal17);\n\n\t\t\t\t\t\t\tIdentifier18=(Token)match(input,Identifier,FOLLOW_Identifier_in_varDecl426); \n\t\t\t\t\t\t\tstream_Identifier.add(Identifier18);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\tif ( cnt6 >= 1 ) break loop6;\n\t\t\t\t\t\t\tEarlyExitException eee = new EarlyExitException(6, input);\n\t\t\t\t\t\t\tthrow eee;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcnt6++;\n\t\t\t\t\t}\n\n\t\t\t\t\tchar_literal19=(Token)match(input,77,FOLLOW_77_in_varDecl431); \n\t\t\t\t\tstream_77.add(char_literal19);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: Identifier, type\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 278:3: -> ^( VarDeclList[$declStart.start, \\\"VarDeclList\\\"] type ( Identifier )+ )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:278:6: ^( VarDeclList[$declStart.start, \\\"VarDeclList\\\"] type ( Identifier )+ )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VarDeclList, (declStart!=null?(declStart.start):null), \"VarDeclList\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_type.nextTree());\n\t\t\t\t\t\tif ( !(stream_Identifier.hasNext()) ) {\n\t\t\t\t\t\t\tthrow new RewriteEarlyExitException();\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile ( stream_Identifier.hasNext() ) {\n\t\t\t\t\t\t\tadaptor.addChild(root_1, stream_Identifier.nextNode());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstream_Identifier.reset();\n\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}",
"@Override\n public String visit(VariableDeclarator n, Object arg) {\n return null;\n }",
"VariableDeclaration createVariableDeclaration();",
"public StatementType getStatementType()\n\t{\n\t\treturn StatementType.VARIABLE_DECLARATION_STATEMENT;\n\t}",
"public void var_decl(VarDeclList vd, Integer lg) {\n if (lexer.token == Symbol.FLOAT || lexer.token == Symbol.INT) {\n String temp = lexer.getStringValue();\n lexer.nextToken();\n IdList list = id_list(lg);\n ArrayList<Ident> iter = list.getIdList();\n \n //entra aqui se nenhuma variavel declarada em id_list já existe\n for(Ident x: iter){\n switch(lg) {\n case 1:\n symbolTable.putInGlobal(x.getName(), new Type(temp, false));\n break;\n case 2:\n symbolTable.putInLocal(x.getName(), temp);\n break;\n }\n }\n vd.addDecl(new VarDecl(temp, list));\n if (lexer.token != Symbol.SEMICOLON) {\n error.signal(\"Missing end of declaration at variable declaration\");\n }\n lexer.nextToken();\n }\n }",
"VarDecl createVarDecl();",
"@Override\r\n\tpublic void visit(VariableDeclaration variableDeclaration) {\n\r\n\t}",
"public final EObject ruleVariableDeclaration() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_1_0=null;\n Token otherlv_2=null;\n EObject lv_type_0_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3266:28: ( ( ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:1: ( ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:1: ( ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:2: ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';'\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:2: ( (lv_type_0_0= ruleDataType ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3268:1: (lv_type_0_0= ruleDataType )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3268:1: (lv_type_0_0= ruleDataType )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3269:3: lv_type_0_0= ruleDataType\n {\n \n \t newCompositeNode(grammarAccess.getVariableDeclarationAccess().getTypeDataTypeParserRuleCall_0_0()); \n \t \n pushFollow(FOLLOW_ruleDataType_in_ruleVariableDeclaration7352);\n lv_type_0_0=ruleDataType();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getVariableDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"type\",\n \t\tlv_type_0_0, \n \t\t\"DataType\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3285:2: ( (lv_name_1_0= RULE_ID ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3286:1: (lv_name_1_0= RULE_ID )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3286:1: (lv_name_1_0= RULE_ID )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3287:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleVariableDeclaration7369); \n\n \t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getVariableDeclarationAccess().getNameIDTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getVariableDeclarationRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"name\",\n \t\tlv_name_1_0, \n \t\t\"ID\");\n \t \n\n }\n\n\n }\n\n otherlv_2=(Token)match(input,18,FOLLOW_18_in_ruleVariableDeclaration7386); \n\n \tnewLeafNode(otherlv_2, grammarAccess.getVariableDeclarationAccess().getSemicolonKeyword_2());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final String varDecl(ArrayList<String> list) throws RecognitionException {\n\t\tString out = null;\n\n\n\t\tCommonTree TYPE6=null;\n\t\tCommonTree ID7=null;\n\n\n\t\t\tout = \"\";\n\n\t\ttry {\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:131:2: ( ^( VARDECL TYPE ID ) )\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:131:4: ^( VARDECL TYPE ID )\n\t\t\t{\n\t\t\tmatch(input,VARDECL,FOLLOW_VARDECL_in_varDecl210); \n\t\t\tmatch(input, Token.DOWN, null); \n\t\t\tTYPE6=(CommonTree)match(input,TYPE,FOLLOW_TYPE_in_varDecl212); \n\t\t\tID7=(CommonTree)match(input,ID,FOLLOW_ID_in_varDecl214); \n\t\t\tmatch(input, Token.UP, null); \n\n\n\t\t\t\t\t\tString type = \"\";\n\t\t\t\t\t\tif ((TYPE6!=null?TYPE6.getText():null).equals(\"COUNT\")) {\n\t\t\t\t\t\t\ttype = \"int\";\n\t\t\t\t\t\t} else if ((TYPE6!=null?TYPE6.getText():null).equals(\"TRUTH\")) {\n\t\t\t\t\t\t\ttype = \"boolean\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (inMethod) {\n\t\t\t\t\t\t\tif (inDynamicScope((ID7!=null?ID7.getText():null))) { // if already defined\n\t\t\t\t\t\t\t\t// if local\n\t\t\t\t\t\t\t\tif (Scope_stack.peek().scopeMap.containsKey((ID7!=null?ID7.getText():null))) {\n\t\t\t\t\t\t\t\t\t// and not same type\n\t\t\t\t\t\t\t\t\tif (!Scope_stack.peek().scopeMap.get((ID7!=null?ID7.getText():null)).equals((TYPE6!=null?TYPE6.getText():null))) {\n\t\t\t\t\t\t\t\t\t\tlist.add(type + \" _\" + (ID7!=null?ID7.getText():null) + \";\");\n\t\t\t\t\t\t\t\t\t} else {\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} else { // global\n\t\t\t\t\t\t\t\t\tlist.add(type + \" local_\" + (ID7!=null?ID7.getText():null) + \";\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlist.add(type + \" _\" + (ID7!=null?ID7.getText():null) + \";\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tout = \"static \" + type + \" _\" + (ID7!=null?ID7.getText():null) + \";\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn out;\n\t}",
"public IVariable getVariable(Integer id) {\n return null;\n }",
"public final EObject ruleIterationVariable() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5497:6: ( ( (lv_name_0_0= RULE_ID ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5498:1: ( (lv_name_0_0= RULE_ID ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5498:1: ( (lv_name_0_0= RULE_ID ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5499:1: (lv_name_0_0= RULE_ID )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5499:1: (lv_name_0_0= RULE_ID )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5500:3: lv_name_0_0= RULE_ID\n {\n lv_name_0_0=(Token)input.LT(1);\n match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleIterationVariable9594); \n\n \t\t\tcreateLeafNode(grammarAccess.getIterationVariableAccess().getNameIDTerminalRuleCall_0(), \"name\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getIterationVariableRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"name\",\n \t \t\tlv_name_0_0, \n \t \t\t\"ID\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"@Override\n public CodeFragment visitBlockVarDec(AlangParser.BlockVarDecContext ctx) {\n String name = ctx.ID().getText();\n\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n int arity = ctx.index_to_array().size();\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n String reg = this.generateNewRegister(false);\n\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n v.setArity(arity);\n this.vars.get(this.scope).put(name, v);\n\n CodeFragment result = new CodeFragment();\n result.setRegister(reg);\n if (llvmvartype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n\n if (arity > 0) {\n /* alloca n-dimensional array[a1]...[an] on stack with size a1*a2*...*an */\n v.setLocalArray();\n String prevreg = this.generateNewRegister(false);\n String newreg;\n result.addCode(String.format(\"%s = add i32 0, 1\\n\", prevreg));\n for (int i = 0; i < arity; i++) {\n CodeFragment exp = visit(ctx.index_to_array(i).expression());\n result.addCode(exp);\n v.addLevelReg(exp.getRegister());\n\n newreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", newreg, prevreg, exp.getRegister()));\n prevreg = newreg;\n }\n result.addCode(String.format(\"%s = alloca %s, i32 %s\\n\", reg, llvmvartype, prevreg));\n return result;\n }\n\n return this.generateNewDeclaration(reg, v.getLLVMDeclareType());\n }",
"@Override String opStr() { return \"var\"; }",
"public VariableIF createVariable(VariableDecl decl);",
"VariableDeclarationWithInitCS getResultVariable();",
"private VariableDeclaration getVarDeclaration(Element statement) {\n VariableDeclaration variableDeclaration = statement.nearestAncestor(VariableDeclaration.class);\n if (variableDeclaration == null) {\n return getNearestElement(statement, VariableDeclaration.class);\n } else {\n return variableDeclaration;\n }\n }",
"public final ValidateStateTransitionsParser.variableDeclaratorList_return variableDeclaratorList() throws RecognitionException {\r\n ValidateStateTransitionsParser.variableDeclaratorList_return retval = new ValidateStateTransitionsParser.variableDeclaratorList_return();\r\n retval.start = input.LT(1);\r\n\r\n int variableDeclaratorList_StartIndex = input.index();\r\n\r\n ValidateStateTransitionsParser.variableDeclarator_return variableDeclarator7 =null;\r\n\r\n\r\n\r\n retval.onlyStates = true;\r\n \r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 295) ) { return retval; }\r\n\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:277:5: ( ^( VAR_DECLARATOR_LIST ( variableDeclarator )+ ) )\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:277:9: ^( VAR_DECLARATOR_LIST ( variableDeclarator )+ )\r\n {\r\n match(input,VAR_DECLARATOR_LIST,FOLLOW_VAR_DECLARATOR_LIST_in_variableDeclaratorList767); if (state.failed) return retval;\r\n\r\n match(input, Token.DOWN, null); if (state.failed) return retval;\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:278:13: ( variableDeclarator )+\r\n int cnt15=0;\r\n loop15:\r\n do {\r\n int alt15=2;\r\n int LA15_0 = input.LA(1);\r\n\r\n if ( (LA15_0==VAR_DECLARATOR) ) {\r\n alt15=1;\r\n }\r\n\r\n\r\n switch (alt15) {\r\n \tcase 1 :\r\n \t // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:279:17: variableDeclarator\r\n \t {\r\n \t pushFollow(FOLLOW_variableDeclarator_in_variableDeclaratorList799);\r\n \t variableDeclarator7=variableDeclarator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n\r\n \t if ( state.backtracking==0 ) {retval.onlyStates =retval.onlyStates && (variableDeclarator7!=null?variableDeclarator7.isState:false);}\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t if ( cnt15 >= 1 ) break loop15;\r\n \t if (state.backtracking>0) {state.failed=true; return retval;}\r\n EarlyExitException eee =\r\n new EarlyExitException(15, input);\r\n throw eee;\r\n }\r\n cnt15++;\r\n } while (true);\r\n\r\n\r\n match(input, Token.UP, null); if (state.failed) return retval;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 295, variableDeclaratorList_StartIndex); }\r\n\r\n }\r\n return retval;\r\n }",
"public final void variableDeclarators() throws RecognitionException {\n int variableDeclarators_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"variableDeclarators\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(380, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 42) ) { return ; }\n // Java.g:381:5: ( variableDeclarator ( ',' variableDeclarator )* )\n dbg.enterAlt(1);\n\n // Java.g:381:9: variableDeclarator ( ',' variableDeclarator )*\n {\n dbg.location(381,9);\n pushFollow(FOLLOW_variableDeclarator_in_variableDeclarators1656);\n variableDeclarator();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(381,28);\n // Java.g:381:28: ( ',' variableDeclarator )*\n try { dbg.enterSubRule(57);\n\n loop57:\n do {\n int alt57=2;\n try { dbg.enterDecision(57);\n\n int LA57_0 = input.LA(1);\n\n if ( (LA57_0==41) ) {\n alt57=1;\n }\n\n\n } finally {dbg.exitDecision(57);}\n\n switch (alt57) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:381:29: ',' variableDeclarator\n \t {\n \t dbg.location(381,29);\n \t match(input,41,FOLLOW_41_in_variableDeclarators1659); if (state.failed) return ;\n \t dbg.location(381,33);\n \t pushFollow(FOLLOW_variableDeclarator_in_variableDeclarators1661);\n \t variableDeclarator();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop57;\n }\n } while (true);\n } finally {dbg.exitSubRule(57);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 42, variableDeclarators_StartIndex); }\n }\n dbg.location(382, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"variableDeclarators\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public String isVar(Exp e) {\n if (e instanceof EId) {\n return ((EId) e).id_;\n } else\n throw new TypeException(\"Expected variable but found: \" + e);\n }",
"public IdentificationVariableDeclaration(AbstractExpression parent) {\r\n\t\tsuper(parent);\r\n\t}",
"public void visit(VariableDeclarator n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }",
"private Integer varOffset( String defun, String varname ) {\n\treturn symbolTable.get( defun ).get( varname );\n }",
"void declaration() {\n\t\tString theToken = currentToken();\r\n\r\n\t\tif (theToken.equals(\"int\") || theToken.equals(\"void\")) {\r\n\t\t\ttypeSpeci();\r\n\t\t\taccept(\"ID\");\r\n\t\t\ttheToken = currentToken();\r\n\t\t\tif (theToken.equals(\";\") || theToken.equals(\"[\"))\r\n\t\t\t\tvarDec();\r\n\r\n\t\t\t// if int ID ( param ) compoundStatment\r\n\t\t\telse if (theToken.equals(\"(\"))\r\n\t\t\t\tfunDec();\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\treturn;\r\n\t}",
"public final void rule__AstVariableReference__VariableAssignment() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26149:1: ( ( ( RULE_ID ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26150:1: ( ( RULE_ID ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26150:1: ( ( RULE_ID ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26151:1: ( RULE_ID )\n {\n before(grammarAccess.getAstVariableReferenceAccess().getVariableAstVariableCrossReference_0()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26152:1: ( RULE_ID )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:26153:1: RULE_ID\n {\n before(grammarAccess.getAstVariableReferenceAccess().getVariableAstVariableIDTerminalRuleCall_0_1()); \n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__AstVariableReference__VariableAssignment52578); \n after(grammarAccess.getAstVariableReferenceAccess().getVariableAstVariableIDTerminalRuleCall_0_1()); \n\n }\n\n after(grammarAccess.getAstVariableReferenceAccess().getVariableAstVariableCrossReference_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__AstActorVariableReference__VariableAssignment() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23129:1: ( ( ( RULE_ID ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23130:1: ( ( RULE_ID ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23130:1: ( ( RULE_ID ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23131:1: ( RULE_ID )\n {\n before(grammarAccess.getAstActorVariableReferenceAccess().getVariableAstActorVariableCrossReference_0()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23132:1: ( RULE_ID )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23133:1: RULE_ID\n {\n before(grammarAccess.getAstActorVariableReferenceAccess().getVariableAstActorVariableIDTerminalRuleCall_0_1()); \n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__AstActorVariableReference__VariableAssignment46362); \n after(grammarAccess.getAstActorVariableReferenceAccess().getVariableAstActorVariableIDTerminalRuleCall_0_1()); \n\n }\n\n after(grammarAccess.getAstActorVariableReferenceAccess().getVariableAstActorVariableCrossReference_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"VarsDeclRule createVarsDeclRule();",
"public VarDecl(List<Token> identifiers, Type varType, ScopeLevel scopeLevel)\n {\n super(null, varType);\n\n singleVarDecls = new ArrayList<>(identifiers.size());\n for (Token id : identifiers)\n singleVarDecls.add(new SingleVarDecl(id, varType, scopeLevel));\n }",
"private static boolean VarDecl_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"VarDecl_1_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = MarklogicAnnotation(b, l + 1);\n if (!r) r = CompatibilityAnnotation(b, l + 1);\n if (!r) r = Annotation(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"String getVariableDefinition();",
"public java.lang.Integer getVar231() {\n return var231;\n }",
"Node getVariable();",
"private void variableDeclaratorRest(VariableType x, Scope scope, Vector queue)\r\n {\r\n x.type.dim += bracketsOpt();\r\n if (nextSymbol == Keyword.ASSIGNSY)\r\n {\r\n Operation node, root = new Operation();\r\n root.operator = (x.modify & Keyword.FINALSY.value) == 0?Keyword.ASSIGNSY:Keyword.FINALASSIGNSY;\r\n\r\n node = root.left = new Operation();\r\n\r\n node.operator = Keyword.LEAFSY;\r\n node = node.left = new Operation();\r\n node = node.left = new Operation();\r\n node = node.left = new Operation();\r\n\r\n node.name = x.name;\r\n node.type = x.type;\r\n\r\n lookAhead();\r\n\r\n root.right = variableIntitializer(x.type, x.type.dim, scope, queue);\r\n\r\n queue.add(root);\r\n\r\n root = new Operation();\r\n root.operator = Keyword.CLEARSY;\r\n queue.add(root);\r\n }\r\n }",
"public static boolean VarDecl(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"VarDecl\")) return false;\n if (!nextTokenIs(b, K_DECLARE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, VAR_DECL, null);\n r = consumeToken(b, K_DECLARE);\n r = r && VarDecl_1(b, l + 1);\n r = r && consumeTokens(b, 1, K_VARIABLE, DOLLAR_SIGN);\n p = r; // pin = 3\n r = r && report_error_(b, VarName(b, l + 1));\n r = p && report_error_(b, VarDecl_5(b, l + 1)) && r;\n r = p && report_error_(b, VarDecl_6(b, l + 1)) && r;\n r = p && Separator(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public final AliaChecker.varlist_return varlist() throws RecognitionException {\n\t\tAliaChecker.varlist_return retval = new AliaChecker.varlist_return();\n\t\tretval.start = input.LT(1);\n\n\t\tCommonTree root_0 = null;\n\n\t\tCommonTree _first_0 = null;\n\t\tCommonTree _last = null;\n\n\n\t\tTreeRuleReturnScope t =null;\n\t\tTreeRuleReturnScope identifier19 =null;\n\n\n\t\ttry {\n\t\t\t// src\\\\alia\\\\AliaChecker.g:245:2: (t= identifier ( identifier )* )\n\t\t\t// src\\\\alia\\\\AliaChecker.g:245:4: t= identifier ( identifier )*\n\t\t\t{\n\t\t\troot_0 = (CommonTree)adaptor.nil();\n\n\n\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\tpushFollow(FOLLOW_identifier_in_varlist1519);\n\t\t\tt=identifier();\n\t\t\tstate._fsp--;\n\n\t\t\tadaptor.addChild(root_0, t.getTree());\n\n\n\t\t\t\t\t\tretval.type = (t!=null?((AliaChecker.identifier_return)t).type:null);\n\t\t\t\t\t\n\t\t\t// src\\\\alia\\\\AliaChecker.g:249:3: ( identifier )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==IDENTIFIER) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// src\\\\alia\\\\AliaChecker.g:249:4: identifier\n\t\t\t\t\t{\n\t\t\t\t\t_last = (CommonTree)input.LT(1);\n\t\t\t\t\tpushFollow(FOLLOW_identifier_in_varlist1528);\n\t\t\t\t\tidentifier19=identifier();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tadaptor.addChild(root_0, identifier19.getTree());\n\n\n\t\t\t\t\t\t\t\t\tretval.type = new _Void();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tretval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n\n\t\t}\n\t\t \n\t\t catch (RecognitionException e) { \n\t\t \tif(!e.getMessage().equals(\"\")) {\n\t\t\t\t\tSystem.err.println(\"Exception!:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow (new AliaException(\"\"));\n\t\t } \n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}",
"public final EObject ruleInferredVarDeclaration() throws RecognitionException {\n EObject current = null;\n int ruleInferredVarDeclaration_StartIndex = input.index();\n Token lv_name_1_0=null;\n EObject lv_type_0_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 50) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2411:28: ( ( ( (lv_type_0_0= ruleType ) )? ( (lv_name_1_0= RULE_ID ) ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2412:1: ( ( (lv_type_0_0= ruleType ) )? ( (lv_name_1_0= RULE_ID ) ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2412:1: ( ( (lv_type_0_0= ruleType ) )? ( (lv_name_1_0= RULE_ID ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2412:2: ( (lv_type_0_0= ruleType ) )? ( (lv_name_1_0= RULE_ID ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2412:2: ( (lv_type_0_0= ruleType ) )?\n int alt50=2;\n alt50 = dfa50.predict(input);\n switch (alt50) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2413:1: (lv_type_0_0= ruleType )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2413:1: (lv_type_0_0= ruleType )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2414:3: lv_type_0_0= ruleType\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getInferredVarDeclarationAccess().getTypeTypeParserRuleCall_0_0()); \n \t \n }\n pushFollow(FOLLOW_ruleType_in_ruleInferredVarDeclaration4790);\n lv_type_0_0=ruleType();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getInferredVarDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"type\",\n \t\tlv_type_0_0, \n \t\t\"Type\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n break;\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2430:3: ( (lv_name_1_0= RULE_ID ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2431:1: (lv_name_1_0= RULE_ID )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2431:1: (lv_name_1_0= RULE_ID )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2432:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleInferredVarDeclaration4808); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getInferredVarDeclarationAccess().getNameIDTerminalRuleCall_1_0()); \n \t\t\n }\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getInferredVarDeclarationRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"name\",\n \t\tlv_name_1_0, \n \t\t\"ID\");\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 50, ruleInferredVarDeclaration_StartIndex); }\n }\n return current;\n }",
"public java.lang.Integer getVar231() {\n return var231;\n }",
"public VariableDeclarationElements getVariableDeclarationAccess() {\r\n\t\treturn pVariableDeclaration;\r\n\t}",
"public java.lang.CharSequence getVar243() {\n return var243;\n }",
"@Override\n\tpublic Void visit(LetVar letvar) {\n\t\tprintIndent(\"local\");\n\t\tindent++;\n\t\tletvar.id.accept(this);\n\t\tletvar.type.accept(this);\n\t\tif (letvar.expr != null)\n\t\t\tletvar.expr.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"public Integer getId()\r\n/* */ {\r\n/* 114 */ return this.id;\r\n/* */ }",
"public Rule localDef()\n \t{\n\t\treturn sequence(\n\t\t\t\tfirstOf(\n\t\t\t\t\tsequence(typeAndOrId(), enforcedSequence(OP_ASSIGN, expr())),\n\t\t\t\t\tsequence(type(), id())),\n \t\t\t\teos());\n \t}",
"public void varDecl(StmtVarDecl stmt)\n {\n for (int i = 0; i < stmt.getNumVars(); i++)\n {\n String nm = stmt.getName(i);\n Type vt = (Type)stmt.getType(i).accept(this);\n state.varDeclare(nm, vt);\n }\n }",
"public java.lang.CharSequence getVar243() {\n return var243;\n }",
"Identifier getId();",
"public java.lang.CharSequence getVar44() {\n return var44;\n }",
"public String visit(VarDeclaration n, String ourclass) {\n String type, name;\n type = n.f0.accept(this, null);\n name = n.f1.accept(this, null);\n if(!ourclass.contains(\" \")){ //class members variables\n vcounter ++;\n integer++;\n variable x = new variable(type, name, vcounter, integer);\n ClassMembers cm = st.cmgetST(ourclass);\n if(cm.checkSameVar(x)){\n System.out.println(\"Variable already exists\");\n return null;\n }\n cm.var.add(x);\n st.cmputST(ourclass, cm);\n }\n else{ //method's variables\n integer++;\n variable x = new variable(type, name, integer);\n String[] parts = ourclass.split(\" \");\n String classname = parts[0]; \n String methodname = parts[1];\n ClassMembers cm=st.cmgetST(classname);\n Method m=cm.meth.get(methodname);\n m.localvars.add(x);\n cm.meth.put(methodname, m);\n st.cmputST(classname, cm);\n }\n return null; \n }",
"private static boolean VarDecl_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"VarDecl_1\")) return false;\n int c = current_position_(b);\n while (true) {\n if (!VarDecl_1_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"VarDecl_1\", c)) break;\n c = current_position_(b);\n }\n return true;\n }",
"@Override\n public Object visitVarSingleDeclarationAST(MiParser.VarSingleDeclarationASTContext ctx) {\n int tipo =(int) visit(ctx.typeDenoter());\n tabla.insertar(ctx.IDENT().getSymbol(),tipo,ctx);\n return null;\n }",
"public final EObject ruleLoopVariable() throws RecognitionException {\n EObject current = null;\n int ruleLoopVariable_StartIndex = input.index();\n EObject lv_vardecl_0_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 72) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3384:28: ( ( (lv_vardecl_0_0= ruleVarDeclaration ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3385:1: ( (lv_vardecl_0_0= ruleVarDeclaration ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3385:1: ( (lv_vardecl_0_0= ruleVarDeclaration ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3386:1: (lv_vardecl_0_0= ruleVarDeclaration )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3386:1: (lv_vardecl_0_0= ruleVarDeclaration )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3387:3: lv_vardecl_0_0= ruleVarDeclaration\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getLoopVariableAccess().getVardeclVarDeclarationParserRuleCall_0()); \n \t \n }\n pushFollow(FOLLOW_ruleVarDeclaration_in_ruleLoopVariable6715);\n lv_vardecl_0_0=ruleVarDeclaration();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getLoopVariableRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"vardecl\",\n \t\tlv_vardecl_0_0, \n \t\t\"VarDeclaration\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 72, ruleLoopVariable_StartIndex); }\n }\n return current;\n }",
"public final void rule__XSwitchExpression__LocalVarNameAssignment_2_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12811:1: ( ( RULE_ID ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12812:1: ( RULE_ID )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12812:1: ( RULE_ID )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12813:1: RULE_ID\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSwitchExpressionAccess().getLocalVarNameIDTerminalRuleCall_2_0_0()); \n }\n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__XSwitchExpression__LocalVarNameAssignment_2_025718); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSwitchExpressionAccess().getLocalVarNameIDTerminalRuleCall_2_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"int getIdentifier();",
"@Override\n public CodeFragment visitVarDecStat(AlangParser.VarDecStatContext ctx) {\n String name = ctx.ID().getText();\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n\n String reg = this.generateNewRegister(true);\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n\n int arity = ctx.index_to_global_array().size();\n v.setArity(arity);\n if (arity > 0) {\n v.setGlobalArray();\n }\n\n for (int i = 0; i < arity; i++) {\n v.addLevel(Integer.valueOf(ctx.index_to_global_array(i).INT().getText()));\n }\n\n this.globals.put(name, v);\n\n return new CodeFragment(\"\");\n }",
"public java.lang.CharSequence getVar44() {\n return var44;\n }",
"public Element compileVarDec() {\n\t\tElement ele = null;\n\t\tString type;\n\t\tString token, tokenType;\n\n\t\tElement varDecParent = document.createElement(\"varDec\");\n\n\t\t// \"var\"\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tvarDecParent.appendChild(ele);\n\n\t\t// The type of the var\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\ttype = token;\n\t\tele = createXMLnode(tokenType);\n\t\tvarDecParent.appendChild(ele);\n\n\t\t// The variable identifiers themselves until ;\n\n\t\twhile (!token.equals(\";\")) {\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tvarDecParent.appendChild(ele);\n\t\t\tif (!token.equals(\",\") && !token.equals(\";\")) {\n\t\t\t\t// Adding the variables to the symboltable\n\t\t\t\tsymTable.define(token, type, \"local\");\n\t\t\t}\n\t\t}\n\n\t\treturn varDecParent;\n\n\t}",
"public void methodIdentifier( int variableIdentifier1\n , char variableIdentifier2\n , boolean variableIdentifier3\n , ClassIdentifier3 variableIdentifier4\n )\n {\n //<block statements>\n }",
"public final void rule__VarDecl__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:9251:1: ( ( 'var' ) )\r\n // InternalGo.g:9252:1: ( 'var' )\r\n {\r\n // InternalGo.g:9252:1: ( 'var' )\r\n // InternalGo.g:9253:2: 'var'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getVarDeclAccess().getVarKeyword_1()); \r\n }\r\n match(input,76,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getVarDeclAccess().getVarKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"protected void sequence_VarDecl(ISerializationContext context, VarDecl semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}",
"public java.lang.CharSequence getVar233() {\n return var233;\n }",
"public LocalVariableGen addLocalVariable2(String name, Type type, InstructionHandle start) {\n/* 177 */ return addLocalVariable(name, type, this._slotAllocator.allocateSlot(type), start, null);\n/* */ }",
"VarAssignment createVarAssignment();",
"public String variable()\n\t{\n\t\treturn _var;\n\t}",
"public java.lang.CharSequence getVar216() {\n return var216;\n }",
"public java.lang.CharSequence getVar233() {\n return var233;\n }",
"public /*@Nullable*/ VariableTree getDeclaration() {\n return decl;\n }",
"public java.lang.CharSequence getVar216() {\n return var216;\n }",
"public final EObject ruleLetExpressionVariableDeclaration() throws RecognitionException {\n EObject current = null;\n\n Token lv_names_0_0=null;\n Token lv_names_2_0=null;\n Token lv_names_4_0=null;\n EObject lv_assignedExpression_7_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2649:6: ( ( ( ( (lv_names_0_0= RULE_ID ) ) | ( '(' ( (lv_names_2_0= RULE_ID ) ) ( ',' ( (lv_names_4_0= RULE_ID ) ) )+ ')' ) ) '=' ( (lv_assignedExpression_7_0= ruleExpression ) ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2650:1: ( ( ( (lv_names_0_0= RULE_ID ) ) | ( '(' ( (lv_names_2_0= RULE_ID ) ) ( ',' ( (lv_names_4_0= RULE_ID ) ) )+ ')' ) ) '=' ( (lv_assignedExpression_7_0= ruleExpression ) ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2650:1: ( ( ( (lv_names_0_0= RULE_ID ) ) | ( '(' ( (lv_names_2_0= RULE_ID ) ) ( ',' ( (lv_names_4_0= RULE_ID ) ) )+ ')' ) ) '=' ( (lv_assignedExpression_7_0= ruleExpression ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2650:2: ( ( (lv_names_0_0= RULE_ID ) ) | ( '(' ( (lv_names_2_0= RULE_ID ) ) ( ',' ( (lv_names_4_0= RULE_ID ) ) )+ ')' ) ) '=' ( (lv_assignedExpression_7_0= ruleExpression ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2650:2: ( ( (lv_names_0_0= RULE_ID ) ) | ( '(' ( (lv_names_2_0= RULE_ID ) ) ( ',' ( (lv_names_4_0= RULE_ID ) ) )+ ')' ) )\n int alt42=2;\n int LA42_0 = input.LA(1);\n\n if ( (LA42_0==RULE_ID) ) {\n alt42=1;\n }\n else if ( (LA42_0==25) ) {\n alt42=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"2650:2: ( ( (lv_names_0_0= RULE_ID ) ) | ( '(' ( (lv_names_2_0= RULE_ID ) ) ( ',' ( (lv_names_4_0= RULE_ID ) ) )+ ')' ) )\", 42, 0, input);\n\n throw nvae;\n }\n switch (alt42) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2650:3: ( (lv_names_0_0= RULE_ID ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2650:3: ( (lv_names_0_0= RULE_ID ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2651:1: (lv_names_0_0= RULE_ID )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2651:1: (lv_names_0_0= RULE_ID )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2652:3: lv_names_0_0= RULE_ID\n {\n lv_names_0_0=(Token)input.LT(1);\n match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleLetExpressionVariableDeclaration4649); \n\n \t\t\tcreateLeafNode(grammarAccess.getLetExpressionVariableDeclarationAccess().getNamesIDTerminalRuleCall_0_0_0(), \"names\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getLetExpressionVariableDeclarationRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"names\",\n \t \t\tlv_names_0_0, \n \t \t\t\"ID\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n\n\n }\n break;\n case 2 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2675:6: ( '(' ( (lv_names_2_0= RULE_ID ) ) ( ',' ( (lv_names_4_0= RULE_ID ) ) )+ ')' )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2675:6: ( '(' ( (lv_names_2_0= RULE_ID ) ) ( ',' ( (lv_names_4_0= RULE_ID ) ) )+ ')' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2675:8: '(' ( (lv_names_2_0= RULE_ID ) ) ( ',' ( (lv_names_4_0= RULE_ID ) ) )+ ')'\n {\n match(input,25,FOLLOW_25_in_ruleLetExpressionVariableDeclaration4671); \n\n createLeafNode(grammarAccess.getLetExpressionVariableDeclarationAccess().getLeftParenthesisKeyword_0_1_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2679:1: ( (lv_names_2_0= RULE_ID ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2680:1: (lv_names_2_0= RULE_ID )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2680:1: (lv_names_2_0= RULE_ID )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2681:3: lv_names_2_0= RULE_ID\n {\n lv_names_2_0=(Token)input.LT(1);\n match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleLetExpressionVariableDeclaration4688); \n\n \t\t\tcreateLeafNode(grammarAccess.getLetExpressionVariableDeclarationAccess().getNamesIDTerminalRuleCall_0_1_1_0(), \"names\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getLetExpressionVariableDeclarationRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"names\",\n \t \t\tlv_names_2_0, \n \t \t\t\"ID\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2703:2: ( ',' ( (lv_names_4_0= RULE_ID ) ) )+\n int cnt41=0;\n loop41:\n do {\n int alt41=2;\n int LA41_0 = input.LA(1);\n\n if ( (LA41_0==14) ) {\n alt41=1;\n }\n\n\n switch (alt41) {\n \tcase 1 :\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2703:4: ',' ( (lv_names_4_0= RULE_ID ) )\n \t {\n \t match(input,14,FOLLOW_14_in_ruleLetExpressionVariableDeclaration4704); \n\n \t createLeafNode(grammarAccess.getLetExpressionVariableDeclarationAccess().getCommaKeyword_0_1_2_0(), null); \n \t \n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2707:1: ( (lv_names_4_0= RULE_ID ) )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2708:1: (lv_names_4_0= RULE_ID )\n \t {\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2708:1: (lv_names_4_0= RULE_ID )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2709:3: lv_names_4_0= RULE_ID\n \t {\n \t lv_names_4_0=(Token)input.LT(1);\n \t match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleLetExpressionVariableDeclaration4721); \n\n \t \t\t\tcreateLeafNode(grammarAccess.getLetExpressionVariableDeclarationAccess().getNamesIDTerminalRuleCall_0_1_2_1_0(), \"names\"); \n \t \t\t\n\n \t \t if (current==null) {\n \t \t current = factory.create(grammarAccess.getLetExpressionVariableDeclarationRule().getType().getClassifier());\n \t \t associateNodeWithAstElement(currentNode, current);\n \t \t }\n \t \t try {\n \t \t \t\tadd(\n \t \t \t\t\tcurrent, \n \t \t \t\t\t\"names\",\n \t \t \t\tlv_names_4_0, \n \t \t \t\t\"ID\", \n \t \t \t\tlastConsumedNode);\n \t \t } catch (ValueConverterException vce) {\n \t \t\t\t\thandleValueConverterException(vce);\n \t \t }\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt41 >= 1 ) break loop41;\n EarlyExitException eee =\n new EarlyExitException(41, input);\n throw eee;\n }\n cnt41++;\n } while (true);\n\n match(input,26,FOLLOW_26_in_ruleLetExpressionVariableDeclaration4738); \n\n createLeafNode(grammarAccess.getLetExpressionVariableDeclarationAccess().getRightParenthesisKeyword_0_1_3(), null); \n \n\n }\n\n\n }\n break;\n\n }\n\n match(input,17,FOLLOW_17_in_ruleLetExpressionVariableDeclaration4750); \n\n createLeafNode(grammarAccess.getLetExpressionVariableDeclarationAccess().getEqualsSignKeyword_1(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2739:1: ( (lv_assignedExpression_7_0= ruleExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2740:1: (lv_assignedExpression_7_0= ruleExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2740:1: (lv_assignedExpression_7_0= ruleExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2741:3: lv_assignedExpression_7_0= ruleExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getLetExpressionVariableDeclarationAccess().getAssignedExpressionExpressionParserRuleCall_2_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleExpression_in_ruleLetExpressionVariableDeclaration4771);\n lv_assignedExpression_7_0=ruleExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getLetExpressionVariableDeclarationRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"assignedExpression\",\n \t \t\tlv_assignedExpression_7_0, \n \t \t\t\"Expression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public final void declaration() throws RecognitionException {\n CommonTree IDENT9=null;\n CommonTree IDENT10=null;\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:207:3: ( ^( 'int' ( IDENT )+ ) | ^( 'boolean' ( IDENT )+ ) )\n int alt9=2;\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0==47) ) {\n alt9=1;\n }\n else if ( (LA9_0==42) ) {\n alt9=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n\n throw nvae;\n\n }\n switch (alt9) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:207:5: ^( 'int' ( IDENT )+ )\n {\n match(input,47,FOLLOW_47_in_declaration309); \n\n match(input, Token.DOWN, null); \n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:207:13: ( IDENT )+\n int cnt7=0;\n loop7:\n do {\n int alt7=2;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0==IDENT) ) {\n alt7=1;\n }\n\n\n switch (alt7) {\n \tcase 1 :\n \t // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:207:14: IDENT\n \t {\n \t IDENT9=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_declaration312); \n\n \t localScope.addVar((IDENT9!=null?IDENT9.getText():null), new Integer(0)); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt7 >= 1 ) break loop7;\n EarlyExitException eee =\n new EarlyExitException(7, input);\n throw eee;\n }\n cnt7++;\n } while (true);\n\n\n match(input, Token.UP, null); \n\n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:208:5: ^( 'boolean' ( IDENT )+ )\n {\n match(input,42,FOLLOW_42_in_declaration324); \n\n match(input, Token.DOWN, null); \n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:208:16: ( IDENT )+\n int cnt8=0;\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( (LA8_0==IDENT) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:208:17: IDENT\n \t {\n \t IDENT10=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_declaration326); \n\n \t localScope.addVar((IDENT10!=null?IDENT10.getText():null), new Boolean(false)); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt8 >= 1 ) break loop8;\n EarlyExitException eee =\n new EarlyExitException(8, input);\n throw eee;\n }\n cnt8++;\n } while (true);\n\n\n match(input, Token.UP, null); \n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }",
"int getVar() {\n\n return super.var; //Line n3. refer to its immediate parents variable of var\n }",
"private @Nullable IdentifierToken eatId() {\n if (peekId()) {\n return eatIdOrKeywordAsId();\n } else {\n reportExpectedError(peekToken(), TokenType.IDENTIFIER);\n if (peekIdOrKeyword()) {\n return eatIdOrKeywordAsId();\n } else {\n return null;\n }\n }\n }",
"public java.lang.Integer getVar294() {\n return var294;\n }",
"@Override\n\tpublic Integer visitGlobal_var_decl(ClangParser.Global_var_declContext ctx)\n {\n \treturn null;\n }",
"public String getId() {\n return typeDeclaration.getId();\n }",
"private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {\n\t\tcreateImplicitVarValType(resource, acceptor, XtendVariableDeclaration.class,\n\t\t\tit -> it.getType(),\n\t\t\tit -> {\n\t\t\t\tLightweightTypeReference type = getLightweightType(it.getRight());\n\t\t\t\tif (type.isAny()) {\n\t\t\t\t\ttype = getTypeForVariableDeclaration(it.getRight());\n\t\t\t\t}\n\t\t\t\treturn type.getSimpleName();\n\t\t\t},\n\t\t\tit -> it.getRight(),\n\t\t\t() -> this.grammar.getXVariableDeclarationAccess().getRightAssignment_3_1());\n\t}",
"public String getVariableName() {\n return _vname;\n }",
"public final EObject ruleParameter() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalStl.g:1653:2: ( ( (lv_name_0_0= RULE_ID ) ) )\n // InternalStl.g:1654:2: ( (lv_name_0_0= RULE_ID ) )\n {\n // InternalStl.g:1654:2: ( (lv_name_0_0= RULE_ID ) )\n // InternalStl.g:1655:3: (lv_name_0_0= RULE_ID )\n {\n // InternalStl.g:1655:3: (lv_name_0_0= RULE_ID )\n // InternalStl.g:1656:4: lv_name_0_0= RULE_ID\n {\n lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_2); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_0());\n \t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\tif (current==null) {\n \t\t\t\t\tcurrent = createModelElement(grammarAccess.getParameterRule());\n \t\t\t\t}\n \t\t\t\tsetWithLastConsumed(\n \t\t\t\t\tcurrent,\n \t\t\t\t\t\"name\",\n \t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\"org.eclipse.xtext.common.Terminals.ID\");\n \t\t\t\n }\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public final void rule__BSQLMachine__VarsAssignment_3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:3018:1: ( ( RULE_ID ) )\n // InternalBSQL2Java.g:3019:2: ( RULE_ID )\n {\n // InternalBSQL2Java.g:3019:2: ( RULE_ID )\n // InternalBSQL2Java.g:3020:3: RULE_ID\n {\n before(grammarAccess.getBSQLMachineAccess().getVarsIDTerminalRuleCall_3_0()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getBSQLMachineAccess().getVarsIDTerminalRuleCall_3_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"Variable createVariable();",
"Variable createVariable();",
"public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }",
"public int getIdentifier()\n {\n return identifier;\n }",
"static boolean declaredIdentifier(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"declaredIdentifier\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = declaredIdentifier_0(b, l + 1);\n r = r && declaredIdentifier_1(b, l + 1);\n r = r && finalConstVarOrTypeAndComponentName(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"public java.lang.Integer getVar294() {\n return var294;\n }",
"private void localVariableDeclaration(Modifier modify, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.FINALSY)\r\n {\r\n modify.add(nextSymbol.value);\r\n lookAhead();\r\n }\r\n\r\n modify.check(modify.fields | modify.access);\r\n Type t = type();\r\n\r\n variableDeclarators(modify, t, scope, queue);\r\n }",
"public final EObject ruleLocalVariableDeclaration() throws RecognitionException {\n EObject current = null;\n int ruleLocalVariableDeclaration_StartIndex = input.index();\n Token otherlv_1=null;\n EObject lv_vardecl_0_0 = null;\n\n EObject lv_expression_2_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 44) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2246:28: ( ( ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )? ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:1: ( ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:1: ( ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:2: ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )?\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:2: ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2248:1: (lv_vardecl_0_0= ruleTypedVarDeclaration )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2248:1: (lv_vardecl_0_0= ruleTypedVarDeclaration )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2249:3: lv_vardecl_0_0= ruleTypedVarDeclaration\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getLocalVariableDeclarationAccess().getVardeclTypedVarDeclarationParserRuleCall_0_0()); \n \t \n }\n pushFollow(FOLLOW_ruleTypedVarDeclaration_in_ruleLocalVariableDeclaration4426);\n lv_vardecl_0_0=ruleTypedVarDeclaration();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getLocalVariableDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"vardecl\",\n \t\tlv_vardecl_0_0, \n \t\t\"TypedVarDeclaration\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2265:2: (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )?\n int alt48=2;\n alt48 = dfa48.predict(input);\n switch (alt48) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2266:2: otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) )\n {\n otherlv_1=(Token)match(input,KEYWORD_15,FOLLOW_KEYWORD_15_in_ruleLocalVariableDeclaration4440); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getLocalVariableDeclarationAccess().getEqualsSignKeyword_1_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2270:1: ( (lv_expression_2_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2271:1: (lv_expression_2_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2271:1: (lv_expression_2_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2272:3: lv_expression_2_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getLocalVariableDeclarationAccess().getExpressionExpressionParserRuleCall_1_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleLocalVariableDeclaration4460);\n lv_expression_2_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getLocalVariableDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"expression\",\n \t\tlv_expression_2_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 44, ruleLocalVariableDeclaration_StartIndex); }\n }\n return current;\n }",
"public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }",
"public int getIdentifier();"
] | [
"0.7659708",
"0.7142",
"0.70279026",
"0.6801516",
"0.6639072",
"0.6546117",
"0.6392432",
"0.6263727",
"0.59979224",
"0.5995941",
"0.5956525",
"0.5853122",
"0.58315855",
"0.582818",
"0.5782395",
"0.5778353",
"0.5762873",
"0.5761587",
"0.5759909",
"0.5746865",
"0.5721012",
"0.5709128",
"0.56915647",
"0.56866527",
"0.56821716",
"0.5653095",
"0.56502306",
"0.5635653",
"0.5634211",
"0.56001806",
"0.5599136",
"0.55936337",
"0.554642",
"0.55409425",
"0.55334646",
"0.5532118",
"0.5523001",
"0.5494013",
"0.5477868",
"0.54588836",
"0.5458368",
"0.5427293",
"0.54251367",
"0.54222697",
"0.54094297",
"0.5396848",
"0.53933996",
"0.53933895",
"0.53905195",
"0.53893906",
"0.5375948",
"0.53723735",
"0.53709424",
"0.53610855",
"0.5357261",
"0.53456473",
"0.5322206",
"0.53190434",
"0.53085935",
"0.5301675",
"0.5293272",
"0.5291378",
"0.5291272",
"0.5291121",
"0.52800804",
"0.5277149",
"0.527261",
"0.52634966",
"0.5256788",
"0.5245031",
"0.5243165",
"0.52428854",
"0.5237865",
"0.5234624",
"0.5231779",
"0.5207496",
"0.5204754",
"0.5202077",
"0.5201068",
"0.5198771",
"0.51966155",
"0.51960367",
"0.51925606",
"0.5189786",
"0.5186777",
"0.5183043",
"0.5178464",
"0.51710624",
"0.51709473",
"0.51640683",
"0.5163613",
"0.51614684",
"0.51614684",
"0.5159488",
"0.51593566",
"0.51586366",
"0.5158329",
"0.51523894",
"0.5148829",
"0.5147993",
"0.5139433"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.