代写消除类游戏Dots amp; Co.

Introduction

This assignment provides you the opportunity to apply concepts taught throughout the course to extend the functionality of a basic dot game, which has been modelled on Dots amp; Co.

The assignment will focus on the concept of Graphical User Interfaces (GUIs). You will be required to extend the base game with basic, intermediate, and advanced features. Postgraduate students will have an additional task.

Students are encouraged to review Dots amp; Co, as well as other similar games, to better understand how the game is played and for inspiration on advanced features.

Because this assignment deals with multiple files, students are encouraged to investigate a more capable IDE. The author recommends PyCharm, which is free for students.

Game Play

Dots amp; Co is a simple game where the player tries to create connections between dots on a grid in order to reach objectives.

The player can click on a dot and drag to an adjacent dot (up/down/left/right only) to select a dot to form a connection, continuing on to another adjacent dot to select it to form another connection, et cetera. When the player stops dragging and releases, all dots in that have been selected will be activated and removed. The most basic dots do not have any effect when activated. Replacements drop down from the cells above, and new dots are generated off-screen.

If the player drags back to their second-most-recently selected dot, the most-recently selected dot is deselected.

When the user nishes their selection, if the selection contains a loop, all dots of the selected kind will also be included in the activation.

Shortly after this assignment’s release, a link to a video overview will be added here.

Assignment Tasks

Task Breakdown

CSSE1001 students will be marked out of 25 and CSSE7030 students will be marked out of 30 based on the following breakdown. Tasks may be attempted in any order, but it is recommended to follow this breakdown, top-down.

Mark Breakdown

For each task, marks will scaled according to the following breakdown.

Getting Started

Before beginning work on the assignment you must download a3_files.zip provided from the course website.

Inside a3_files.zip , there should be a file called a3.py . This is the file where you will write your assignment. The other files are support files. These must not be edited. Their purpose is explained below.

Some tasks require you to submit brief descriptions of features implemented. These descriptions must be submitted in a single PDF document called description.pdf other formats such as Microsoft Word or misnamed files may not be accepted.

Support Code

The file a3.py is the main assignment file. This file includes a few hundred lines of code that leverages the support code to help you get started. You must modify amp; add to this file in order to complete the assignment tasks.

You are also permitted to create other files to simplify the separation of tasks (i.e. task1.py , task2.py , etc.). If you do this, a3.py must be the entry point to your application. One way to achieve this is to move DotsApp to a separate file, such as base.py . Regardless of how you structure your files, the code must all be able to be demonstrated by running a3.py .

You have been supplied with a copious amount of support code to help you complete this assignment. To begin the assignment, you do not need to understand much of this code. As you progress through the tasks, the degree to which you should understand this code will increase.

Note: Only required understanding has been listed. Since task 3 is open-ended, it would be helpful to have a good understanding of most of the support code to know what can be leveraged to your advantage.

Event Listeners

Note: In this section, the word function is used to mean anything that is able to be called like a function, such as a method, a lambda, etc. The generic technical term for this is callable .

The DotGame amp; GridView classes follow a pattern which allows a function to be attached to an event. When the event is triggered/emitted, the function is called. This function is called a listener or a callback, and this attaching action can also be referred to as binding to or listening for an event. Code that triggers an event can also supply arguments to the event functions.

This pattern is called the Event Emitter pattern, and is an implementation of the Observer pattern (the Publisher/Subscriber pattern is similar). It is also an example of a higher-order function (the function does the binding accepts the listener function as an argument).

While it is also quite a similar approach to how Tkinter handles commands for button presses, the Event Emitter pattern is far more exible in general, primarily because multiple listeners can be attached to the same event.

The events emitted by the DotGame amp; GridView classes are very useful, particularly for creating non-blocking animation. The supplied code binds to every relevant event emitted by these classes. See DotsApp.bind_events in the a3.py file.

Task 1 - Basic GUI

The purpose of this task is to create the basic graphical user interface (GUI) for the Dots game. There are several sub-tasks that need to be completed for this task. You will be working towards creating the user interface demonstrated below.

Basic GUI

You have been supplied with an incomplete implementation of DotsApp to start with. You should modify this class to implement the required functionality.

The very rst part of this task is to get the app onto the screen. Add your GUI instantiation code to the main function in a3.py

Next, review the DotsApp class and modify the code as required to implement the basic GUI.

The title of the window should be set to something appropriate (i.e. Dots ). This also applies to any window in subsequent tasks.

As the basic GUI is improved in subsequent tasks, the DotsApp class will need to be modied accordingly. It is also permitted, to create separate classes for each task using inheritance this is not required.

InfoPanel

