note
	description: "[
		Widget that represents the Bay of Bengal in VITP
		]"
	author: "Jimmy J. Johnson"

class
	BAY_OF_BENGAL_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_widget, -10, 150)
--			text_widget.set_x_y (70, 150)
--			translate_widget (dot, -20, 80)
--			name_mt.set_point_position (15, 345)
			text_group.set_x_y (15, 345)
			flag.set_point_position (20, 320)
			dot.set_point_position (20, 310)
		end

	build_ocean
			-- Create the polygon representing the `ocean' here
			-- Redefined to add the points
		do
			Precursor {SEA_AREA_WIDGET}
				-- Start at top left of board, going to point north of Saigon
			ocean.extend_point (create {EV_COORDINATE}.make (0, 0))
			ocean.extend_point (create {EV_COORDINATE}.make (98, 190))		-- measured to west point of Siagon
			ocean.extend_point (create {EV_COORDINATE}.make (72, 244))		-- estimated
			ocean.extend_point (create {EV_COORDINATE}.make (40, 257))
			ocean.extend_point (create {EV_COORDINATE}.make (83, 355))
			ocean.extend_point (create {EV_COORDINATE}.make (0, 392))
		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)
----			bounding_figure.extend_point (ocean.point_array.item (0))
----			bounding_figure.extend_point (create {EV_COORDINATE}.make (0, 167))
----			bounding_figure.extend_point (create {EV_COORDINATE}.make (20, 155))
----			bounding_figure.extend_point (create {EV_COORDINATE}.make (50, 152))
----			bounding_figure.extend_point (create {EV_COORDINATE}.make (60, 190))
----			bounding_figure.extend_point (create {EV_COORDINATE}.make (77, 195))
--			jj_bounding_figure.extend_point (ocean.point_array.item (1))
--			jj_bounding_figure.extend_point (ocean.point_array.item (2))
--			jj_bounding_figure.extend_point (ocean.point_array.item (3))
--			jj_bounding_figure.extend_point (ocean.point_array.item (4))
--			jj_bounding_figure.extend_point (ocean.point_array.item (5))
--			jj_bounding_figure.extend_point (ocean.point_array.item (0))
--			jj_bounding_figure.enable_closed
--			jj_bounding_figure.set_line_width (2)
----			show_bounding_figure
--		end

invariant

	is_valid_sea_area: attached target_imp implies sea_area = game.bay_of_bengal

end
