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.mfbz.cn/a/753757.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

上位机图像处理和嵌入式模块部署(mcu之静态库生成和使用)

【 声明:版权所有,欢迎转载,请勿用于商业用途。 联系信箱:feixiaoxing 163.com】 很多同学做了很长时间的mcu和keil开发,都认为keil工程中必须包含所有的源代码,其实这是不对的。如果有一些代码我们不希望别…

游戏AI的创造思路-技术基础-深度学习(7)TF

重头戏TF,汽车人,变形~~~~ 现在广泛应用的GPT中,数据处理的关键点就是Transformer算法,多次多层的映射“变形”造就了其对自然语言处理能力的提升,但本篇介绍的内容中,Transformer算法是用来构建游戏AI的“…

深度学习经典检测方法概述

一、深度学习经典检测方法 two-stage(两阶段):Faster-rcnn Mask-Rcnn系列 one-stage(单阶段):YOLO系列 1. one-stage 最核心的优势:速度非常快,适合做实时检测任务! 但是…

【知识图谱系列】(实例)python操作neo4j构建企业间的业务往来的知识图谱

本章节通过聚焦于"金额"这一核心属性,构建了一幅知识图谱,旨在揭示"销售方"与"购买方"间的商业互动网。在这张图谱中,绿色节点象征着购买方,而红色节点则代表了销售方。这两类节点间的紧密连线,不仅映射了双方在市场活动中的合作桥梁,还特…

8个成功的原型设计案例分享

原型设计在整个产品设计过程中非常的重要,定下了整个产品的基调,想要做好原型设计,需要不断的经验的积累,新手入门最快的方式就是学习一些优秀的原型设计案例,今天就为大家分享一些可以直接使用源文件进行编辑和修改的…

Linux高级编程——线程

pthread 线程 概念 :线程是轻量级进程,一般是一个进程中的多个任务。 进程是系统中最小的资源分配单位. 线程是系统中最小的执行单位。 优点: 比多进程节省资源,可以共享变量 进程会占用&am…

SpringBoot(二)SpringBoot多环境配置

Spring框架常用注解简单介绍 SpringMVC常用注解简单介绍 SpringBoot(一)创建一个简单的SpringBoot工程 SpringBoot(二)SpringBoot多环境配置 SpringBoot(三)SpringBoot整合MyBatis SpringBoot(四…

MySQL高级-SQL优化- limit优化(覆盖索引加子查询)

文章目录 0、limit 优化0.1、从表 tb_sku 中按照 id 列进行排序,然后跳过前 9000000 条记录0.2、通过子查询获取按照 id 排序后的第 9000000 条开始的 10 条记录的 id 值,然后在原表中根据这些 id 值获取对应的完整记录 1、上传5个sql文件到 /root2、查看…

AI与学术的交响:ChatGPT辅助下的实验设计新篇章

学境思源,一键生成论文初稿: AcademicIdeas - 学境思源AI论文写作 在学术研究中,实验设计是确保研究质量和结果可信度的关键环节。这篇文章我们将为大家介绍如何利用ChatGPT辅助完成学术论文的实验设计,通过提供灵感、优化实验步…

有什么好用的ai自动绘画软件?6个软件帮助你快速进行智能绘画

有什么好用的ai自动绘画软件?6个软件帮助你快速进行智能绘画 寻找好用的AI自动绘画软件可以帮助用户快速进行智能绘画,以下是几款推荐的软件,它们能够提供不同风格和功能的绘画体验: 聪明灵犀:这是一款知名的AI艺术应…

【pytorch10】统计属性

常见统计属性 norm(范数)mean,sumprodmax,min,argmin,argmaxkthvalue,topk kthvalue求第几个的位置和第几个的值 topk求top几的这样的一个数值 norm范数 这里的norm表达的是范数的意思,norma…

多地高温持续“热力”爆表 约克VRF中央空调带你清凉舒爽一夏

“出门5分钟,流汗2小时”,夏季高温天气,怎一个“热”字了得?6月以来,我国多地迎来高温“炙烤”,全国出现40℃以上高温的范围持续增加,随着中央气象台高温预警持续拉响,人们都很纳闷:…

主流电商平台API接口(天猫获得淘宝商品详情,获得淘宝app商品详情原数据 ,获得淘口令真实url API,按图搜索淘宝商品(拍立淘) API )

主流电商平台商品接口在电商企业中具有重要应用价值。通过商品接口,电商企业可以实现商品同步功能: 商品信息同步:通过接口可以实时同步主流电商平台上的商品信息,包括商品标题、价格、库存、销量等数据,确保企业在自…

[leetcode]search-insert-position 搜索插入位置

. - 力扣&#xff08;LeetCode&#xff09; class Solution { public:int searchInsert(vector<int>& nums, int target) {int left 0, right nums.size()-1;while(left <right) {int mid left (right-left)/2;if(nums[mid] target){return mid;} else if(nu…

subline设置打开文件重启一个新的窗口

问题 打开文件后&#xff0c;用的是同一个窗口的子tab页面 想要打开一个新的窗口 解决 点解preferences->setting 在右边的配置文件新增一行 “open_files_in_new_window”: “always” 保存 搞定&#xff01;

立创ESP32C3学习笔记

好的设计可以学到很多知识和细节&#xff0c;就如同学会一个数学知识点最好的方法是做典型例题。 乐鑫关于产品的硬件设计都有硬件设计指南&#xff0c;设计板子的时候需要仔细阅读&#xff1a; 原理图设计 - ESP32-C3 - — ESP 硬件设计指南 latest 文档 (espressif.com) 技…

IP地址查询和代理服务器:双重保护隐私

随着网络应用的日益普及&#xff0c;我们的个人信息和数据安全面临前所未有的挑战。在此背景下&#xff0c;IP地址查询和代理服务器成为保护个人隐私和网络安全的两大关键工具。本文将从IP地址查询的原理和应用出发&#xff0c;深入剖析代理服务器在网络隐私保护中的作用&#…

JS(JavaScript)事件处理(事件绑定)趣味案例

天行健&#xff0c;君子以自强不息&#xff1b;地势坤&#xff0c;君子以厚德载物。 每个人都有惰性&#xff0c;但不断学习是好好生活的根本&#xff0c;共勉&#xff01; 文章均为学习整理笔记&#xff0c;分享记录为主&#xff0c;如有错误请指正&#xff0c;共同学习进步。…

5. Spring IoCDI ★ ✔

5. Spring IoC&DI 1. IoC & DI ⼊⻔1.1 Spring 是什么&#xff1f;★ &#xff08;Spring 是包含了众多⼯具⽅法的 IoC 容器&#xff09;1.1.1 什么是容器&#xff1f;1.1.2 什么是 IoC&#xff1f;★ &#xff08;IoC: Inversion of Control (控制反转)&#xff09;总…

分布式kettle调度管理平台简介

介绍 Kettle&#xff08;也称为Pentaho Data Integration&#xff09;是一款开源的ETL&#xff08;Extract, Transform, Load&#xff09;工具&#xff0c;由Pentaho&#xff08;现为Hitachi Vantara&#xff09;开发和维护。它提供了一套强大的数据集成和转换功能&#xff0c…