Dene a class named InfoPanel , which inherits from tk.Frame . This class is used to display information to the user, such as their score, remaining moves and objectives, etc.

The InfoPanel ‘s widgets must:

be updated whenever the score event is emitted (i.e. after the user makes a move that joins some dots),

be laid out approximately according1 to Basic GUI Example, and

contain the following widgets:

Remaining Moves (top-left) A label to display the number of moves remaining

Score (top-left; below amp; to the right of Remaining Moves): A label to display the user’s score, in a larger fontsize

Objectives (top-right): An instance of ObjectivesView from view.py to display the objectives and how many of each remain

Companion (centre): An image of a character of your choosing

Matching the layout of the example precisely can be achieved far more easily using Tkinter’s Grid Geometry Manager (instead of pack). Students are permitted to use this if they wish, but for simplicity, an approximation using pack is equally acceptable.

Note: For convenience, you should have a setter method for each of the relevant widgets.

File Menu amp; Dialogs

Implement a menu bar, with a File menu. The File menu should have the following entries:

New Game : Restarts the game

Exit : Exits the application

When the user attempts to exit the application, either by the file menu or otherwise, they should rst be prompted with a dialog to conrm that they indeed want to quit the application. Further, when the game is over, the user should be shown a dialog informing them of the outcome (either win or loss).

Note: On Mac OS X, the file menu should appear in the global menu bar (top of the screen).

IntervalBar

Implement a class, IntervalBar , which inherits from tk.Canvas . This class should display a horizontal progress bar with vertical lines dividing each step , allowing the user to see progress from 0, 1, , steps-1, steps , inclusive. For example, in Interval Bar Example above, there are 6 steps and the current progress is 2.

Add the interval bar to the application and increase its progress every time the user makes a move. When maximum progress is reached, reset the progress 1 for the next turn.

IntervalBar must be a subclass of tk.Canvas . tkinter.ttk.Progressbar must not be used.

Task 2 - Intermediate Features

The purpose of this task is to extend the functionality of the basic GUI by adding additional dots and companion functionality.

Companions are helpful side characters that can be activated to perform a special ability. Every time a companion dot is activated, the companion is charged (by one). When a companion is fully charged, their ability is activated. Once activated, a companion’s charge is reset to zero, ready to be charged again. By default, a companion is fully charged when it has been charged six times.

Add another item to the file menu to allow the user to choose between a New Game either with or without a companion.

Companion Dot

Implement the CompanionDot class by extending BasicDot in game.py , and include it in your game.

It may be helpful to use CompanionGame from the game.py file. During development of the companion dot, it may be helpful to use UselessCompanion . A custom companion will be implemented in the next section.

Dot amp; Companion

Implement the following, and add them to your game:

Any one dot from 8.1. Dot Options

Any one companion from 8.2. Companion Options

Some companions require a certain type of dot (i.e. when activated they may place a special type of dot). If you choose such a companion, you should choose the dot it requires as one of your dots.

You should also add an IntervalBar to your InfoPanel and update it to show how much charge the companion has after each move.

Task 3 - Advanced Features

This task is open ended. It is up to you to decide what to do for this task. Marks will be awarded based on the sophistication of the features you choose to implement. Ensure that you consult with course staff before you commence this task to ensure that the features are suciently sophisticated.

You are encouraged to utilize extra Python modules to help you implement your desired functionality.

Description Document

You must also submit a brief description of the features you have implemented for this task. This must be included in description.pdf , along with any other required descriptions see 9. Assignment Submission. The description for this task should also contain an outline of any third party Python modules you have used, and instructions on how to install them. For example if you have used Pillow module, then the following would be sucient.

If using multiple third-party libraries, it is a good idea to list their names and versions rst, using bullet points, and then provide specic installation instructions afterwards.

Be sure to format the description document neatly to ensure that the marker can quickly scan the document for relevant information (i.e. by using larger, bold headings, vertical whitespace between sections, section numbers, etc.).

Suggestions

Saving and loading a game

Background music/event sounds

Additional dots amp; companions

Campaign style storyline

Various animations

These suggestions are not necessarily equal in diculty, and the complexity will likely vary based upon the particular implementation. Students should discuss potential features with course staff prior to implementing them, to get feedback on the sophistication.

