]> git.zerfleddert.de Git - FreeShisen/blobdiff - src/de/cwde/shisensho/Point.java
rename, add hdpi icons, cleanup some warnings
[FreeShisen] / src / de / cwde / shisensho / Point.java
diff --git a/src/de/cwde/shisensho/Point.java b/src/de/cwde/shisensho/Point.java
new file mode 100644 (file)
index 0000000..73879cd
--- /dev/null
@@ -0,0 +1,30 @@
+package de.cwde.shisensho;
+
+class Point {
+       public Point(int i, int j) {
+               this.i=i;
+               this.j=j;
+       }
+
+       public boolean equals(Point p) {
+               return (i==p.i && j==p.j);
+       }
+
+       public String toString() {
+               return "("+i+","+j+")";
+       }
+
+       public static Point fromString(String s) {
+               String[] ij=s.split(",",2);
+               int i=Integer.parseInt(ij[0]);
+               int j=Integer.parseInt(ij[1]);
+               return new Point(i,j);
+       }
+
+       public int i;
+       public int j;
+
+       public Point copy() {
+               return new Point(this.i,this.j);
+       }
+}
Impressum, Datenschutz