生命游戏-JAVA语言代码-细胞自动机-毕业论文

2026/4/24 10:51:17

浙江理工大学本科毕业设计(论文)

public int getGroundLevel() {

return groundLevel;

39

}

// -------------------------get set------------------------- public int getX() { }

return x;

public void setX(int x) { }

this.x = x;

public int getY() { }

return y;

public void setY(int y) { }

this.y = y;

public int getGroundType() { }

return groundType;

public void setGroundType(int groundType) { }

this.groundType = groundType;

生命游戏的计算机模拟以及参数对运行结果的分析

}

public void setOrganisms(List organisms) { }

this.organisms = organisms; public List getOrganisms() { }

return organisms;

public void setPercent(double percent) { }

this.percent = percent; public double getPercent() { }

return percent;

public void setGroundLevel(int groundLevel) { }

this.groundLevel = groundLevel; }

3.环境单元格类

package com.apei.lifegame.model.condition;

import javax.swing.JPanel;

public class GroundPanel extends JPanel{

40

浙江理工大学本科毕业设计(论文)

}

private static final long serialVersionUID = -6915526788758258155L;

private GroundUnit ground;

public GroundPanel() { }

public GroundPanel(int x,int y) { }

public GroundUnit getGround() { }

public void setGround(GroundUnit ground) { }

this.ground = ground; return ground;

ground=new GroundUnit(x,y,0,0); ground=new GroundUnit();

4.色彩获取工具类

package com.apei.lifegame.util;

import java.awt.Color;

public class ColorHelper {

static String[][] colors = {

{

\

\

\

\

\

{ \

41

生命游戏的计算机模拟以及参数对运行结果的分析

{ \

{ \

static String[] playerColors = {\

public static Color getColorFromTypeAndLevel(int type, int level) {

String color = colors[type][level];

String[] num = color.split(\

return new Color(Integer.valueOf(num[0]), Integer.valueOf(num[1]),

Integer.valueOf(num[2]));

}

//获取玩家颜色

public static Color getPlayerColor(int player){ }

// 随即颜色

public static Color getRandomColor() {

return

String[] num = playerColors[player].split(\

return new Color(Integer.valueOf(num[0]), Integer.valueOf(num[1]),

Integer.valueOf(num[2]));

Color.getHSBColor(Float.valueOf(String.valueOf(Math.random())), }

42

}

Float.valueOf(String.valueOf(Math.random())), Float.valueOf(String.valueOf(Math.random())));


生命游戏-JAVA语言代码-细胞自动机-毕业论文.doc 将本文的Word文档下载到电脑
搜索更多关于: 生命游戏-JAVA语言代码-细胞自动机-毕业论文 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219