Skip to content

Instantly share code, notes, and snippets.

@smaspe
Created July 18, 2013 16:01
Show Gist options
  • Save smaspe/6030547 to your computer and use it in GitHub Desktop.
Save smaspe/6030547 to your computer and use it in GitHub Desktop.
@Override
public void render() {
Gdx.gl.glClearColor(1, 1, 1, 1);
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
renderer.setView(camera);
renderer.render();
SpriteBatch batch = renderer.getSpriteBatch();
batch.begin();
for (int i = 0; i < board.length; i++) {
for (int j = 0; j < board[i].length; j++) {
if (board[i][j] == WHITE) {
batch.draw(whiteTexture[2], i, j, 1, 1);
} else if (board[i][j] == BLACK) {
batch.draw(blackTexture[2], i, j, 1, 1);
}
}
}
batch.end();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment