package gizmoball.ui.r2;

import gizmoball.game.GameBoard;

import java.awt.Color;
import java.awt.Graphics2D;

/**
 * A drawer for the gameboard base in R2.  The gameboard is 
 * represented by a black area of size 21L x 21L.  This
 * can be modified to allow such things as: varying size
 * gameboards, gameboard with backgrounds, etc. <p>
 * 
 * @see R2DrawerFactory
 * @author Albert Leung
 * @version 1.0
 * 
 */
public class R2GameBoardDrawer {

	/**
	 * The singleton R2GameBoardDrawer returned by the R2DrawerFactory.
	 * 
	 */
	public static final R2GameBoardDrawer DRAWER = new R2GameBoardDrawer();

	/**
	 * Draws a blank GameBoard.
	 * 
	 * @param g the Graphics context on which to draw
	 * @param gameboard the gameboard from which to extract properties for
	 * representation
	 * @modifies g
	 * 
	 */
	public void drawGameBoard(Graphics2D g, GameBoard gameboard) {
		g.setColor(Color.BLACK);
		g.fillRect(0, 0, R2GizmoDrawer.L_IN_PIXELS*20, R2GizmoDrawer.L_IN_PIXELS*20);
	}

	/**
	 * Returns the singleton instance.
	 * 
	 * @return the only instance of an R2GameBoardDrawer
	 * 
	 */
	public static R2GameBoardDrawer getInstance() {
		return DRAWER;
	}

}
