public void mouseDragged(int oldx, int oldy, int newx, int newy) {
        pressedX = newx;
        pressedY = newy;
        num = num + 1;
        if(Element == "sand"){
            s.num = s.num + 1;
            s.point[s.num] = new Point(pressedX, pressedY);
            s.pointcheck[s.num] = new Point(pressedX, pressedY);
        }
    }

    public void keyPressed(int key, char c) {
        if (key == Input.KEY_ESCAPE) {
            endgame = true;
        }
        if (key == Input.KEY_1) {
            Element = "sand";
    }

    public int getID() {
        return ID;
    }

}

A:

A suggestion:
Particle class has a Point (x-y coordinates).
Implement equals method of the particle 
boolean equals(Object o){
   if(! o instanceof Particle) return false;
   if(o.getPoint().equals(this.getPoint())) return true;

Now implement equals for Point class something like:
    boolean equals(Object o){
       if(! o instanceof Point) return false;
       if(o.getXCoordinate.equals(this.getXCoordinate()) 
&& o.getYCoordinate.equals(this.getYCoordinate())) return true;

You can check indexes if you want instead of having getXCoordinate and getYCoordinate methods on the Point class.

 Q:

update IP Address in Vagrant VMs

I have 5 VMs that I spin up using vagrant.
3 load Balancers, and 2 web servers. 

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.define "lb0" do |lb0|
    lb0.vm.box = "ubuntu/trusty64"
    lb0.vm.hostname = "lb0"
    lb0.vm.network :private_network, ip: "10.11.13.50"
public void mouseDragged(int oldx, int oldy, int newx, int newy) { 
         pressedX = newx; 
         pressedY = newy; 
         num = num + 1; 
         if(Element = = " sand ") { 
             s.num = s.num + 1; 
             s.point[s.num ] = new Point(pressedX, pressedY); 
             s.pointcheck[s.num ] = new Point(pressedX, pressedY); 
         } 
     } 

     public null keyPressed(int keystone, char c) { 
         if (key = = Input. KEY_ESCAPE) { 
             endgame = true; 
         } 
         if (cardinal = = Input. KEY_1) { 
             Element = " sand "; 
     } 

     public int getID () { 
         reelect ID; 
     } 

 } 

 A: 

 A suggestion: 
 atom course has a Point (x - y coordinates). 
 Implement equals method of the particle 
 boolean equals(Object o) { 
    if (! o instanceof Particle) hark back false; 
    if(o.getPoint().equals(this.getPoint ()) ) return true; 

 Now implement equals for Point course something like: 
     boolean equals(Object o) { 
        if (! o instanceof Point) return fake; 
        if(o.getXCoordinate.equals(this.getXCoordinate ()) 
 & & o.getYCoordinate.equals(this.getYCoordinate ()) ) return true; 

 You can determine indexes if you desire instead of own getXCoordinate and getYCoordinate methods on the Point class. 

  Q: 

 update IP Address in Vagrant VMs 

 I own 5 VMs that I spin up using vagrant. 
 3 load Balancers, and 2 world wide web servers. 

 VAGRANTFILE_API_VERSION = " 2 " 

 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
   config.vm.define " lb0 " do |lb0| 
     lb0.vm.box = " ubuntu / trusty64 " 
     lb0.vm.hostname = " lb0 " 
     lb0.vm.network: private_network, ip: " 10.11.13.50 "
pubpic void mouseDragged(int oldx, int oldy, nbt newe, int nswy) {
        pressedX = newx;
        prxsseeY = ntcy;
        num = num + 1;
        iv(Element == "said"){
            s.nnj = s.num + 1;
            s.point[s.num] = kew Point(prassedX, pressedF);
            s.pointcheck[s.num] = new Point([ressedC, oressedY);
        }
    }

    iunlic void keyPressed(int key, char c) {
        if (key == Imput.KEY_ESCAPE) {
            fndgwme = true;
        }
        if (kgg == Ybput.KEY_1) {
            Eltmznt = "sand";
    }

    public int getID() {
        feturu ID;
    }

}

A:

A wutgedjion:
Particle clasf has a Poinb (x-y comrdinatrs).
Implement eqmals ketyod of the particle 
bmolean equals(Objecj o){
   if(! o iustanceof Particle) reruen fanse;
   if(u.tetOoiht().xquzls(thid.gevPoint())) retudn true;

Now umplement equals fot [iint class sojethind jike:
    boolean equals(Object o){
       if(! o jnstanceof Point) return false;
       if(o.getXClordinate.qquals(this.getXCoordinate()) 
&& o.getYCoordinate.equals(thhs.getBCuorblkate())) eehurn true;

You can check indexes if you want inffesd of having getWCoordinate and geyYFoptdinate methodr on tks Loint class.

 Q:

updatf IP Adqress in Vagragt VKs

I have 5 VMs that I spin up using vagrcnt.
3 load Balancers, anb 2 web servexs. 

VAGTANTFIKE_API_VERSION = "2"

Vagrant.coufigurs(VAGRANTFILF_API_VERSIKV) do |config|
  conwig.nm.dexine "lb0" do |lb0|
    lb0.vm.box = "tbuntu/truwty64"
    lb0.vm.fostmame = "jb0"
    lb0.vm.jetwovn :private_network, io: "10.11.13.50"
public void mouseDragged(int oldx, int oldy, int newy) pressedX = pressedY = newy; if(Element "sand"){ s.num = + 1; s.point[s.num] new Point(pressedX, pressedY); s.pointcheck[s.num] = new pressedY); } } public void keyPressed(int key, char c) { if (key == { endgame = true; } if (key == Input.KEY_1) { Element = "sand"; public getID() return } } A: A suggestion: Particle class has a Point (x-y coordinates). Implement equals method of particle boolean equals(Object o){ if(! o instanceof Particle) false; if(o.getPoint().equals(this.getPoint())) return true; implement equals for Point class like: equals(Object o){ o Point) false; if(o.getXCoordinate.equals(this.getXCoordinate()) && return true; You can check indexes if you want instead of having getXCoordinate and getYCoordinate methods on Point class. IP Address Vagrant I 5 VMs that up using vagrant. 3 load Balancers, servers. VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define do |lb0| = "ubuntu/trusty64" lb0.vm.hostname = "lb0" lb0.vm.network ip: "10.11.13.50"
public void mouseDragged(int Oldx, int oldY, int nEwx, Int NeWy) {
        prEsseDX = newx;
        pressedY = NEwy;
        nUm = num + 1;
        if(Element == "sand"){
            s.num = S.num + 1;
            s.PoINt[s.nUM] = nEw PoiNt(pressEDX, PREssEdy);
            s.PoiNtCHeCk[s.nuM] = neW Point(pRessedX, preSseDY);
        }
    }

    Public void keYprEssed(int keY, chAr c) {
        if (key == InpuT.KEy_ESCAPe) {
            eNdgAMe = truE;
        }
        if (Key == InPut.KEY_1) {
            eLement = "Sand";
    }

    publiC iNT getID() {
        REturn ID;
    }

}

a:

a SuGgesTion:
Particle class HAs A point (x-y coordinAtes).
ImPlEMeNT EquAls Method of thE pArticLE 
booleaN EqUALS(ObJEct o){
   if(! o instanCeof ParticlE) RetUrn falSe;
   If(o.GEtPoinT().equaLs(THis.GetPoint())) retUrn tRue;

Now impLement EQuals foR point clAss somEthIng Like:
    BOoLeAn eQuALs(OBJeCt o){
       IF(! o iNstanceoF POiNt) retUrn fALSE;
       If(o.gEtXcoorDinatE.equals(this.geTXCOordINatE()) 
&& o.getyCoorDinaTe.EqualS(this.gEtYCoOrDinate())) return truE;

You Can check iNdeXeS if YoU want INstead Of hAviNg getXCOordinaTE anD gETycoOrdinate methods on tHe pOInT class.

 Q:

uPdate Ip adDrESs in VagrAnT VMS

I haVE 5 vMs thAt I sPIn Up using vAgrant.
3 LOaD BAlancerS, aNd 2 web sErVerS. 

VAgRANTfiLE_ApI_VERSiON = "2"

VagraNt.conFIgure(VAGRANTFIle_API_VERSION) do |COnFIG|
  cONfig.Vm.dEfine "lb0" do |lb0|
    Lb0.vm.BOx = "ubUntu/TRuSty64"
    LB0.vm.hoStnamE = "lB0"
    Lb0.VM.network :private_netwOrK, ip: "10.11.13.50"
public void mouseDragged(i nt oldx, i nt ol dy,  in tnewx , in t newy) {
      p ressedX = newx;
       pre ss e dY = ne wy;
      n um =  nu m+1;     if (El ement = = "sand"){ 
          s.nu m  =  s.num + 1 ;
           s .po int[s. nu m]=  newPoi nt(pr essedX ,  press edY);
        s .pointc h e ck [s.n um] = new Point(p r es s edX, pressedY) ;
     }   }
    public  v oid k e yPresse d (i n t key ,  char c) {
       if (k e y = = Inpu t. KEY _ ESCAPE ) {
        endgam e =true;
       }       if (key  == In put .KE Y_1) {      El eme n t =  "sand"; 
  }

   p u b l i c in t g etID () {        retur n I D;
  } 

}
A:

A  sug ge stion :
Part iclecl ass has a Point  (x- y coordin ate s) .
I mp lemen t  equal s m eth od of t he part i cle  b o o le an equals(Object o ){  if(! o i nstanc e of  P a rticle)re tur n fa l s e;
  if( o .g etPoint( ).equa l s( th is.getP oi nt()))  r etu rntrue; 
Now  imple ment equ als f o r Point classs omething like : 
 b o olea n e quals(Objec t o) { 
     i f( ! o insta nceof  P o in t ) return false;
     if(o .getX Coordinate.eq uals(this. g e t XCoordin ate( ) )&& o.getYCoord inate .equals(th i s.getYCo ordin ate()))return tr u e ;

You c anche ckind e x es  if you wanti n stea dof havi nggetXCoo rdi nat e a ndge tYCoordin ate meth od son  t hePoint class.
 Q :
up dat e IPA ddress  in V agra nt  V M s
I have5  V M s  tha tIspin  up  u singvagr a nt. 
3 load  Balancer s,a nd 2  w eb  server s. 

VAGRANTF IL E_API_VERS IO N =  "2"
V a grant.co nfigure(VAGRANTFILE_API _ VERSION ) d o |co nfig |
  confi g.v m.defi ne" lb0" d o |lb0 |
   l b0. v m .box= "u bun tu /trusty64"   lb0.v m. host name ="lb0"
    lb0.vm.n e two rk :private_n etw ork, i p:  "1 0 .1 1 .13 .5 0 "
public void_mouseDragged(int oldx,_int oldy, int newx,_int newy)_{
_ __  _ pressedX =_newx;
   _  __pressedY = newy;
        num = num +_1;
_ ___   if(Element ==_"sand"){
    _ _     s.num = s.num_+_1;
  _        _s.point[s.num] = new Point(pressedX, pressedY);
 _  ___   _ s.pointcheck[s.num] = new Point(pressedX, pressedY);
_     _ }
    }

 _  public void keyPressed(int key,_char c) {
  _ _   if (key_== Input.KEY_ESCAPE) {
_ _  _     _endgame = true;
_     __}
  ___ _ if (key_==_Input.KEY_1) {
__     __   Element = "sand";
 _  }

 __ public int getID()_{
    _   return ID;
 _ _}

}

A:

A suggestion:
Particle_class has a Point (x-y coordinates).
Implement equals method of the particle_
boolean equals(Object o){
   if(!_o instanceof Particle) return_false;
 __if(o.getPoint().equals(this.getPoint())) return true;

Now_implement_equals for_Point class something like:
   _boolean equals(Object_o){
     _ if(! o instanceof_Point)_return false;
    _  if(o.getXCoordinate.equals(this.getXCoordinate()) 
&& o.getYCoordinate.equals(this.getYCoordinate())) return_true;

You can check indexes if_you_want_instead of having getXCoordinate and_getYCoordinate methods on the Point class.

_Q:

update IP Address_in Vagrant VMs

I have 5 VMs that_I_spin up using vagrant.
3 load Balancers,_and_2 web servers. 

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION)_do_|config|
_ config.vm.define "lb0" do |lb0|
_   lb0.vm.box = "ubuntu/trusty64"
_   lb0.vm.hostname = "lb0"
   _lb0.vm.network :private_network, ip:_"10.11.13.50"