Dot.java
资源名称:J2ME&Game.rar [点击查看]
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:1k
源码类别:
J2ME
开发平台:
Java
- public class Dot
- {
- public Dot()
- {
- row = 0;
- col = 0;
- }
- public Dot(int r, int c)
- {
- row = r;
- col = c;
- }
- public Dot(int borderSize)
- {
- row = borderSize / 2;
- col = borderSize / 2;
- }
- public void setRowCol(int r, int c)
- {
- row = r;
- col = c;
- }
- public void copyFrom(Dot d)
- {
- row = d.row;
- col = d.col;
- }
- public boolean inBorder(int borderSize)
- {
- return row >= 0 && row < borderSize && col >= 0 && col < borderSize;
- }
- public int row;
- public int col;
- }