python开发app1001无标题_Python代写:CSSE1001 Dots Co帮做Python编程作业相关推荐

  1. python开发app1001无标题_app01.py

    #!/usr/bin/env python # -*- coding:utf-8 -*- from flask import Flask, render_template, request, redi ...

  2. python开发app的软件_python可以写APP吗(python能做手机软件吗)

    一枚程序媛程序媛2 人赞同了该文章用Python操作手机APP的项目,例如抖音.闲鱼之类的,看完后发现这些项目无一例外需要部署ADB环境.至于什么是ADB,很多大神都讲这里介绍几款可以在手机上编程的a ...

  3. python定积分1002无标题_python 求定积分和不定积分

    求f(x) = sin(x)/x 的不定积分和负无穷到正无穷的定积分 sin(x)/x 的不定积分是信号函数sig ,负无穷到正无穷的定积分为pi import math import numpy a ...

  4. Python代写CSSE1001/7030 python程序作业、代做python CSSE1001/7030程序作业、 代写CSSE1001/7030 python 作业...

    Python代写CSSE1001/7030 python程序作业.代做python CSSE1001/7030程序作业. 代写CSSE1001/7030 python 作业 Uno++ Assignm ...

  5. python代码代写_python代写代码

    广告关闭 腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元! 1 原则在开始讨论python社区所采用的具体标准或是由其他人推荐的建议之前,考 ...

  6. python开发环境比较好_python开发环境比较好,python 集成开发环境哪个好

    python 集成开发环境哪个好 PyCharm是一种Python IDE,带有一整套可以帮助用户在使用Python语言开发时提高其效率的工具,比如调试.语法高亮.Project管理.代码跳转.智能提 ...

  7. python开发网站的优势_Python开发 的优势在哪里

    1.开源 Python都是开源的语言,简单地说,你可以自由地发布这个软件的拷贝.阅读它的源代码.对它做改动.把它的一部分用于新的自由软件中.Python主要是英文版的,所以对于学Python的人来说, ...

  8. 代写python代码一般多少钱_代写CO 353课程作业、代做Python程序设计作业、代写Python语言作业...

    代写CO 353课程作业.代做Python程序设计作业.代写Python语言作业 日期:2020-03-17 11:22 CO 353 - Homework assignment 4 Winter ' ...

  9. python怎么开始打代码_Python代码写好了怎么运行?

    Python代码写好了怎么运行?相信问这样问题的朋友一定是刚刚入门Python的初学者.本文就来为大家详细讲讲如何运行Python代码.一般来讲,运行Python代码的方式有两种,一是在Python交 ...

  10. python开发效率怎样提高_python 提高开发效率的5个小技巧

    很多时候学习是一种难者不会,会者不难的事情. 下面的5个python技巧是性价比极高的知识点,一学就会,不难但是相当管用. 使用交互模式 使用python -i xxxx.py可以直接进入python ...

最新文章

  1. BZOJ2331:[SCOI2011]地板——题解
  2. 独家 | 感悟注意力机制
  3. c语言中结构体的用法
  4. Handler Bundle Runnable
  5. Hive基本操作,DDL操作(创建表,修改表,显示命令),DML操作(Load Insert Select),Hive Join,Hive Shell参数(内置运算符、内置函数)等
  6. 80m的mysql文件要导入多久_mysql导入数据库文件最大限制更改解决方法:You probably tried to upload too large file...
  7. SAP Spartacus 服务器端渲染优化引擎的参数 SsrOptimizationOptions
  8. 一图总结:软件测试原则|策略|模型|生命周期
  9. 零基础带你学习MySQL—加密函数和系统函数(十六)
  10. FastDB内存数据库API
  11. easyui的tree节点的获取和选中
  12. MDClub一个漂亮轻量的开源论坛系统
  13. WPF 在image控件用鼠标拖拽出矩形
  14. java 通过request获取浏览器语言环境
  15. 【自动驾驶传感器融合系列】02自动驾驶中的多传感器同步理论
  16. 运维PaaS平台,让数据发挥更大的价值
  17. YTU-OJ-多重继承
  18. Java是剑客-飘逸;.NET是刀客-霸道 (一) 【转载】
  19. 大学期间的副业赚钱之道
  20. 巅峰极客2022wp

热门文章

  1. Android 自定义组合控件 简单导航栏
  2. java的传值和传址问题
  3. Dreamweaver自动生成的垃圾代码
  4. java 垃圾回收题目_我肝了万字的Java垃圾回收,看完你还敢说不会?
  5. 亿能bms上位机_BMS上位机 - 源码下载|Windows编程|通讯编程|源代码 - 源码中国
  6. 新建模块 pom.xml依赖无法识别_使用模块依赖关系,第2部分
  7. dubbo分布式事务解决方案_阿里架构师谈:高并发+分布式+秒杀+微服务+性能优化...
  8. c++ 定时器_「正点原子Linux连载」第十九章定时器按键消抖实验
  9. dx绘制2d图像_【3D建模】聊聊2D动画软件
  10. Tp5接口请求数据返回正常,状态为500