亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? betterpixie.java

?? good project for programmer,,
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
	enemyCount *= 1.3;	CountryIterator continent = new ContinentIterator(cont, countries);	while (continent.hasNext())		if (continent.next().getOwner() != ID)			enemyCount++;	// Count the friendlies (our armies in the cont and our armies in countries neighboring the cont)	int friendlyCount = BoardHelper.getPlayerArmiesInContinent(ID, cont, countries);	friendlyCount += BoardHelper.getPlayerArmiesAdjoiningContinent(ID, cont, countries);	debug("Attacking in continent "+board.getContinentName(cont)+". friendlies = "+friendlyCount+", enemies = "+enemyCount);	if (enemyCount > friendlyCount)		return;	boolean attackMade = true;	while (attackMade)		{		// We cycle through the continent 2 seperate times...		// Start by only attacking from our countries that have 1 enemy country		while (attackMade)			{			attackMade = false;			continent = new ContinentIterator(cont, countries);			while (continent.hasNext())				{				Country c = continent.next();				if (c.getOwner() == ID && getNumberOfEnemyNeighborsInOurConts(c) == 1 && c.getArmies() > 1)					{					// This country can only attack 1 good destination, so attack it					Country[] adjoining = c.getAdjoiningList();					for(int i = 0; i < adjoining.length; i++)						if (adjoining[i].getOwner() != ID && ourConts[adjoining[i].getContinent()]								&& c.getArmies() > adjoining[i].getArmies()*outnumberBy)							{							board.attack(c, adjoining[i], true);							attackMade = true;							}					}				}			}		// Now make any good attacks we can...		continent = new ContinentIterator(cont, countries);		while (continent.hasNext())			{			Country c = continent.next();			if (c.getOwner() != ID)				{				// try and find a neighbor that we own, and attack this country				CountryIterator neighbors = new NeighborIterator(c);				while (neighbors.hasNext())					{					Country possAttack = neighbors.next();					if (possAttack.getOwner() == ID && possAttack.getArmies() > c.getArmies()*outnumberBy && c.getOwner() != ID && possAttack.canGoto(c))						{						board.attack(possAttack, c, true);						attackMade = true;						}					}				}			}		}	}// A check to see if someone else owns this continent. If they do then we try to kill itprotected void takeOutContinentCheck( int cont )	{	if (BoardHelper.anyPlayerOwnsContinent( cont, countries ) && board.getContinentBonus(cont) > 0)		{		if (countries[BoardHelper.getCountryInContinent(cont, countries)].getOwner() != ID)			{			debug("enemy owns continent "+cont);			// then an enemy owns this continent.			// calculate if it's worth it to hit the continent/*			int continentBonus = board.getContinentBonus(cont);						int[] path = BoardHelper.cheapestRouteFromOwnerToCont(ID, cont, countries);			if (path != null)				{				int costToHit = pathCost(path);				if (costToHit < continentBonus)					{					System.out.println(board.getPlayerName(ID)+" thinks it is worth it to take out continent "+board.getContinentName(cont)+" from player "+board.getPlayerName(countries[BoardHelper.getCountryInContinent(cont, countries)].getOwner())+" ("+continentBonus+" bonus vs "+costToHit+" costToHit)");					}				}*/									// Check all of it's borders for a weak spot			int[] borders = BoardHelper.getContinentBorders(cont, countries);			for (int b = 0; b < borders.length; b++)				{				Country[] neigbors = countries[borders[b]].getAdjoiningList();				for (int n = 0; n < neigbors.length; n++)					{					if (neigbors[n].getOwner() == ID && 							neigbors[n].getArmies() > countries[borders[b]].getArmies() * 2 && neigbors[n].canGoto(countries[borders[b]]))						{						// kill him						debug("attacking to take out continent "+cont);						if (board.attack(neigbors[n], countries[borders[b]], true) > 0)							return;						}					}				}			}		}	}protected int getNumberOfEnemyNeighborsInOurConts(Country c)	{	int result = 0;	Country[] adjoining = c.getAdjoiningList();	for(int i = 0; i < adjoining.length; i++)		if (adjoining[i].getOwner() != ID && ourConts[adjoining[i].getContinent()])			result++;	return result;	}public int moveArmiesIn( int cca, int ccd)	{	int testCode = obviousMoveArmiesInTest(cca, ccd);	if (testCode != -1)		return testCode;	testCode = memoryMoveArmiesInTest(cca, ccd);	if (testCode != -1)		return testCode;	// test if they border any enemies at all:	int attackerEnemies = countries[cca].getNumberEnemyNeighbors();	int defenderEnemies = countries[ccd].getNumberEnemyNeighbors();	if (attackerEnemies == 0 && defenderEnemies != 0)		return 1000000;	else if (attackerEnemies != 0 && defenderEnemies == 0)		return 0;	// Possibly they both have 0 enemies:	else if (defenderEnemies == 0)		return countries[cca].getArmies()/2;	// OK, so they both have some enemies. Look again only considering the enemies that are in conts we care about.	// (And make a note of the enemies for later)	List attackerEnemyList = new ArrayList(), defenderEnemyList = new ArrayList();	attackerEnemies = 0;	defenderEnemies = 0;	Country[] adjoining = countries[cca].getAdjoiningList();	for(int i = 0; i < adjoining.length; i++)		if (adjoining[i].getOwner() != ID && ourConts[adjoining[i].getContinent()])			attackerEnemyList.add(adjoining[i]);	adjoining = countries[ccd].getAdjoiningList();	for(int i = 0; i < adjoining.length; i++)		if (adjoining[i].getOwner() != ID && ourConts[adjoining[i].getContinent()])			defenderEnemyList.add(adjoining[i]);	if (attackerEnemyList.size() == 0 && defenderEnemyList.size() != 0)		return 1000000;	else if (attackerEnemyList.size() != 0 && defenderEnemyList.size() == 0)		return 0;	// Possibly they both have 0 enemies in conts we want:	else if (attackerEnemyList.size() == 0)		return countries[cca].getArmies()/2;	// OK, so they both have some enemies in continents we care about. Do they connect?	List allEnemies = new ArrayList(attackerEnemyList);	for (int i = 0; i < defenderEnemyList.size(); i++)		if (! allEnemies.contains(defenderEnemyList.get(i)))			allEnemies.add(defenderEnemyList.get(i));	CountryClusterSet enemySet = CountryClusterSet.getHostileCountries(ID, allEnemies);	// If they all connect then move everyone in	if (enemySet.numberOfClusters() == 1)		return 1000000;	return countries[cca].getArmies()/2;	}public void fortifyPhase()	{	for (int i = 0; i < numContinents; i++)		{		if (BoardHelper.playerOwnsContinent(ID, i, countries))			{			while( fortifyContinent( i )) { debug("Fortifying continent "+board.getContinentName(i)); }			}		else			{			fortifyContinentScraps(i);			}		}	}	// End of fortifyPhase() methodprotected boolean fortifyContinent( int cont )	{	boolean fortifiedSomething = false;	// We work from the borders back, fortifying closer.	// Start out by getting a List of the cont's borders:	int[] borders = BoardHelper.getContinentBorders(cont, countries);	List cluster = new ArrayList();	for (int i = 0; i < borders.length; i++) {		cluster.add(countries[borders[i]]);		}	// So now the cluster borders are in <cluster>. fill it up while fortifying towards the borders.	for (int i = 0; i < cluster.size(); i++) {		CountryIterator neighbors = new NeighborIterator( (Country)cluster.get(i) );		while ( neighbors.hasNext()) {			Country neighbor = neighbors.next();			if ( neighbor.getOwner() == ID && ! cluster.contains(neighbor) 				&& neighbor.getContinent() == cont && neighbor.getMoveableArmies() > 0) 				{				debug(" -> fortify "+neighbor.getMoveableArmies()+" armies from "+neighbor+" to "+cluster.get(i)); 				// Then <neighbor> is part of the cluster. fortify any armies back and add to the List				if (board.fortifyArmies( neighbor.getMoveableArmies(), neighbor, (Country)cluster.get(i) ) == 1)					fortifiedSomething = true;				cluster.add(neighbor);				}			}		}	return fortifiedSomething;	}// called on continents that we don't own.// fortify our guys towards weak enemy countries.protected void fortifyContinentScraps( int cont)	{	CountryIterator e = new ContinentIterator(cont, countries);	while (e.hasNext())		{		Country c = e.next();		if (c.getOwner() == ID && c.getMoveableArmies() > 0)			{			// we COULD move armies from 'c'			int weakestArmies = 1000000;			Country weakestLink = null;			// if it has a neighbor with a weaker enemy then move there			CountryIterator n = new NeighborIterator(c);			while (n.hasNext())				{				Country possMoveTo = n.next();				if (possMoveTo.getOwner() == ID)					{					Country themWeak = possMoveTo.getWeakestEnemyNeighbor();					if (themWeak != null && themWeak.getArmies() < weakestArmies)						{						weakestArmies = possMoveTo.getWeakestEnemyNeighbor().getArmies();						weakestLink = possMoveTo;						}					}				}			Country hereWeakest = c.getWeakestEnemyNeighbor();			// if a neighbor has a weaker country then we do here move our armies			if (hereWeakest == null || weakestArmies < hereWeakest.getArmies())				{				if (weakestLink != null)					board.fortifyArmies( c.getMoveableArmies(), c, weakestLink );				}			}		}	}public String youWon()	{ 	String[] answers = new String[] { 		"Poof! I win"		};	return answers[ rand.nextInt(answers.length) ];	}}	// End of Pixie class

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97精品视频在线观看自产线路二| 亚洲精选免费视频| 精品国产免费人成电影在线观看四季| 精品嫩草影院久久| 亚洲特级片在线| 日韩黄色免费网站| 成人av电影在线网| 91精品国产综合久久久蜜臀图片 | 一区二区视频在线| 国产在线看一区| 欧美自拍丝袜亚洲| 亚洲国产成人自拍| 久久99国产精品久久| 91麻豆国产香蕉久久精品| 精品入口麻豆88视频| 一区二区激情小说| 国产精品亚洲综合一区在线观看| 在线观看免费视频综合| 国产欧美日韩在线看| 日韩不卡免费视频| 欧美午夜精品免费| 最近日韩中文字幕| 国产成人自拍在线| 91精品综合久久久久久| 亚洲欧美激情在线| 国产伦理精品不卡| 日韩免费在线观看| 欧美一级视频精品观看| 一区二区三区国产精品| 成人综合婷婷国产精品久久| 精品福利av导航| 奇米精品一区二区三区在线观看 | 一区二区三区91| k8久久久一区二区三区| 久久久久久久网| 精品一区二区在线观看| 日韩欧美国产一区二区在线播放| 一区二区三区小说| 一本色道久久综合精品竹菊| 中文字幕一区二区在线观看| 福利一区二区在线| 久久精品人人做人人综合| 国产一区欧美一区| 精品视频在线看| 亚洲无线码一区二区三区| 在线欧美日韩国产| 亚洲欧美另类小说| 在线观看精品一区| 国产精品久久久一本精品 | 九一久久久久久| 日韩亚洲欧美中文三级| 日韩电影一区二区三区四区| 欧美电影在线免费观看| 日韩av电影天堂| 精品国产三级a在线观看| 狠狠色丁香九九婷婷综合五月| 欧美成人精品1314www| 九九视频精品免费| 久久久www免费人成精品| 成人午夜电影网站| 亚洲精品乱码久久久久久久久| 97超碰欧美中文字幕| 亚洲人成网站影音先锋播放| 欧美日韩中文一区| 视频一区视频二区中文字幕| 精品噜噜噜噜久久久久久久久试看 | 国产成人精品免费| 国产三级久久久| 日本韩国一区二区| 蜜臀国产一区二区三区在线播放| 久久综合久久综合久久| 99精品久久只有精品| 五月天久久比比资源色| 精品美女被调教视频大全网站| 成人福利视频网站| 日日夜夜精品免费视频| 久久久欧美精品sm网站| 色哟哟精品一区| 毛片不卡一区二区| 亚洲摸摸操操av| 精品区一区二区| 91视频一区二区三区| 免费观看一级特黄欧美大片| 日本一区二区不卡视频| 欧美三电影在线| 成人性生交大片免费看视频在线| 日韩和的一区二区| 综合久久给合久久狠狠狠97色| 91精品欧美福利在线观看| 成人爱爱电影网址| 久久成人精品无人区| 亚洲一区在线看| 中文字幕av一区 二区| 日韩欧美国产一区在线观看| 欧美性猛交xxxx乱大交退制版| 国产99久久久国产精品免费看| 奇米精品一区二区三区四区| 亚洲视频一二三区| 国产欧美日韩中文久久| 日韩欧美不卡在线观看视频| 色呦呦日韩精品| 色婷婷综合久久久中文一区二区| 国产精品影视天天线| 精品一区二区三区免费毛片爱| 天堂一区二区在线免费观看| 亚洲视频免费在线| 欧美一区二区观看视频| 欧美日韩你懂的| 欧美国产日韩精品免费观看| 日韩精品中文字幕在线不卡尤物 | 色网综合在线观看| 国产裸体歌舞团一区二区| 国产精品国产三级国产aⅴ中文 | 久久精品国产亚洲5555| www亚洲一区| 一本一道波多野结衣一区二区| 国产成人午夜片在线观看高清观看| 国产精品欧美一级免费| 国产成人精品亚洲午夜麻豆| 亚洲一区二区三区中文字幕| 国产日韩欧美不卡在线| 欧美私人免费视频| 国产精品一二二区| 午夜久久电影网| 免费高清成人在线| 亚洲三级电影网站| 亚洲精品在线观看网站| 日韩一区中文字幕| 亚洲欧美日韩综合aⅴ视频| 精品国产一区二区在线观看| 色视频成人在线观看免| 亚洲成人激情自拍| 亚洲成av人片www| 国产精品天美传媒| 7777精品伊人久久久大香线蕉经典版下载 | 最新不卡av在线| 国产高清久久久久| 亚洲在线一区二区三区| 日韩在线一区二区三区| 中文字幕+乱码+中文字幕一区| 欧美日韩国产美女| 视频一区欧美精品| 国产在线精品免费av| 日韩影院在线观看| 亚洲摸摸操操av| 自拍偷拍亚洲激情| 肉丝袜脚交视频一区二区| 一区二区三区国产精华| 日韩美女视频一区| 丝袜亚洲另类欧美| 国产成人夜色高潮福利影视| 美女网站一区二区| 午夜精品视频一区| 奇米精品一区二区三区在线观看一| 亚洲欧美日韩国产一区二区三区| 精品国精品国产尤物美女| 日韩一区二区三区视频在线观看| 91毛片在线观看| 欧美性一级生活| 99视频有精品| 一本色道久久综合亚洲精品按摩 | www久久精品| 日韩一二三四区| 日韩欧美中文一区| 久久免费美女视频| 久久视频一区二区| 亚洲图片有声小说| 日日骚欧美日韩| 日本aⅴ免费视频一区二区三区| 午夜精品久久久久久久蜜桃app| 激情成人午夜视频| 国模一区二区三区白浆| 亚洲成人www| 久久久一区二区三区捆绑**| 中文字幕一区二区三区在线不卡 | 一区二区三区欧美日韩| 亚洲精品美腿丝袜| 日本v片在线高清不卡在线观看| 日本一区免费视频| 麻豆精品久久久| 国产成人精品亚洲777人妖 | 日本午夜精品视频在线观看| 日韩一区精品视频| 国产精品久久久久天堂| 秋霞成人午夜伦在线观看| 久久精品国产久精国产| 国产福利不卡视频| 亚洲成人福利片| 91欧美激情一区二区三区成人| 91麻豆产精品久久久久久 | 99国产精品国产精品毛片| 一本大道久久a久久综合| 在线欧美日韩精品| 亚洲三级久久久| 日韩高清在线观看| 国产精品77777| 久久久久综合网| 亚洲精品国产无天堂网2021| 久久激五月天综合精品| 亚洲激情五月婷婷|