Mercurial > hg > ristipolku
annotate game/IDMPoint.java @ 79:83a79d1698c8
Method for creating a copy of a point.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 03 Mar 2011 04:56:34 +0200 |
parents | 8c81a3e73a2b |
children | c4d0ceec99ef |
rev | line source |
---|---|
73
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 /* |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 * Ristipolku IDM point |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 * (C) Copyright 2011 Matti 'ccr' Hämäläinen <ccr@tnsp.org> |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 */ |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 package game; |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 public class IDMPoint |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 { |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 public float x, y; |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 public IDMPoint(float x, float y) |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 { |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 this.x = x; |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 this.y = y; |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 } |
79
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
16 |
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
17 public IDMPoint copy() |
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
18 { |
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
19 return new IDMPoint(x, y); |
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
20 } |
73
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 } |