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.rhkb.cn/news/362921.html

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

相关文章

基于51单片机的银行排队呼叫系统设计

一.硬件方案 本系统是以排队抽号顺序为核心,客户利用客户端抽号,工作人员利用叫号端叫号;通过显示器及时显示当前所叫号数,客户及时了解排队信息,通过合理的程序结构来执行排队抽号。电路主要由51单片机最小系统LCD12…

unity使用XR插件开发SteamVR项目,异常问题解决方法

一、unity使用XR插件开发SteamVR项目,运行后相机高度异常问题解决方法如下操作 (一)、开发环境 1、Unity 2021.3.15f 2、XR Interaction Toolkit Version 2.5.2 (com.unity.xr.interaction.toolkit) 3、OpenXR Pl…

ArmSoM-Sige7/5/1 和树莓派5规格比较

引言 在当今快速发展的嵌入式系统领域,选择一款性能强大、功能丰富的开发板对于项目的成功至关重要。本文将介绍并比较 Sige7、Sige5、Raspberry Pi 5 和 Sige1 这四款开发板的关键规格和特性,帮助开发者和爱好者选择最适合其需求的平台。 ArmSoM-Sige…

智慧校园-缴费管理系统总体概述

在构建现代化教育环境的过程中,智慧校园缴费管理系统脱颖而出,成为提升校园财务管理效率与服务质量的关键一环。缴费管理系统需要精心设计,通过科技力量,让原本繁琐的缴费流程变得简单快捷,同时增强家校之间的互动与信…

postman教程-22-Newman结合Jenkins执行自动化测试

上一小节我们学习了Postman Newman运行集合生成测试报告的方法,本小节我们讲解一下Postman Newman结合Jenkins执行自动化测试的方法。 在软件开发过程中,持续集成(CI)是一种实践,旨在通过自动化的测试和构建过程来频繁…

Transformers 安装与基本使用

文章目录 Github文档推荐文章简介安装官方示例中文情感分析模型分词器 Tokenizer填充 Padding截断 Truncation google-t5/t5-small使用脚本进行训练Pytorch 机器翻译数据集下载数据集格式转换 Github https://github.com/huggingface/transformers 文档 https://huggingface…

【Sklearn-LR驯化】一文搞懂分类基石模型-逻辑回归使用总结

【Sklearn-驯化】一文搞懂分类基石模型-逻辑回归使用总结 本次修炼方法请往下查看 🌈 欢迎莅临我的个人主页 👈这里是我工作、学习、实践 IT领域、真诚分享 踩坑集合,智慧小天地! 🎇 免费获取相关内容文档关注&#xf…

Transformer教程之Encoder-Decoder架构

在当今的自然语言处理(NLP)领域,Transformer已经成为不可或缺的模型。它以其高效的并行计算和卓越的性能在多个任务中占据了主导地位。在这篇文章中,我们将深入探讨Transformer的核心——Encoder-Decoder架构,帮助大家…

设计模式原则——接口隔离原则

设计模式原则 设计模式示例代码库地址: https://gitee.com/Jasonpupil/designPatterns 接口隔离原则 要求程序员尽量将臃肿庞大的接口拆分为更小的和更具体的接口,让接口中只包含客户感兴趣的方法接口隔离原则的目标是降低类或模块之间的耦合度&…

STM32将外部SDRAM空间作为系统堆(Heap)空间

概述 stm32可以外扩很大的sram,常见外部sram的初始化函数一般是c语言写的,默认写在main函数里面。stm32初始化首先进入汇编代码startup_stm32f429xx.s,在汇编代码中Reset_Handler(复位中断服务程序)里面先调用了Syste…

【Python机器学习】自动化特征选择——迭代特征选择

在单变量测试中,没有使用模型;在基于模型的选择中,使用单个模型来选择特征。而在迭代特征选择中,将会构造一系列模型,每个模型都使用不同数量的特征。有两种基本方法: 1、开始时没有特征,然后逐…

Django使用

一、安装Django 可以在创建好的虚拟环境中下载包 pip install Django3.2.20 -i https://pypi.tuna.tsinghua.edu.cn/simple 查看对应的下载好的内容 1、在Lib的site-packages第三方包里:这就是django框架源码 2、在scripts中有个 这是个工具,帮助创建d…

Java nio 的线程通信机制线程通信Pipe

Java的Pipe是一种新的线程通信机制,传统的线程通信可以是通过共享内存的方式,socket等方式,而Pipe是通过Java NIO 通信的方式实现共享内存,优点类似于go语言的管道 先上代码 public static void main(String[] args) throws IOEx…

Java网络编程(JavaWeb的基础)

Java网络编程(JavaWeb的基础) 文章目录 Java网络编程(JavaWeb的基础)前言一、网络编程概述1.1 软件架构&网络基础1.2 网络通信要素:IP/端口/通信协议1.3 传输层协议:tcp/udp 二、网络编程API2.1 InetAddress类2.2 Socket类&am…

DELL:利用大语言模型(LLM)生成评论与解释,革新虚假信息检测

ACL 2024 DELL: Generating Reactions and Explanations for LLM-Based Misinformation Detection https://arxiv.org/abs/2402.10426https://arxiv.org/abs/2402.10426 1.概述 大型语言模型(LLM)虽在诸多领域显示出色性能,但在直接应用于新闻真实性鉴别时,面临两大核心挑…

uboot基本使用网络命令和从服务器端下载linux内核启动

网络命令ip地址设置: setenv gmac_debug 0; setenv mdio_intf rgmii; setenv bootdelay 1; setenv ethaddr 00:xxxx:81:70; // mac地址 setenv ipaddr xxx; //开发板 IP 地址 setenv netmask 255.255.255.0; setenv gatewayip xxx.1; setenv serverip xxxx; //服…

潮玩手办盲盒前端项目模版的技术探索与应用案例

一、引言 在数字化时代,随着消费者对个性化和艺术化产品的需求日益增长,潮玩手办和盲盒市场逐渐崭露头角。为了满足这一市场需求,前端技术团队需要构建一个功能丰富、用户友好的在线平台。本文旨在探讨潮玩手办盲盒前端项目模版的技术实现&a…

图像处理Python库--图片裁剪、缩放、灰度图、圆角等

图像处理Python库 py-img-processor1. 安装2. 使用(Usage)2.1 运行配置2.2 图像处理处理函数图像处理参数为字符串图像处理参数为JSON 命令行提取图像主色调 py-img-processor Image editor using Python and Pillow. 依赖Pillow开发的Python库,用于图像编辑处理。…

第6章 复制

文章目录 前言1.配置1.1建立复制1.2断开复制1.3 安全性1.4 只读1.5 传输延迟 2. 拓扑2.1.一主一从结构2.2.一主多从结构2.3.树状主从结构 3.原理3.1复制过程 前言 复制功能,实现了相同数据的多个Redis副本。复制功能是高可用Redis的基础,满足故障恢复和…

Redis 高可用 sentinel

简介 Sentinel提供了一种高可用方案来抵抗节点故障,当故障发生时Redis集群可以自动进行主从切换,程序可以不用重启。 Redis Sentinel集群可以看成是一个Zookeeper集群,他是Redis集群高可用的心脏,一般由3-5个节点组成&#xff0…