-
Notifications
You must be signed in to change notification settings - Fork 0
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
s-xuch
authored and
s-xuch
committed
Apr 5, 2018
1 parent
6e05c9b
commit f9eceda
Showing
6 changed files
with
83 additions
and
28 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package game; | ||
|
||
import org.newdawn.slick.GameContainer; | ||
|
||
public class GameScreen implements Screen { | ||
private GameContainer gc; | ||
|
||
public GameScreen(GameContainer gc) { | ||
this.gc = gc; | ||
} | ||
|
||
@Override | ||
public int getWidth() { | ||
return gc.getWidth(); | ||
} | ||
|
||
@Override | ||
public int getHeight() { | ||
return gc.getHeight(); | ||
} | ||
|
||
} |
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package game; | ||
|
||
public interface Screen { | ||
int getWidth(); | ||
|
||
int getHeight(); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package test; | ||
|
||
import game.Screen; | ||
|
||
public class MockScreen implements Screen { | ||
private int height; | ||
private int width; | ||
|
||
public MockScreen(int height, int width) { | ||
this.height = height; | ||
this.width = width; | ||
} | ||
|
||
@Override | ||
public int getWidth() { | ||
return width; | ||
} | ||
|
||
@Override | ||
public int getHeight() { | ||
return 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