Developing TicToe HTML5/Implementing Server Entities: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann Created page with "{{Navigation TicToe HTML5}}__NOTOC__ Now we have a user interface on the client side. Lets have a look at the server. The server is the place where all the interesting logic wil..." |
imported>Hendrik Brummermann layout |
||
| Line 61: | Line 61: | ||
<source lang="java"> |
<source lang="java"> |
||
/** /** |
|||
/** |
|||
* gets the x-coordinate |
* gets the x-coordinate * sets the x coordinate |
||
* * |
|||
* |
|||
* @return x-coordinate |
* @return x-coordinate * @param x x-coordinate |
||
*/ */ |
|||
*/ |
|||
public int getX() { |
public int getX() { public void setX(int x) { |
||
return super.getInt("x"); |
return super.getInt("x"); super.put("x", x); |
||
} } |
|||
} |
|||
/** |
|||
* gets the y-coordinate |
|||
* |
|||
* @return y-coordinate |
|||
*/ |
|||
public int getY() { |
|||
return super.getInt("y"); |
|||
} |
|||
/** /** |
|||
/** |
|||
* gets the |
* gets the y-coordinate * sets the y coordinate |
||
* * |
|||
* |
|||
* @return |
* @return y-coordinate * @param y y-coordinate |
||
*/ */ |
|||
*/ |
|||
public int getY() { public void setY(int y) { |
|||
public int getZ() { |
|||
return super.getInt(" |
return super.getInt("y"); super.put("y", y); |
||
} } |
|||
} |
|||
/** |
|||
* sets the x coordinate |
|||
* |
|||
* @param x x-coordinate |
|||
*/ |
|||
public void setX(int x) { |
|||
super.put("x", x); |
|||
} |
|||
/** /** |
|||
/** |
|||
* sets the |
* gets the z-coordinate * sets the z coordinate |
||
* * |
|||
* |
|||
* @param |
* @return z-coordinate * @param z z-coordinate |
||
*/ */ |
|||
*/ |
|||
public void |
public int getZ() { public void setZ(int z) { |
||
super.put(" |
return super.getInt("z"); super.put("z", z); |
||
} } |
|||
} |
|||
/** |
|||
* sets the z coordinate |
|||
* |
|||
* @param z z-coordinate |
|||
*/ |
|||
public void setZ(int z) { |
|||
super.put("z", z); |
|||
} |
|||
</source> |
</source> |
||