note
	description: "[
		Constants related to {VITP_POSITION}, such as the positionn of the
		corner of the board, the distance beyond the board that is usable,
		etc.  These numbers were taken by direct mesurement of the VITP
		board, measuring in millimeters from the top left corner.

		Some constants are also used to build the grid/cells used for
		positioning of widgets on the {BOARD_VIEW}.

		 _____________
		|
		|   ****
		|   *
		|   *
		|____________


	]"
	author: "Jimmy J. Johnson"

class
	POSITION_CONSTANTS

create
	default_create

feature -- Constants

	playing_area_left: INTEGER = 0
			-- The left-most longitude at which a unit may be placed

	playing_area_top: INTEGER = 0
			-- The top-most latitude at which a unit may be placed

	margin_size: INTEGER = 100
			-- The size in millimeters of the area around the game board in
			-- which attack units can be repositioned.  (As with the real
			-- game, some areas are too small to hold all the tiles that
			-- a player may wish to place in that area, so a boarder allows
			-- units to be placed beside/off the board.)

	board_left: INTEGER
			-- The longitude of the left edge of the board
		once
			Result := playing_area_left + margin_size
		end

	board_top: INTEGER
			-- The latitude of the top edge of the board
		once
			Result := playing_area_top + margin_size
		end

	board_width: INTEGER = 702
			-- The width of the board in millimeters

	board_height: INTEGER = 554
			-- The height of the board in mellimeters

	board_right: INTEGER
			-- The longitude of the right edge of the board.
		once
			Result := board_left + board_width
		end

	board_bottom: INTEGER
			-- The latitude of the bottom edge of the board.
		once
			Result := board_top + board_height
		end

	playing_area_right: INTEGER
			-- The right-most longitude at which a unit may be placed
		once
			Result := board_right + margin_size
		end

	playing_area_bottom: INTEGER
			-- The bottom-most latitude at which a unit may be placed

	playing_area_width: INTEGER
			-- The total width of the playing surface
		once
			Result := playing_area_right - playing_area_left
		end

	playing_area_height: INTEGER
			-- The total height of the playing surface
		once
			Result := playing_area_bottom - playing_area_top
		end

feature

	cell_size: INTEGER = 20
			-- The logical size of a cell in which to position a unit

	cell_row_count: INTEGER
			-- Number of cells from the playing area's top to bottom
		once
			Result := playing_area_height // cell_size
		end

	cell_column_count: INTEGER_32
			-- Number of cells from the playing area's left to right
		once
			Result := playing_area_width // cell_size
		end

	playing_area_ratio: REAL_64
			-- Ratio of the `playing_area_width' to the [possibly]
			-- scaled size of the `playing_area_width'.  Default = one
		do
			Result := 1.0
		end

end
