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

class
	US_MANDATE_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 (Current, 449, 553)
			translate_widget (name_mt, 50, -95)
			translate_widget (dot, 70, -70)
--			flag.center_on_dot (dot)
			flag.set_x_y (dot.x, dot.y)
			translate_widget (dot, 40, -40)
		end

	build_ocean
			-- Create the polygon representing the `ocean' here
			-- Redefined to add the points
		do
			Precursor {SEA_AREA_WIDGET}
				-- start at bottom south-west corner
			ocean.extend_point (create {EV_COORDINATE}.make (0, 0))
			ocean.extend_point (create {EV_COORDINATE}.make (5, -112))
			ocean.extend_point (create {EV_COORDINATE}.make (77, -116))	-- y ~116
			ocean.extend_point (create {EV_COORDINATE}.make (104, -164))
			ocean.extend_point (create {EV_COORDINATE}.make (255, -69))
			ocean.extend_point (create {EV_COORDINATE}.make (255, 0))
		end

--	build_bounding_figure
--			-- Add points to the `jj_bounding_figure'.
--			-- Redefined to use the tile edges as the bounding area
--		local
--			t: EV_MODEL_TRANSFORMATION
--		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 (5, -112))
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (77, -116))	-- y ~116
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (104, -164))
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (255, -69))
--			jj_bounding_figure.extend_point (create {EV_COORDINATE}.make (255, 0))
--			jj_bounding_figure.enable_closed
--			create t.make_zero
--			t.translate (449, 553)	-- 553 is the board height (not including black boarder)
--			jj_bounding_figure.transform (t)
--			jj_bounding_figure.set_line_width (2)
----			show_bounding_figure
--		end

invariant

	is_valid_sea_area: attached target_imp implies sea_area = game.us_mandate
	no_land: land.is_empty

end
