python CSSE7030

1 Introduction
In this assignment, you will implement a (heavily) simplified version of the video game ”Into The Breach”. In this game players defend a set of civilian buildings from giant monsters. In order to achieve this goal, the player commands a set of equally giant mechanical heroes called ”Mechs”.
There are a variety of enemy and mech types, which each behave slightly differently. Gameplay is described in section 3 of this document.
Unlike assignment 1, in this assignment you will be using object-oriented programming and following the Apply Model-View-Controller design pattern shown in lectures. In addition to creating code for modelling the game, you will be implementing a graphical user interface (GUI). An example of a
final completed game is shown in Figure 1.
2 Getting Started
Download a2.zip from Blackboard — this archive contains the necessary files to start this assign ment. Once extracted, the a2.zip archive will provide the following files:
a2.py This is the only file you will submit and is where you write your code. Do not make changes  to any other files.
a2 support.py Do not modify or submit this file , it contains pre-defined classes, functions, and con stants to assist you in some parts of your assignment. In addition to these, you are encouraged  to create your own constants and helper functions in a2.py where possible.
levels/ This folder contains a small collection of files used to initialize games of Into The Breach . In  addition to these, you are encouraged to create your own files to help test your implementation where possible.
3 Gameplay
This section describes an overview of gameplay for Assignment 2. Where interactions are not ex
plicitly mentioned in this section, please see Section 4.
3.1 Definitions
Gameplay takes place on a rectangular grid of tiles called a board , on which different types of entities can stand. There are three types of tile: Ground tiles, mountain tiles, and building tiles. Building 
Figure 1: Example screenshot from a completed implementation. Note that your display may look slightly different depending on your operating system.
tiles each possess a given amount of health , which is the amount of damage they can suffer before they are destroyed . A building is destroyed if its health drops to 0. A tile may be blocking , in which case entities cannot stand on it. Tiles that are not blocking may have a maximum of one entity standing on them at any given time. Ground tiles are never blocking, mountain tiles are always  blocking, and building tiles are blocking if and only if they are not destroyed.
Entities may either be Mechs , which are controlled by the player, or Enemies , which attack the player’s mechs and buildings. There are two types of mech; the Tank Mech and the Heal Mech . There are also two types of enemy; the Scorpion and the Firefly . Each entity possesses 4 characteristics:
1. position : the coordinate of the tile within the board on which the entity is currently standing.
2. health : the remaining amount of damage the entity can suffer before it is destroyed . An entity is destroyed the moment its health drops to 0, at which point it is immediately removed from the game.
3. speed : the number of tiles the entity can move during its movement phase (see below for details). Entities can only move horizontally and vertically; that is, moving one tile diagonally is considered two individual movements.
4. strength : how much damage the entity deals to buildings and other entities (i.e. the amount by which it reduces the health of attacked buildings or entities).
The game is turn based, with each turn consisting of a player movement phase, an attack phase, and an enemy movement phase. During the player movement phase, the player has the option to move each of the mechs under their control to a new tile on the grid. During the attacking phase, each
mech and enemy perform an attack: an action that can damage mechs, enemies, or even buildings.
Each enemy, mech, and building can only receive a certain amount of damage. If a mech or enemy is destroyed before they attack during a given attack phase, they do not attack during that attack phase. During the enemy movement phase, each enemy chooses a tile as their objective, and then
moves to a new tile on the grid such that they are closer to their objective. The order in which 2mechs and enemies move and attack is determined by a fixed priority that will be displayed to the user at all times.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/862199.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

AI进阶指南第四课,大模型优缺点研究?

在上一篇文章中,我主要探讨了LM模型与企业级模型的融合。 但是,在文末对于具体的大模型优缺点只是简单地说明了一下,并不细致。 因此,在这一节,我将更为细致地说明一下大模型的优缺点。 一,隐私安全 将L…

2018年全国大学生数学建模竞赛A题高温服装设计(含word论文和源代码资源)

文章目录 一、部分题目二、部分论文三、部分Matlab源代码问题11 求解h1h22 已知h1h2求解温度分布 问题21 求解第二层最佳厚度 四、完整word版论文和源代码(两种获取方式) 一、部分题目 2018 年高教社杯全国大学生数学建模竞赛题目 A 题 高温作业专用服…

Linux C 程序 【02】创建线程

1.开发背景 上一个篇章,基于 RK3568 平台的基础上,运行了最简单的程序,然而我们使用了 Linux 系统,系统自带的多线程特性还是比较重要的,这个篇章主要描述线程的创建。 2.开发需求 设计实验: 创建一个线程…

入门JavaWeb之 JavaBean 实体类

JavaBean 有特定写法: 1.必须有一个无参构造 2.属性必须私有 3.必须有对应的 get/set 方法 一般用来和数据库的字段做映射 ORM:对象关系映射 表->类 字段->属性 行记录->对象 连接数据库 没有的话去 Settings -> Plugins 搜索 Data…

Vue-路由

路由简介 SPA单页面应用。导航区和展示区 单页Web应用整个应用只有一个完整的页面点击页面中的导航连接不会刷新页面,只会做页面的局部更新数据需要通过ajax请求获取 路由:路由就是一组映射关系,服务器接收到请求时,根据请求路…

[论文阅读笔记33] Matching Anything by Segmenting Anything (CVPR2024 highlight)

