%not necessary
choose_taoist(PlayerActive):-
	active(_,_,Colour1,_,_,Player1),
	active(_,_,Colour2,_,_,Player2),
	active(_,_,Colour3,_,_,Player3),
	Player1\=Player2,
	Player1\=Player3,
	Player2\=Player3,
	PlayerActive\=Player1,
	PlayerActive\=Player2,
	PlayerActive\=Player3,
	free(@taoistwindow),
	new(@taoistwindow,dialog('Choose a Taoist')),
	new(Taoist1,button(Player1)),
	new(Taoist2,button(Player2)),
	new(Taoist3,button(Player3)),
	retractall(chooseTaoist(_,_)),
	assert(chooseTaoist(Taoist1,Colour1)),
	assert(chooseTaoist(Taoist2,Colour2)),
	assert(chooseTaoist(Taoist3,Colour3)),
	send(Taoist1,colour,Colour1),
	send(Taoist2,colour,Colour2),
	send(Taoist3,colour,Colour3),
	send(Taoist1,message,message(@prolog,remove_taoist_window, Taoist1)),
	send(Taoist2,message,message(@prolog,remove_taoist_window, Taoist2)),
	send(Taoist3,message,message(@prolog,remove_taoist_window, Taoist3)),
	send(@taoistwindow,append,Taoist1),
	send(@taoistwindow,append,Taoist2,right),
	send(@taoistwindow,append,Taoist3,right),
	send(@taoistwindow,open),!.


