




已阅读5页,还剩44页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
佛山科学技术学院佛山科学技术学院 可视化编程技术可视化编程技术 课程设计报告课程设计报告 计算器软件设计计算器软件设计 学生姓名 学生姓名 吴晓莉吴晓莉 学学 号 号 2011914210 年级专业 年级专业 11 级教育技术学级教育技术学 2 班班 指导老师 指导老师 容汝佳容汝佳 学学 院 院 教育科学学院教育科学学院 广东 佛山 提交日期 2013 年 6 月 1 目目 录录 1 1 前言前言 2 2 2 2 概要设计 概要设计 3 3 2 12 1 开发环境开发环境 3 3 2 22 2 游戏功能游戏功能 3 3 2 32 3 界面设计界面设计 3 3 2 42 4 类的框架结构图类的框架结构图 4 4 3 3 详细设计详细设计 4 4 3 13 1 使用的使用的 JAVAJAVA 类的说明类的说明 4 4 3 23 2 类的主要方法类的主要方法 5 5 3 2 13 2 1 处理按了运算符后的计算处理按了运算符后的计算 5 5 3 2 23 2 2 处理输入字符处理输入字符 6 6 3 2 33 2 3 进制的转换进制的转换 6 6 3 2 43 2 4 设计总体认识设计总体认识 7 7 3 2 53 2 5 程序流程图程序流程图 8 8 4 4 运行结果运行结果 8 8 5 5 测试分析测试分析 9 9 5 15 1 程序运行情况程序运行情况 9 9 5 25 2 程序异常处理程序异常处理 9 9 6 6 源程序源程序 9 9 参考文献参考文献 27 27 设计总结设计总结 27 27 2 摘要 摘要 该程序是一个扫雷的小游戏 具有赶紧简洁的游戏界面 玩者只要是 曾经玩过扫雷的游戏 那么我这个游戏是很容易上手的 该游戏具有三种模式 简单模式 中等模式以及复杂模式 游戏界面上有一个显示剩余雷数目的小方 框 还有一个计时的小方框 中间是一个 重新玩的按钮 选择菜单栏有重新 玩 可以选择模式 还能退出 关键字 关键字 java 扫雷 游戏类 方法 事件 1 前言前言 学生的学习压力越来越大 应当有适时的娱乐放松 所以我在学习了 java 语言之后 决定用 java 语言编写一个简单的扫雷小游戏 可以实现简单 的娱乐功能 且比普通的扫雷游戏增加一些功能 Java 是由 Sun 公司开发的新一代纯面向对象的网络编程语言 其目标是建 立一种在任意种机器 任一种操作系统的网络环境中运行的软件 实行所谓的 程序写一次 到处运行 的目标 正因为如此 Java 已成为当今 Internet 上最流行 最受欢迎的一种程序开发语言 Java 开发小组把 Java 按特性分为基本版 移动版 企业版 每个版本有 一个软件开发包 Java 基本版本叫 Java 2 标准版 Java 2 Standard Edition J2SE 它包含建立 Java 应用程序或者是 Applet 所需的应用程序编程 接口 API Java 2 移动版 The Java 2 Mobile Edition J2ME 包含创建 无线 Java 应用程序的 API 还有 Java 2 企业版 The Java 2 Enterprise J2EE 是 J2SE 的增强版本 包含建立多层架构应用程序 API Java 语言是由 C 语言发展起而来的 是一种彻底的面向对象的程序设计 语言 作为一种纯面向对象的程序设计语言 它非常适合大型软件的开发 Java 语言去掉了 C 语言的一些容易引起错误的特性 Java 语言的特点有 面 向对象 跨平台 安全性 多线程和图形功能强 3 2 概要设计概要设计 2 1 开发环境开发环境 开发平台 Microsoft Windows XP Professional Service Pack 2 开发工具 JBuilder 2007 JDK 1 6 0 02 2 2 游戏功能游戏功能 功能 1 打开游戏之后 会默认进入疯狂模式 可以通过菜单栏选择不同的游戏模 式 功能 2 游戏界面的左边有个小框 用来显示当前界面剩余雷的数目 功能 3 游戏界面的右边有一个小框 用来显示当前游戏已经进行了的时间 秒 功能 4 游戏界面的中间有一个按钮 点击可以重新开始游戏 功能 5 菜单栏的二级菜单有选项可以退出游戏 2 32 3 界面设计界面设计 图 2 3 1 游戏面板 疯狂模式 4 图 2 3 2 游戏面板 中等模式 图 2 3 3 游戏面板 简单模式 5 2 4 类类的框架结构图的框架结构图 BottomPanel 如图 2 4 1 所示 CenterPanel 如图 2 4 2 所示 Display 如图 2 4 3 所示 Field 如图 2 4 4 所示 Digit 如图 2 4 5 所示 J sweep 如图 2 4 6 所示 NorthPanel 如图 2 4 7 所示 BottomPanel 属性 private static final long serialVersionUID 操作 public BottomPanel 图 2 4 1 CenterPanel 属性 private static final long serialVersionUID 1L private int countX countY fieldsLeft private Field fields private Difficulty difficulty private Random random private boolean gameOver private J sweep minesweeper public CenterPanel J sweep minesweeper Difficulty difficulty public void setMinesweeper Difficulty difficulty private void setFields public void paint Graphics g 6 图 2 4 2 Display 属性 private static final long serialVersionUID 1L private Digit digit0 digit1 digit2 private int value 操作 public Display int value public void setValue int value public int getValue public void paint Graphics g 图 2 4 3 private void setGameOver private void setWon private void performFieldClick int x int y private void performFieldClickFlagged int x int y private boolean isNeighbourMinesFlagged int x int y public void mousePressed MouseEvent e 7 Field 属性 private int x y neighbourMines private boolean clicked mine flag mineClicked private Color color1 color2 color3 color4 color5 color6 color7 color8 操作 public Field int x int y public boolean setClicked public boolean isClicked public void setMine boolean mine public void incrementNeighbourMines public int getNeighbourMines public int setFlag public boolean isFlag public void setGameOver public void setWon public void paint Graphics g 图 2 4 4 Digit 属性 private int digit x y width height private Color darkRed 操作 public Digit int digit int x int y public void setDigit int digit public void paint Graphics g 图 2 4 5 8 J sweep 属性 private static final long serialVersionUID private NorthPanel northPanel private CenterPanel centerPanel private BottomPanel bottomPanel private JCheckBoxMenuItem miBeginner miIntermediate miExpert private Difficulty difficulty public J sweep public void startTime public void stopTime public void setMines int value public void setMines int value boolean real public void setMainMenuDifficulty public void actionPerformed ActionEvent e public static void main String args 图 2 4 6 NorthPanel private static final long serialVersionUID private J sweep minesweeper private Display mineDisplay timeDisplay private long begin private Timer timer public NorthPanel J sweep minesweeper Difficulty difficulty public void setMinesweeper Difficulty difficulty public void setMines int value boolean real public void startTime public int stopTime public void actionPerformed ActionEvent e 图 2 4 7 9 3 详细设计详细设计 3 1 扫雷游戏使用的扫雷游戏使用的 Java 类的说明类的说明 类名 BottomPanel 作用 这是设计整个界面的底部颜色 继承的父类 JPanel 类 实现的接口 没有 public class BottomPanel extends JPanel private static final long serialVersionUID 2916744287014266788L public BottomPanel super setBackground Color white 这是设计整个界面的底部颜色 类名 J sweep 作用 主类 继承的父类 JFrame 类 实现的接口 ActionListener 类 public class J sweep extends JFrame implements ActionListener private static final long serialVersionUID 3905282627525319706L 生成 序列号 不用管它 private NorthPanel northPanel private CenterPanel centerPanel private BottomPanel bottomPanel private JCheckBoxMenuItem miBeginner miIntermediate miExpert private Difficulty difficulty public J sweep super wxl 扫雷 软件标题 10 setDefaultCloseOperation EXIT ON CLOSE 退出按钮 resizeable 值为 true 时 表示在生成的窗体可以自由改变大小 resizeable 值为 false 时 表示生成的窗体大小是由程序员决定的 用户不可以自由改变该窗体的大小 setResizable false difficulty Difficulty 疯狂模式 默认定义最高难度 JMenuBar menuBar new JMenuBar 菜单栏控件 JMenu menu new JMenu 文件 菜单栏的菜单项 JMenuItem menuItem new JMenuItem 重新玩 菜单栏的下拉菜 单 menuItem addActionListener this 给下拉框加上事件捕捉 menu add menuItem 下拉框放入下拉菜单的控件 menu addSeparator 加个空格线 miBeginner new JCheckBoxMenuItem 简单模式 选择框 下面一 样 不解释 miBeginner addActionListener this menu add miBeginner miIntermediate new JCheckBoxMenuItem 中等模式 miIntermediate addActionListener this menu add miIntermediate miExpert new JCheckBoxMenuItem 疯狂模式 true miExpert addActionListener this menu add miExpert menu addSeparator menuItem new JMenuItem 退出 menuItem addActionListener this menu add menuItem menuBar add menu setJMenuBar menuBar 把菜单栏加入面板 northPanel new NorthPanel this Difficulty 疯狂模式 定义一个面 板 add northPanel BorderLayout NORTH 把这个面板放在上面 centerPanel new CenterPanel this Difficulty 疯狂模式 add centerPanel BorderLayout CENTER 把这个面板放在中间 调整此窗口的大小 以适合其子组件的首选大小和布局 XJQ bottomPanel new BottomPanel add bottomPanel BorderLayout SOUTH pack 设置窗口相对于指定组件的位置 setLocationRelativeTo null 11 设置可视化 setVisible true 类名 CenterPanel 作用 设置中间面板 继承的父类 JPanel 类 实现的接口 MouseListener 类 public class CenterPanel extends JPanel implements MouseListener private static final long serialVersionUID 1L private int countX countY fieldsLeft private Field fields 用数组定义界面的横向和纵向 private Difficulty difficulty 定义难度 private Random random private boolean gameOver private J sweep minesweeper 类名 Display 作用 计时 继承的父类 JPanel 类 实现的接口 没有 public class Display extends JPanel private static final long serialVersionUID 1L private Digit digit0 digit1 digit2 定义了一个表示雷的有 无 不确定 的量 private int value 类名 Field 作用 定义数字的颜色 继承的父类 没有 实现的接口 没有 public class Field private int x y neighbourMines private boolean clicked mine flag mineClicked 12 private Color color1 color2 color3 color4 color5 color6 color7 color8 定义了从 1 8 之间 八个数字的颜色 类名 NorthPanel 作用 定义中间面板 继承的父类 JPanel 类 实现的接口 ActionListener 类 public class NorthPanel extends JPanel implements ActionListener private static final long serialVersionUID 621042784523040336L private J sweep minesweeper private Display mineDisplay timeDisplay private long begin private Timer timer 类名 Digit 作用 记录剩余雷的数目 继承的父类 没有 实现的接口 没有 public class Digit private int digit x y width height private Color darkRed 定义接下来用来绘制数字的颜色 3 2 类的主要方法 3 2 1 设计整个界面的底部颜色 public BottomPanel super 13 setBackground Color white 3 2 2 添加鼠标监听器 public CenterPanel J sweep minesweeper Difficulty difficulty super this setBackground Color LIGHT GRAY addMouseListener this this minesweeper minesweeper this difficulty difficulty random new Random setFields 3 2 3 设置三种模式的界面大小 private void setFields int mines 0 switch difficulty case 简单模式 countX countY 12 这是设置简单模式界面横竖都有 12 个格子 mines 15 这是设置简单模式的雷的个数 break case 中等模式 countX countY 16 这是设置中等模式界面横竖都有 16 个格子 14 mines 40 这是设置中等模式的雷的个数 break case 疯狂模式 countX 30 这是设置疯狂模式界面横向有 30 个格子 countY 16 这是设置疯狂模式界纵向都有 16 个格子 mines 99 这是设置疯狂模式的雷的个数 break 3 2 4 绘制记录雷数目的数字 public Digit int digit int x int y this digit digit this x x this y y width 13 height 23 darkRed new Color 128 0 0 public void setDigit int digit this digit digit public void paint Graphics g g setColor Color BLACK g fillRect x y width height switch digit case 0 case 2 case 3 case 5 case 6 case 7 case 8 case 9 g setColor Color RED g drawLine x 2 y 1 x 10 y 1 g drawLine x 3 y 2 x 9 y 2 g drawLine x 4 y 3 x 8 y 3 break 15 case 2 case 1 case 1 case 4 g setColor darkRed g fillRect x 3 y 1 1 1 g fillRect x 5 y 1 1 1 g fillRect x 7 y 1 1 1 g fillRect x 9 y 1 1 1 g fillRect x 4 y 2 1 1 g fillRect x 6 y 2 1 1 g fillRect x 8 y 2 1 1 g fillRect x 5 y 3 1 1 g fillRect x 7 y 3 1 1 break switch digit case 1 case 2 case 3 case 4 case 5 case 6 case 8 case 9 g setColor Color RED g drawLine x 3 y 10 x 9 y 10 g drawLine x 2 y 11 x 10 y 11 g drawLine x 3 y 12 x 9 y 12 break case 2 case 0 case 1 case 7 g setColor darkRed g fillRect x 4 y 10 1 1 g fillRect x 6 y 10 1 1 g fillRect x 8 y 10 1 1 g fillRect x 3 y 11 1 1 g fillRect x 5 y 11 1 1 g fillRect x 7 y 11 1 1 g fillRect x 9 y 11 1 1 g fillRect x 4 y 12 1 1 g fillRect x 6 y 12 1 1 g fillRect x 8 y 12 1 1 break switch digit case 0 case 2 case 3 case 5 case 6 case 8 case 9 g setColor Color RED g drawLine x 4 y 19 x 8 y 19 g drawLine x 3 y 20 x 9 y 20 g drawLine x 2 y 21 x 10 y 21 break case 2 case 1 case 1 case 4 case 7 16 g setColor darkRed g fillRect x 5 y 19 1 1 g fillRect x 7 y 19 1 1 g fillRect x 4 y 20 1 1 g fillRect x 6 y 20 1 1 g fillRect x 8 y 20 1 1 g fillRect x 3 y 21 1 1 g fillRect x 5 y 21 1 1 g fillRect x 7 y 21 1 1 g fillRect x 9 y 21 1 1 break switch digit case 0 case 4 case 5 case 6 case 8 case 9 g setColor Color RED g drawLine x 1 y 2 x 1 y 10 g drawLine x 2 y 3 x 2 y 9 g drawLine x 3 y 4 x 3 y 8 break case 2 case 1 case 1 case 2 case 3 case 7 g setColor darkRed g fillRect x 1 y 2 1 1 g fillRect x 1 y 4 1 1 g fillRect x 1 y 6 1 1 g fillRect x 1 y 8 1 1 g fillRect x 1 y 10 1 1 g fillRect x 2 y 3 1 1 g fillRect x 2 y 5 1 1 g fillRect x 2 y 7 1 1 g fillRect x 2 y 9 1 1 g fillRect x 3 y 4 1 1 g fillRect x 3 y 6 1 1 g fillRect x 3 y 8 1 1 break switch digit case 0 case 2 case 6 case 8 g setColor Color RED g drawLine x 1 y 12 x 1 y 20 17 g drawLine x 2 y 13 x 2 y 19 g drawLine x 3 y 14 x 3 y 18 break case 2 case 1 case 1 case 3 case 4 case 5 case 7 case 9 g setColor darkRed g fillRect x 1 y 12 1 1 g fillRect x 1 y 14 1 1 g fillRect x 1 y 16 1 1 g fillRect x 1 y 18 1 1 g fillRect x 1 y 20 1 1 g fillRect x 2 y 13 1 1 g fillRect x 2 y 15 1 1 g fillRect x 2 y 17 1 1 g fillRect x 2 y 19 1 1 g fillRect x 3 y 14 1 1 g fillRect x 3 y 16 1 1 g fillRect x 3 y 18 1 1 break switch digit case 0 case 1 case 2 case 3 case 4 case 7 case 8 case 9 g setColor Color RED g drawLine x 11 y 2 x 11 y 10 g drawLine x 10 y 3 x 10 y 9 g drawLine x 9 y 4 x 9 y 8 break case 2 case 1 case 5 case 6 g setColor darkRed g fillRect x 11 y 2 1 1 g fillRect x 11 y 4 1 1 g fillRect x 11 y 6 1 1 g fillRect x 11 y 8 1 1 g fillRect x 11 y 10 1 1 g fillRect x 10 y 3 1 1 g fillRect x 10 y 5 1 1 g fillRect x 10 y 7 1 1 g fillRect x 10 y 9 1 1 g fillRect x 9 y 4 1 1 g fillRect x 9 y 6 1 1 g fillRect x 9 y 8 1 1 18 break switch digit case 0 case 1 case 3 case 4 case 5 case 6 case 7 case 8 case 9 g setColor Color RED g drawLine x 11 y 12 x 11 y 20 g drawLine x 10 y 13 x 10 y 19 g drawLine x 9 y 14 x 9 y 18 break case 2 case 1 case 2 g setColor darkRed g fillRect x 11 y 12 1 1 g fillRect x 11 y 14 1 1 g fillRect x 11 y 16 1 1 g fillRect x 11 y 18 1 1 g fillRect x 11 y 20 1 1 g fillRect x 10 y 13 1 1 g fillRect x 10 y 15 1 1 g fillRect x 10 y 17 1 1 g fillRect x 10 y 19 1 1 g fillRect x 9 y 14 1 1 g fillRect x 9 y 16 1 1 g fillRect x 9 y 18 1 1 break 3 2 4 设计的总体认识 JAVA 设计的摘要 JAVA 设计的目录结构 JAVA 设计的概要和详细设计 JAVA 设计的版权意识 JAVA 设计需要编译的环境 JAVA 设计的实用性 19 3 2 5 程序流程图程序流程图 图 3 绘制扫雷游戏方法 PAD 图 开始 默认进入疯狂模式 选择模式 简单模式 中等模式 是 疯狂模式 否 游戏开始 计时 失败 胜利 重新玩 退出游戏 否 是 20 4 运行结果运行结果 图 4 1 游戏胜利结果显示 图 4 2 游戏失败结果显示 21 5 测试分析测试分析 5 1 程序运行情况程序运行情况 程序运行时 左上角方框会显示当前剩余雷的数目 玩者每标记一个雷 雷的 数目就会减少一 但由于当玩者在玩时 可能会出现标记雷错误 这样如果玩 者标记雷的数目比实际数目多 则会出现雷的数目为负数 因此 我考虑到这 个 所以在设计这个小框的时候 专门多考虑了 1 3 这几个数字 以防 出现数字到零时 不再减少 5 2 程序异常处理程序异常处理 try UIManager setLookAndFeel UIManager getSystemLookAndFeelClassName catch ClassNotFoundException e catch InstantiationException e catch IllegalAccessException e catch UnsupportedLookAndFeelException e 6 6 程序清单 程序清单 import java awt Color import javax swing JPanel public class BottomPanel extends JPanel private static final long serialVersionUID 2916744287014266788L public BottomPanel super setBackground Color white 这是设计整个界面的底部颜色 22 import java awt Color import java awt Dimension import java awt Graphics import java awt event MouseEvent import java awt event MouseListener import java util HashSet import java util Iterator import java util Random import java util Set import javax swing JPanel author XJQ 中间面板 public class CenterPanel extends JPanel implements MouseListener private static final long serialVersionUID 1L private int countX countY fieldsLeft private Field fields private Difficulty difficulty private Random random private boolean gameOver private J sweep minesweeper public CenterPanel J sweep minesweeper Difficulty difficulty super this setBackground Color LIGHT GRAY addMouseListener this 这是添加鼠标监听器 this minesweeper minesweeper this difficulty difficulty random new Random setFields 23 public void setMinesweeper Difficulty difficulty this difficulty difficulty gameOver false setFields repaint private void setFields int mines 0 switch difficulty case 简单模式 countX countY 12 这是设置简单模式界面横竖都有 12 个格子 mines 15 这是设置简单模式的雷的个数 break case 中等模式 countX countY 16 这是设置中等模式界面横竖都有 16 个格子 mines 40 这是设置中等模式的雷的个数 break case 疯狂模式 countX 30 这是设置疯狂模式界面横向有 30 个格子 countY 16 这是设置疯狂模式界纵向都有 16 个格子 mines 99 这是设置疯狂模式的雷的个数 break fieldsLeft countX countY mines setPreferredSize new Dimension countX 16 countY 16 fields new Field countY countX for int y 0 y countY y for int x 0 x countX x fields y x new Field x y Set minePositions new HashSet while minePositions size mines minePositions add random nextInt countX countY 取随 24 机坐标 x y 设置雷的位置 Iterator i minePositions iterator while i hasNext int minePosition i next int y minePosition countX int x minePosition countX fields y x setMine true for int yy y 0 y 1 y yy y 0 x 1 x xx x countX 1 x 1 x xx fields yy xx incrementNeighbourMines Override public void paint Graphics g super paint g for int y 0 y fields length y for int x 0 x fields y length x fields y x paint g private void setGameOver minesweeper stopTime gameOver true for int y 0 y countY y for int x 0 x countX x fields y x setGameOver private void setWon minesweeper stopTime gameOver true 25 minesweeper setMines 0 true 当剩余雷的数目为零时 游戏胜利 for int y 0 y countY y for int x 0 x 0 y 1 y yy y 0 x 1 x xx x 0 y 1 y yy y 0 x 1 x xx x 0 y 1 y yy y 0 x 1 x xx x fields 0 length 1 y fields length 1 return minesweeper startTime if e getButton MouseEvent BUTTON1 27 if fields y x isClicked else performFieldClick x y if fieldsLeft 0 setWon else minesweeper setMines fields y x setFlag 当右击时 在小格子上放置事先绘制好的小旗子的图形 repaint Override public void mouseClicked MouseEvent e Override public void mouseEntered MouseEvent e Override public void mouseExited MouseEvent e Override public void mouseReleased MouseEvent e 这个类是一种枚举的功能 可以选择不用的模式 author XJQ public enum Difficulty 简单模式 中等模式 疯狂模式 28 这个类就是我添加的功能 用来记录剩余雷的数目 主要是通过绘制数字来显示 不同的数字的绘制方法不一样 根据不同的数字具有同一个笔画来进行绘制 比如数字 2 和数字 5 显示的时候 在横向有三笔 那么这三笔就可以用同样的 方法绘制 通过 switch 函数检索需要绘制的数字 然后开始绘制 除此之外 这个显示的小窗口是可以自动的跟程序左对齐的 因为程序分为三 种模式 每一种模式的界面大小都不一样 所以就得就显示的小框跟程序的窗口自动左对齐 下面是具体的程序 import java awt Color import java awt Graphics author XJQ public class Digit private int digit x y width height private Color darkRed public Digit int digit int x int y this digit digit this x x this y y width 13 height 23 darkRed new Color 128 0 0 public void setDigit int digit this digit digit public void paint Graphics g g setColor Color BLACK g fillRect x y width height switch digit 29 case 0 case 2 case 3 case 5 case 6 case 7 case 8 case 9 g setColor Color RED g drawLine x 2 y 1 x 10 y 1 g drawLine x 3 y 2 x 9 y 2 g drawLine x 4 y 3 x 8 y 3 break case 2 case 1 case 1 case 4 g setColor darkRed g fillRect x 3 y 1 1 1 g fillRect x 5 y 1 1 1 g fillRect x 7 y 1 1 1 g fillRect x 9 y 1 1 1 g fillRect x 4 y 2 1 1 g fillRect x 6 y 2 1 1 g fillRect x 8 y 2 1 1 g fillRect x 5 y 3 1 1 g fillRect x 7 y 3 1 1 break switch digit case 1 case 2 case 3 case 4 case 5 case 6 case 8 case 9 g setColor Color RED g drawLine x 3 y 10 x 9 y 10 g drawLine x 2 y 11 x 10 y 11 g drawLine x 3 y 12 x 9 y 12 break case 2 case 0 case 1 case 7 g setColor darkRed g fillRect x 4 y 10 1 1 g fillRect x 6 y 10 1 1 g fillRect x 8 y 10 1 1 g fillRect x 3 y 11 1 1 g fillRect x 5 y 11 1 1 g fillRect x 7 y 11 1 1 g fillRect x 9 y 11 1 1 g fillRect x 4 y 12 1 1 g fillRect x 6 y 12 1 1 g fillRect x 8 y 12 1 1 break 30 switch digit case 0 case 2 case 3 case 5 case 6 case 8 case 9 g setColor Color RED g drawLine x 4 y 19 x 8 y 19 g drawLine x 3 y 20 x 9 y 20 g drawLine x 2 y 21 x 10 y 21 break case 2 case 1 case 1 case 4 case 7 g setColor darkRed g fillRect x 5 y 19 1 1 g fillRect x 7 y 19 1 1 g fillRect x 4 y 20 1 1 g fillRect x 6 y 20 1 1 g fillRect x 8 y 20 1 1 g fillRect x 3 y 21 1 1 g fillRect x 5 y 21 1 1 g fillRect x 7 y 21 1 1 g fillRect x 9 y 21 1 1 break switch digit case 0 case 4 case 5 case 6 case 8 case 9 g setColor Color RED g drawLine x 1 y 2 x 1 y 10 g drawLine x 2 y 3 x 2 y 9 g drawLine x 3 y 4 x 3 y 8 break case 2 case 1 case 1 case 2 case 3 case 7 g setColor darkRed g fillRect x 1 y 2 1 1 g fillRect x 1 y 4 1 1 g fillRect x 1 y 6 1 1 g fillRect x 1 y 8 1 1 g fillRect x 1 y 10 1 1 g fillRect x 2 y 3 1 1 g fillRect x 2 y 5 1 1 g fillRect x 2 y 7 1 1 g fillRect x 2 y 9 1 1 g fillRect x 3 y 4
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 湖南省娄底市涟源市2023-2024学年七年级上学期语文10月月考试卷(含答案)
- 高考数学真题及答案
- 平面构成试卷及答案
- 高中体育考试试题及答案
- Python-实战课件教学课件
- 排列数的题目及答案
- 八年级数学上册期末试卷及答案
- PS课件中的应用
- 高考真题山东试卷及答案
- 2025年飞镖模型训练题目及答案
- 四川大学宣传介绍PPT
- 小学生元宵中秋猜谜语竞赛题目
- 《商业银行资本管理办法》附件13-账簿划分和名词解释
- 燃气轮机离心式压缩机组运行操作手册教学教材
- GB 7956.2-2014消防车第2部分:水罐消防车
- FZ/T 21001-2009自梳外毛毛条
- 二年级语文《称赞》练习题
- 2023年重庆市社区工作者考试试题
- 湘教版高中音乐(鉴赏)《黄河大合唱》课件
- 三字经全文带拼音打印版带翻译
- 山东省青岛市各县区乡镇行政村村庄村名居民村民委员会明细及行政区划代码
评论
0/150
提交评论