Source code: com/jdwsoftware/wfh/model/Direction.java
1 package com.jdwsoftware.wfh.model;
2
3 /**
4 * <p><b>Title</b>: Woody's Fishing Hole</p>
5 * <p><b>Description</b>: Educational Fishing Game</p>
6 * <p><b>Copyright</b>: Copyright (C) 2003 JDW Software, LLC</p>
7 * <p><b>Company</b>: JDW Software, LLC</p>
8 *
9 * <p>The current direction the fish is heading.</p>
10 *
11 * @author <a href="mailto:jdw@jdwsoftware.com">Jim Woodgate</a>
12 * @version $Revision: 1.6 $
13 */
14
15 /*
16 * This file is part of Woodys Fishing Hole.
17 *
18 * Woodys Fishing Hole is free software; you can redistribute it
19 * and/or modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2 of
21 * the License, or (at your option) any later version.
22 *
23 * Woodys Fishing Hole is distributed in the hope that it will be
24 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
25 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with Woodys Fishing Hole; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
31 * USA
32 */
33
34 public class Direction {
35 private static final String COPYRIGHT = com.jdwsoftware.util.Copyright.COPYRIGHT;
36 private static final String VERSION = "$Id: Direction.java,v 1.6 2003/12/02 04:22:32 jdw Exp $";
37
38 private float _dx;
39 private float _dy;
40
41 public Direction() {
42 super();
43 }
44
45 public Direction(float dx, float dy) {
46 this();
47 _dx = dx;
48 _dy = dy;
49 }
50
51 public float getDX() {
52 return _dx;
53 }
54
55 public void setDX(float dx) {
56 _dx = dx;
57 }
58
59 public float getDY() {
60 return _dy;
61 }
62
63 public void setDY(float dy) {
64 _dy = dy;
65 }
66
67 public String toString() {
68 return "Direction["+_dx+","+_dy+"]";
69 }
70 }