all repos — WarBot2020 @ 7fda713c602b6cdfdba2dd6f4ea299b7d8b70531

Bootleg version of "WorldWarBot 2020" done in Java and without a map.

Delete Centroide.java
Bi-Rabittoh andronacomarco@gmail.com
Thu, 04 Apr 2019 12:56:09 +0200
commit

7fda713c602b6cdfdba2dd6f4ea299b7d8b70531

parent

34d3139a35c84dab7ac25c6d3770e089ef992d39

1 files changed, 0 insertions(+), 33 deletions(-)

jump to
D siciliaguerrabot2020/Centroide.java

@@ -1,33 +0,0 @@

-/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package siciliaguerrabot2020; - -/** - * - * @author Bi-Rabittoh - */ -public class Centroide { - public double x; - public double y; - - public Centroide(double x, double y) { - this.x = x; - this.y = y; - } - - @Override - public String toString() { - return "Centroide{" + "x=" + x + ", y=" + y + '}'; - } - - public Centroide puntoMedio(Centroide target){ - return new Centroide((this.x + target.x) / 2, (this.y + target.y) / 2); - } - - public double distanza(Centroide target){ - return Math.sqrt(Math.pow(this.x - target.x, 2) + Math.pow(this.y - target.y, 2)); - } -}