function KakoiGamer(Gamer1X, Gamer1Y, Gamer2X, Gamer2Y, MonstrX,MonstrY: Double): string;
var
Game1x, Game2x, Game1y, Game2y: Double;
begin
if Gamer1X>monstrx then
Game1x:=Gamer1X-monstrx else
Game1x:=MonstrX-Gamer1X;
if Gamer2X>monstrx then
Game2x:=Gamer2X-monstrx else
Game2x:=MonstrX-Gamer2X;
if Gamer1Y>monstry then
Game1y:=Gamer1Y-monstry else
Game1y:=Monstry-Gamer1Y;
if Gamer2Y>monstry then
Game2y:=Gamer2Y-monstrY else
Game2y:=MonstrY-Gamer2Y;
if (Game1x+Game1y)>(Game2x+Game2y) then
result:='Gamer2' else result:='Gamer1';
end;