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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? shaft.java

?? good project for programmer,,
?? JAVA
字號:
package com.sillysoft.lux.agent;import com.sillysoft.lux.*;import com.sillysoft.lux.util.*;////  Shaft.java//	Lux////  Copyright (c) 2002-2007 Sillysoft Games. //	http://sillysoft.net//	lux@sillysoft.net////	This source code is licensed free for non-profit purposes. //	For other uses please contact lux@sillysoft.net//////	Shaft picks countries in continents that have the fewest border points  ////	Shaft also has a slow-acting attackFromCluster() that includes a primitive //		sweepBordersForward method.//import java.util.Random;import java.util.List;import java.util.ArrayList;public class Shaft extends Cluster {public String name()	{	return "Shaft";	}public String description()	{	return "Shaft is a bad mutha.";	}// We are going to try and take over lots of continents. // It's much easier if they are easy to defend continents// pick the ones with least # of border pointspublic int pickCountry()	{	// our first choice is the continent with the least # of borders that is totally empty	if (goalCont == -1 || ! BoardHelper.playerOwnsContinentCountry(-1, goalCont, countries))		{		setGoalToLeastBordersCont();		}	// so now we have picked a cont...	return pickCountryInContinent(goalCont);	}protected void attackFromCluster( Country root )	{	// now run some attack methods for the cluster centered around root:	if (root != null)		{		// do one simple attack		if (! attackEasyExpand(root))			{			attackFillOut(root);			}		// and consolidate our borders as much as possible		while ( attackConsolidate(root) )			{}		if (! board.tookOverACountry())			{			// try and sweep forward our borders			CountryIterator borders = new ClusterBorderIterator(root);			while (borders.hasNext())				{				sweepForwardBorder( borders.next() );				}			}		}	}// tries to take over a couple of countries while keeping to one border country// also only attacks with winnable oddsprotected void sweepForwardBorder( Country sweep )	{	// FIRST --> test if the sweep is worthwhile	// say that we have seen this border's enemies	CountryIterator neib = new NeighborIterator(sweep);	List q = new ArrayList(), seen = new ArrayList();	while (neib.hasNext())		{		Country n = neib.next();		if (n.getOwner() != ID)			{			seen.add(n);			}		}	// run a simulation advance...	startSweep(sweep, q, seen, false);	while (advanceSweep(q, seen, false))	{}	if (q.size() == 1)		{		// then we should totally follow this sweep plan		// reset the q's		neib = new NeighborIterator(sweep);		q = new ArrayList();		seen = new ArrayList();		while (neib.hasNext())			{			Country n = neib.next();			if (n.getOwner() != ID)				{				seen.add(n);				}			}		// and do it for real		startSweep(sweep, q, seen, true);		while (advanceSweep(q, seen, true))	{}		}	}protected int countUnseenEnemies(Country c, List seen)	{	int enemies = 0;	//Country e = null;	CountryIterator neib = new NeighborIterator(c);	while (neib.hasNext())		{		Country n = neib.next();		if (n.getOwner() != ID && ! seen.contains(n))			{			enemies++;			//e = n;			}		}	return enemies;	}// xxagentxx what happens if we lose the forReal attack? we still enque...protected void startSweep(Country from, List q, List seen, boolean forReal)	{	if (forReal)		{		q.add(seen.get(0));		debug("startSweep");		if (from.getArmies() > 1)			board.attack(from, (Country)seen.get(0), true);		}	else		{		for (int i = 0; i < seen.size(); i++)			{			q.add(seen.get(i));			}		}	}/*	for (int i = 0; i < seen.size(); i++)		{		int enemies = countUnseenEnemies((Country)seen.get(i), seen);		if (enemies < 2)	// 0 or 1 will work			{			q.add(seen.get(i));			if (forReal)				{				board.attack(from, (Country)seen.get(i), true);				}			return true;			}		}	return false;	}*/// q is the collection of countries that we don't own but are examining, // to see if they can be compressed into a smaller border// if shouldAttack is true then the sweep will actually be done.// otherwise the q's will be updated but no attack will occurprotected boolean advanceSweep(List q, List seen, boolean forReal)	{	// to make sure that we take over the borders as soon as possible, we check here.	// any 'seen' countries that we don't own will be crushed!!!	if (forReal)		takeOverEnveloped(seen);	boolean swept = false;	for (int i = 0; i < q.size(); i++)		{		// count the enemies we have not seen yet		int enemies = 0;		Country e = null;		CountryIterator neib = new NeighborIterator((Country)q.get(i));		while (neib.hasNext())			{			Country n = neib.next();			if (n.getOwner() != ID && ! seen.contains(n))				{				enemies++;				e = n;				}			}		// if there is only one enemy then advance the q to it		if (enemies == 0)			q.remove(q.get(i));		else if (enemies == 1)			{			if (forReal)				{		debug("advanceSweep");				Country from = (Country)q.get(i);				if (from.getOwner() == ID && from.getArmies() > 1)					board.attack(from, e, true);				}			q.remove(q.get(i));			q.add(e);			seen.add(e);			swept = true;			}		}	return swept;	}protected void takeOverEnveloped(List seen)	{	for (int i = 0; i < seen.size(); i++)		{		if (((Country)seen.get(i)).getOwner() != ID)			takeCountry( seen.get(i) );		}	}protected void takeCountry( Object c )	{	Country into = (Country)c;	// try and find a neighbor that we own, and attack this country	CountryIterator neighbors = new NeighborIterator(into);	while (neighbors.hasNext() && into.getOwner() != ID)		{		Country possAttack = neighbors.next();		if (possAttack.getOwner() == ID && possAttack.getArmies() > into.getArmies() && possAttack.canGoto(into))			{		debug("take country");			board.attack(possAttack, into, true);			}		}	}public String youWon()	{ 	String[] answers = new String[] {"Can you dig it?",		"Damn right",		"You sure got a lotta mouth on you",		"c'mere, baby!",		"Why don't you stop playin' with yourself",		"You a cagey spook, Bumpy",		"You know me. \nIt's my duty to please that booty", 		"You're too hot, man. \nYou gotta step off a bit",		"Chicks dig me because I rarely wear underwear",		"If brains were dynamite \nyou couldn't blow your nose" };	return answers[ rand.nextInt(answers.length) ];	}}	// End of Cluster class

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲乱码中文字幕| 一本一道久久a久久精品| 伊人一区二区三区| 国产精品婷婷午夜在线观看| 精品国产百合女同互慰| 欧美日韩一级视频| 在线不卡一区二区| 欧美日韩三级在线| 51精品久久久久久久蜜臀| 欧美日韩一级黄| 欧美精品视频www在线观看| 日本久久精品电影| 色婷婷亚洲综合| 欧美性受极品xxxx喷水| 欧美系列在线观看| 69p69国产精品| 精品久久一二三区| 国产日韩欧美综合一区| 国产精品久久久久久妇女6080| 国产精品久久久久久久久快鸭| 综合色天天鬼久久鬼色| 亚洲精选免费视频| 亚洲电影一区二区三区| 日韩精品免费专区| 久草热8精品视频在线观看| 日本不卡视频一二三区| 国产一区二区三区久久久| 国产一区在线不卡| 色欧美乱欧美15图片| 欧洲av一区二区嗯嗯嗯啊| 538在线一区二区精品国产| 日韩欧美一级特黄在线播放| 精品sm在线观看| 亚洲男人都懂的| 美女视频免费一区| 成人毛片在线观看| 欧美酷刑日本凌虐凌虐| 久久综合久久鬼色中文字| 国产精品美女www爽爽爽| 亚洲在线观看免费| 国产在线精品一区二区三区不卡| 成人精品电影在线观看| 欧美理论电影在线| 国产精品乱码人人做人人爱| 午夜精品一区二区三区三上悠亚| 激情文学综合网| 色噜噜夜夜夜综合网| 日韩欧美一区二区久久婷婷| 亚洲精品亚洲人成人网在线播放| 久热成人在线视频| 色噜噜狠狠色综合中国| 久久青草欧美一区二区三区| 亚洲在线视频网站| www.66久久| 精品国产免费一区二区三区香蕉| 亚洲免费av在线| 国产精品99久| 精品久久久久久久久久久院品网| 亚洲女女做受ⅹxx高潮| 国产成人av一区二区三区在线 | 国产精品另类一区| 日韩影院在线观看| 91高清在线观看| 国产精品私房写真福利视频| 蜜桃一区二区三区在线观看| 欧美日韩国产在线观看| 亚洲精品高清视频在线观看| 国产最新精品精品你懂的| 欧美日韩五月天| 亚洲国产日产av| 91免费版在线| 亚洲欧美电影一区二区| 懂色av一区二区三区蜜臀| 久久一夜天堂av一区二区三区| 亚洲成人一二三| 欧美日韩精品专区| 亚洲高清免费视频| 欧美日韩黄视频| 午夜日韩在线观看| 91极品美女在线| 亚洲精品中文在线| 色婷婷久久99综合精品jk白丝| 中文字幕一区二区三区蜜月| 成人综合在线观看| 亚洲国产高清在线观看视频| 高清成人在线观看| 国产精品乱码一区二区三区软件| 成人美女视频在线观看| 亚洲女爱视频在线| 欧美三级日韩三级国产三级| 午夜精品福利在线| 日韩天堂在线观看| 国产在线不卡一卡二卡三卡四卡| 精品91自产拍在线观看一区| 国产精品资源在线观看| 亚洲国产成人私人影院tom| 成人黄色小视频在线观看| 18成人在线视频| 欧美午夜精品久久久| 日韩电影在线观看一区| 91精品国产欧美一区二区| 久久精品国产一区二区三| 久久精品人人做人人爽97| 不卡视频在线观看| 亚洲成人av在线电影| 欧美v亚洲v综合ⅴ国产v| 成人v精品蜜桃久久一区| 夜夜操天天操亚洲| 日韩一级免费一区| zzijzzij亚洲日本少妇熟睡| 亚洲欧美国产77777| 日韩小视频在线观看专区| 国产suv精品一区二区6| 一区二区高清视频在线观看| 精品成a人在线观看| 色噜噜狠狠成人网p站| 美女尤物国产一区| 国产精品青草久久| 91精品国产乱| 99久久久久久| 美女性感视频久久| 亚洲男帅同性gay1069| 日韩欧美国产成人一区二区| 91在线视频免费91| 精品一区二区免费视频| 亚洲蜜臀av乱码久久精品| 日韩欧美aaaaaa| 欧美日韩亚洲综合一区二区三区| 国产乱码字幕精品高清av| 亚洲h精品动漫在线观看| 国产精品免费aⅴ片在线观看| 51精品久久久久久久蜜臀| 91女厕偷拍女厕偷拍高清| 精品在线一区二区| 亚洲va欧美va国产va天堂影院| 国产精品久久久久桃色tv| 精品国产一区二区三区久久影院| 色噜噜狠狠色综合中国| 成人av在线影院| 国产一区二区三区免费观看| 亚洲成人免费av| 亚洲国产精品久久久久婷婷884 | 丁香婷婷综合色啪| 久久国产乱子精品免费女| 亚洲成人激情综合网| 亚洲蜜臀av乱码久久精品蜜桃| 久久久精品国产免费观看同学| 7777精品伊人久久久大香线蕉最新版 | 欧美精品成人一区二区三区四区| 不卡av电影在线播放| 国产精品1区二区.| 国产一区二区三区免费播放| 久久精品国内一区二区三区| 日韩精品一级二级| 免费欧美日韩国产三级电影| 五月婷婷欧美视频| 日韩精品1区2区3区| 午夜精品久久久久久久| 亚洲成人手机在线| 午夜精品一区在线观看| 亚洲综合一区二区三区| 一区二区三区自拍| 亚洲成a人片在线观看中文| 亚洲成人av一区| 蜜臀av在线播放一区二区三区| 日韩一区精品字幕| 日本午夜一区二区| 日本v片在线高清不卡在线观看| 午夜视频在线观看一区二区三区| 亚洲制服丝袜av| 蜜臀久久99精品久久久久久9 | 久久综合久色欧美综合狠狠| 日韩一卡二卡三卡| 久久久久成人黄色影片| 久久精品视频一区| 日韩美女精品在线| 亚洲h在线观看| 韩国视频一区二区| 懂色av一区二区三区免费观看| 一本一道久久a久久精品| 7777女厕盗摄久久久| 国产视频一区在线观看 | 一区二区三区国产精华| 亚洲va韩国va欧美va| 狠狠色丁香婷婷综合| 成人不卡免费av| 91麻豆精品国产自产在线| 久久婷婷国产综合精品青草| 国产精品乱码久久久久久| 亚洲va欧美va人人爽午夜| 国产精品一级片| 欧美在线观看你懂的| 久久综合一区二区| 亚洲免费观看高清完整版在线 | 国产一区二三区| 在线影视一区二区三区| 精品久久久影院| 亚洲线精品一区二区三区八戒| 国产一区视频导航| 欧美精品电影在线播放|