【MCD4710】Introduction to Algorithms and Programming

You are likely already familiar with a plethora of prehistoric paint programs. These all have a simple premise: you draw a colour on the canvas, and this overwrites, or sits on-top of, the existing canvas colours.
Some applications support transparency, allowing you to blend colours. Some allow you to draw
shapes, and others allow you to click and drag certain elements. None of them have the liveliness that
the FoA Admin team is looking for however. We want to be able to paint sparkles, or a rainbow, on
top of our images. Rather than painting with colours, we want to paint with Eff ects !
Throughout this assignment, you'll be working on a paint application, with the following features:
Multiple diff erent ways to combine eff ects, and paint with such eff ects
Undo/Redo
A painting replay
A special action
In doing this, you'll need to demonstrate knowledge on the following topics:
Stacks, Queues, Lists
Applications of the Data Structures above
Before you get working on the application, please read these tips & tricks to ensure you don't get lost,
or lose any silly marks!
Common Mistakes
You are marked on correctness in Ed . It doesn't matter if your code passes locally, it needs to
pass in Ed. Contact a TA if you are having trouble achieving parity. Be careful of the specifi c
Python version used, and don't import any other third party modules excluding those already
in requirements.txt .
Follow the rules regarding ban on lists, other collections and use the given data_structures
almost always. Check the task speciff c page to see what collections are banned for that feature.
Write clear and concise docstrings for methods you introduce, and type-hint all methods /
variables. If introducing new classes, consider using dataclasses to simplify this deff nition.
Separate your code into small methods of at most 20 lines, and try to abstract logic if you ff nd
lots of duplicated work. Almost all methods in the sample solution are 10 lines or less. (Please
ignore the mess that is main.py :} )
Initial Setup + Running Tests
To get up and running you want to do a few things:
Import the template repository into your own - Follow the instructions in the Getting Started
with Git page.

Optional\] Make a virtual environment for the project: python3 -m pip install virtualenv \&\& python3 -m venv venv (And then activate the virtual environment) (You may need to change python3 to python or py depending on your Operating System and Python version) Install the required packages: python3 -m pip install -r requirements.txt (Same deal here with python3 ) Test it is working by running python3 main.py or python3 -m visuals.basic (These will probably raise NotImplemented errors if you haven't implemented anything, but if your setup didn't work you'll get errors complaining packages aren't installed.) To run tests, call python run_tests.py . Note that you can restrict which tests are run using a second argument. You can always assume there at most 20 Layers in the application, but design the time complexity of your solution around an unbounded amount. dataclasses are used in some of the scaff old code. In short, they do a lot of the initialisation boilerplate for you by inspecting the type hinting for class variables. You can read more about it here . This project also uses abstraction with the abc module. You can read more about it here . Since this is a paint app, here's some recommend listening while you knock these tasks out of the park!

相关推荐
tankeven4 分钟前
动态规划专题(10):最优三角剖分问题
c++·算法·动态规划
黑眼圈子8 分钟前
动态规划问题专项练习(未编辑完成...
学习·算法·动态规划
探物 AI10 分钟前
【感知·车道线检测】UFLDv2车道线检测与车道偏离预警(LDWS)实战
人工智能·算法·目标检测·计算机视觉
菜鸟丁小真13 分钟前
LeetCode hot100 -54.螺旋矩阵
算法·leetcode·矩阵·知识点总结
weixin_4684668522 分钟前
排列组合算法之隔板问题与错排公式
c++·算法·数学建模·排列组合·竞赛·错排·隔板
wsoz32 分钟前
Leetcode链表-day9
c++·算法·leetcode·链表
Lumos_7771 小时前
Linux -- 系统调用
linux·运维·算法
一个行走的民1 小时前
深度剖析 Ceph PG 分裂机制:原理、底层、实操、影响、线上避坑(最全完整版)
ceph·算法
WolfGang0073211 小时前
代码随想录算法训练营 Day46 | 图论 part04
算法·图论
拾-光1 小时前
LTX-Video 2.3 实战:用图片生成视频,消费级显卡也能跑的开源 I2V 模型(GPT Image 2)
java·人工智能·python·深度学习·算法·机器学习·音视频