云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 生命游戏-JAVA语言代码-细胞自动机-毕业论文

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

  • 62 次阅读
  • 3 次下载
  • 2025/5/3 6:06:42

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

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())));

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

浙江理工大学本科毕业设计(论文) 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) { }

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com