这篇文章借助SAM模型强大的泛化性,在任意域上进行任意的多目标跟踪,而无需任何额外的标注。 其核心思想就是在训练的过程中,利用strong augmentation对一张图片进行变换,然后用SAM分割出其中的对象,因此可以找到一组图…

k8s集群node节点加入失败

出现这种情况: [preflight] FYI: You can look at this config file with kubectl -n kube-system get cm kubeadm-config -o yaml [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml" [kubelet-start] Writing kub…

python 识别图片点击,设置坐标,离设置坐标越近的优先识别点击

import pyautogui import cv2 import numpy as np import mathdef find_and_click(template_path, target_x, target_y, match_threshold0.8):"""在屏幕上查找目标图片并点击。Args:template_path: 目标图片的路径。target_x: 预设的坐标 x 轴值。target_y: 预设…

OpenCV报错已解决:Vector析构异常OpencvAssert CrtlsValidHeapPointer

🎬 鸽芷咕:个人主页 🔥 个人专栏: 《C干货基地》《粉丝福利》 ⛺️生活的理想,就是为了理想的生活! 引入 在使用OpenCV进行图像处理时,我们可能会遇到Vector析构异常OpencvAssert CrtlsValidHeapPointer的问题。本文将…

基于LMS自适应滤波的窄带信号宽带噪声去除(MATLAB R2021B)

数十年的研究极大的发展了自适应滤波理论,自适应滤波理论已经成为信号处理领域研究的热点之一。从理论上讲,自适应滤波问题没有唯一解。为了得到自适应滤波器及其应用系统,可以根据不同的优化准则推导出许多不同的自适应理论。目前该理论主要…

在eclipse中导入idea项目步骤

一、可以把其它项目的.project&#xff0c; .classpath文件拷贝过来&#xff0c;修改相应的地方则可。 1、.project文件只需要修改<name>xxx</name>这个项目名称则可 2、.classpath文件通常不用改&#xff0c; 二、右击 项目名 >选择“Properties”>选择 Re…

自动驾驶⻋辆环境感知:多传感器融合

目录 一、多传感器融合技术概述 二、基于传统方法的多传感器融合 三、基于深度学习的视觉和LiDAR的目标级融合 四、基于深度学习的视觉和LiDAR数据的前融合方法 概念介绍 同步和配准 时间同步 标定 摄像机内参标定&#xff08;使用OpenCV&#xff09; 摄像机与LiDAR外…

微软推出最新视觉基础模型Florence-2 可在浏览器运行

据微软官方消息&#xff0c;微软推出视觉基础模型Florence-2&#xff0c;该模型现已能够在支持WebGPU的浏览器中100%本地运行。Florence-2-base-ft是一个拥有2.3亿参数的视觉基础模型&#xff0c;采用基于提示的方法来处理广泛的视觉和视觉语言任务。 该模型支持多种功能&…

IDEA 插件推荐【一】

好使的插件可以让工作事倍功半。下面就推荐一些常用的IDEA插件&#xff0c;如果你有其他好使的插件&#xff0c;欢迎评论区留言分享出来~ 1.Key Promoter X Key Promoter X 插件&#xff0c;IDEA 快捷键提示工具。 在每次我们使用鼠标进行 IDEA 的某个操作&#xff0c;Key Pr…

lambda-map.merge

map.merge 结论: 1.当前传入的 key ,value biFunction 2.如果之前map不存在则直接put(当前key,当前value) 3.如果之前map已经有了,老value与 当前value 进入function处理后再 put(当前key,处理后的value)

IDEA使用Apidocx插件在RAP生成接口文档

第一步 安装插件&#xff0c;安装最新的1.1.7即可&#xff0c;插件与idea版本对照 第二步 输入对应的IP或域名&#xff0c;端口说明&#xff1a; 1. 38080&#xff1a;为后端数据 API 服务器&#xff08;rap2-delos&#xff09; 2. 3000&#xff1a;为前端静态资源服务&…

40岁学习java是否需要报班学习?

在开始前刚好我有一些资料&#xff0c;是我根据网友给的问题精心整理了一份「java的资料从专业入门到高级教程」&#xff0c; 点个关注在评论区回复“666”之后私信回复“666”&#xff0c;全部无偿共享给大家&#xff01;&#xff01;&#xff01;应该不需要。各种公开免费的…

【计算机毕业设计】087基于微信小程序社区养老服务

&#x1f64a;作者简介&#xff1a;拥有多年开发工作经验&#xff0c;分享技术代码帮助学生学习&#xff0c;独立完成自己的项目或者毕业设计。 代码可以私聊博主获取。&#x1f339;赠送计算机毕业设计600个选题excel文件&#xff0c;帮助大学选题。赠送开题报告模板&#xff…

AI加持,商业智能与分析软件市场释放更大潜能

根据IDC最新发布的《中国商业智能和分析软件市场跟踪报告&#xff0c;2023H2》显示&#xff0c;2023下半年&#xff0c;中国商业智能与分析软件市场规模为5.2亿美元&#xff0c;同比增长为3.7%。其中&#xff0c;本地部署收入占比为89.3%&#xff0c;同比增长1.7%&#xff1b;公…

【MySQL】架构体系概览

本文使用的MySQL版本是8.0 MySQL架构 ​MySQL架构整体由外部程序和MySQL服务器构成。其中内部服务器分成连接层&#xff0c;服务层&#xff0c;服务管理和公共组件&#xff0c;存储引擎层和文件系统层。 连接层 连接层的作用是处理客户端的连接。 网络端口 一台MySQL服务器…