note
	description: "[
		Widget that represents this VITP sea area
		]"
	author: "Jimmy J. Johnson"

class
	CENTRAL_PACIFIC_OCEAN_WIDGET

inherit

	SEA_AREA_WIDGET
		redefine
			position_widgets,
			build_ocean
--			build_bounding_figure
		end

create
	make

feature {NONE} -- Initialization

	position_widgets
			-- Move Current and contained widgets to correct
			-- location and set their their sizes
		do
			Precursor {SEA_AREA_WIDGET}
			translate_widget (text_group, -30, 50)
			translate_widget (dot, 20, 80)
--			flag.center_on_dot (dot)
			flag.set_x_y (dot.x, dot.y)
			translate_widget (flag, -10, -2)
			translate_widget (dot, -20, 30)
			translate_widget (Current, 526, 101)
		end

	build_ocean
			-- Create the polygon representing the `ocean' here
			-- Redefined to add the points
		do
			Precursor {SEA_AREA_WIDGET}
				-- start at northern most point
			ocean.extend_point (create {EV_COORDINATE}.make (0, 0))
			ocean.extend_point (create {EV_COORDINATE}.make (79, 32))
			ocean.extend_point (create {EV_COORDINATE}.make (112, 136))
			ocean.extend_point (create {EV_COORDINATE}.make (74, 200))
			ocean.extend_point (create {EV_COORDINATE}.make (-41, 146))  -- x may be off
			ocean.extend_point (create {EV_COORDINATE}.make (-77, 81))
		end

--	build_bounding_figure
--			-- Add points to the `jj_bounding_figure'.
--			-- Redefined to use the tile edges as the bounding area
--		do
--			if has (jj_bounding_figure) then
--				prune_all (jj_bounding_figure)
--			end
--			create jj_bounding_figure
--			extend (jj_bounding_figure)
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (0, 0))
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (79, 32))
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (112, 136))
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (74, 200))
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (-41, 146))  -- x may be off
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (-77, 81))
--			jj_bounding_figure.enable_closed
--				-- Make adjustments
--			jj_bounding_figure.set_line_width (2)
--			translate_widget (jj_bounding_figure, 526, 101)
----			show_bounding_figure
--		end

invariant

	is_valid_sea_area: attached target_imp implies sea_area = game.central_pacific_ocean
	has_no_land: land.is_empty

end
