note
	description: "[
		A widget connecting interface to an AMPHIBIOUS_UNIT for use in VITP.
		]"
	author: "Jimmy J. Johnson"

class
	AMPHIBIOUS_UNIT_WIDGET

inherit

	ATTACK_UNIT_WIDGET
		redefine
			position_widgets,
--			build_picture,
			unit_color,
			target_imp
		end

create
	make

feature {NONE} -- Initialization

	position_widgets
			-- Redefined to make smaller than the attack widget
		do
			Precursor {ATTACK_UNIT_WIDGET}
			scale (0.7)
			picture.scale (0.13)
			picture.set_x_y (tile.x, tile.y)
		end

--	build_picture
--			-- Build the `picture'.
--		do
--				-- The `silhouette_table' contains a function for
--				-- the `Amphibious_symbol' indexed by the Yokosuka.
----			picture.copy (silhouette (game.yokosuka))
----			picture.add_points (game.yokosuka)
--		end

feature {NONE} -- Implementation

	unit_color: EV_COLOR
			-- Get the color to paint the tile based on the unit's nationality
		do
			if unit.nationality = {NATIONALITY_CONSTANTS}.japanese then
				Result := Japanese_air_unit_color
			elseif unit.nationality = {NATIONALITY_CONSTANTS}.us then
				Result := US_air_unit_color
			else
				Result := Green
				check
					should_not_happen: False
				end
			end
		end

feature {NONE} -- Implementation

	target_imp: detachable AMPHIBIOUS_UNIT
			-- Anchor for the `target' represented by Current

end
