#include "signals.h"
locate 236,296
print "Bienvenue"
sleep 1
cls
for i = 0 to nb_player-1
	set_current_player i
	if((player_side i) = "arm")
		player_com=create_unit "ARMCOM"
	else
		player_com=create_unit "CORCOM"
	end if
	move_unit player_com (rand map_w)-map_w/2,(rand map_h)-map_h/2,0.0
next
while 1		// Surveille la partie
	win=1
	for i = 1 to nb_player-1
		set_current_player i
		if(has_unit "ARMCOM" || has_unit "CORCOM")
//		if !(annihilated i) then
			win=0
		end if
	next
	set_current_player 0
	if(win && !(has_unit "ARMCOM" || has_unit "CORCOM"))
//	if win && (annihilated 0) then
		locate 236,280
		print "MATCH NUL!"
		sleep 5
		signal SIGNAL_NUL
	else
		if(win && (has_unit "ARMCOM" || has_unit "CORCOM"))
//		if win && !(annihilated 0) then
//			locate 236 284
//			print "VICTOIRE!"
			play "VICTORY2"
			victory_bitmap=load "victory.tga"
			put victory_bitmap 160,140
			sleep 5
			signal SIGNAL_VICTORY
		else
			if(!(has_unit "ARMCOM" || has_unit "CORCOM"))
//			if annihilated 0 then
				locate 236,288
				print "DEFAITE!"
				sleep 5
				signal SIGNAL_DEFEAT
			end if
		end if
	end if
wend
