All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nullpointergames.boardgames.Block Maven / Gradle / Ivy

There is a newer version: 0.1.17
Show newest version
package com.nullpointergames.boardgames;

import static com.nullpointergames.boardgames.NullPiece.nullPiece;

public class Block {

	private final Position position;
	private Piece piece;

	public Block(final Position position) {
		this.position = position;
	}

	public Position position() {
		return position;
	}

	public Piece piece() {
		return piece == null ? nullPiece() : piece;
	}

	public void piece(Piece piece) {
		this.piece = piece;
	}

	public void clear() {
		piece = nullPiece();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy