-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
240 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
package engine; | ||
|
||
import world.Cell; | ||
|
||
public abstract class Engine { | ||
|
||
int tlx; | ||
int tly; | ||
int width; | ||
int height; | ||
|
||
|
||
protected int tlx; | ||
protected int tly; | ||
protected int width; | ||
protected int height; | ||
protected int turn; | ||
|
||
public abstract Cell findCell(int x, int y); | ||
|
||
public Engine(){} | ||
|
||
public Engine() { | ||
} | ||
|
||
public Engine(int tlx, int tly, int width, int height) { | ||
this.tlx = tlx; | ||
this.tly = tly; | ||
this.width = width; | ||
this.height = height; | ||
} | ||
|
||
public Boolean hasCell(int x, int y) { | ||
return x >= tlx && y >= tly && x < tlx + width && y < tly + height; | ||
} | ||
|
||
public void setCoordinates(int tlx, int tly, int width, int height){ | ||
public void setCoordinates(int tlx, int tly, int width, int height) { | ||
this.tlx = tlx; | ||
this.tly = tly; | ||
this.width = width; | ||
this.height = height; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.