国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫CPSC 217、代做python編程設計

時間:2024-03-28  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



CPSC 217: Introduction to Computer
Science for Multidisciplinary Studies I
Assignment 3: BeatHero
Weight: 7%
Collaboration
Discussing the assignment requirements with others is a reasonable thing to do, and a good way to learn.
However, the work you hand in must be yours and yours alone. This is essential for you to benefit from the
learning experience, and for you to be graded fairly. Handing in work that is not your original work, but is
represented as such, is plagiarism. Penalties are outlined in the university calendar. A common first penalty is an F
on a plagiarized assignment. Here are some tips to avoid plagiarism in your programming assignments.
1. Cite all sources of code that you hand in that are not your original work using comments in your program,
including the complete URL. For example, if you find and use code found on a website, include a comment
that says:
# The following code is from https://www.quackit.com/python/tutorial/python_hello_world.cfm.
2. Citing sources avoids accusations of plagiarism and penalties for academic misconduct. However, you may
still get a low grade if you submit code that is not primarily developed by yourself. Cited material should
never be used to complete core assignment specifications. Before submitting, you can and should verify any
code you are concerned about with your instructor/TA.
3. Discuss and share ideas with other programmers as much as you like, but make sure that when you write your
code it is your own. A good rule of thumb is to wait twenty minutes after talking with somebody before
writing your code.
4. Collaborative coding is strictly prohibited. Discussing anything beyond assignment requirements and ideas is a
strictly forbidden form of collaboration. This includes sharing code, discussing code itself, or modelling code
after another student's algorithm. You cannot use (even with citation) another student’s code.
5. Using a generative AI tool, such as Copilot or ChatGPT, to assist you in completing assignments is acceptable in
limited circumstances, with attribution. For example, if your assignment is to write a Tic-Tac-Toe program, you
might ask ChatGPT about a small part of that task, such as “How do I convert a string to an integer in
Python?”. You cannot ask for such a tool to do the entire assignment. For example, asking ChatGPT “How do I
write Tic-Tac-Toe in Python?” is unacceptable. If you use a tool such as this, indicate with comments which
parts of your code you asked the generative AI tool about. Keep in mind that when you write your exams, you
will not have access to these tools, so it would be wise not to rely on them too much.
6. Making your code available, even passively, for others to copy, or potentially copy, is also plagiarism.
7. We will be looking for plagiarism in all code submissions, possibly using automated software designed for the
task.
8. Remember, if you are having trouble with an assignment, it is always better to go to your TA and/or instructor
to get help than it is to plagiarize.
Late Penalty
You will have a total of five grace days per semester (across all assignments). After that, late assignments will not
be accepted without a documented university-approved excuse.
Goal
Practice using lists, tuples and dictionaries while creating a game.
Technology
Python 3, SimpleGame Package
Submission Instructions
This assignment requires you to write a computer program using Python. Use the Assignment 3 drop
box in D2L to submit your Python file. You can submit multiple times over the top of a previous
submission. Your assignment must be executable with Python version 3.9.0+. You must use the
SimpleGame library, which contains beatHeroStarter.py code to get you started. You are allowed to
import libraries taught in class, such as random and math. Do not import any other libraries to complete
this assignment.
Upload CPSC217W24A3-Name.py (e.g. CPSC217W24A3-MichelleCheatham.py)
If using your own images, sounds, or music, zip your .py file with the folders containing all the media
associated with your project.
Description
Game Overview
This game, BeatHero, was inspired by the Beat Saber Virtual Reality game. Our game is much simpler,
and you can play it on your computer using your keyboard. Watch the video in the assignment Dropbox
to get a better idea of how the game is supposed to be played (seriously, stop reading here and watch
the video before moving on!)
In our version, when the game starts, the soundtrack starts and beats start falling down your screen, at
first slowly and a few at a time, but as beats move down the zones, they speed up and tests the limits of
your dexterity. Your goal is to score as much as possible before time runs out. Each beat is represented
by an arrow. To score a point, you’ll need to press the arrow key on your keyboard in the direction
noted by the beat arrow before it hits the bottom of the screen. With multiple beats on your screen, you
must always aim for the lowest one.
Game Structure
Before the Game
When the game is run, the starting screen appears. As BeatHero is a real-time game, this step assures
that the player is ready to play before the game starts. The game will only start when the player presses
the space bar.
During the Game
Once the game starts, at the same time, the music track is played, the countdown timer starts, and
beats start falling down the screen in three different streams. The screen is divided into three horizontal
zones. When a beat enters a zone (including the first one): it randomly rotates, changes colors, speeds
up, and increases in points awarded for getting it correct. The zones from top to bottom are orange,
pink and blue. When the player presses an arrow key, a representation of that key is shown on the
screen. Each time the player correctly presses an arrow key in sync with the direction of the lowest beat
on the screen, the beat turns green with a score number beside it, shortly disappears, and the player is
awarded the appropriate number of points (1 for the orange zone, 2 for pink and 3 for blue); we refer to
this as a hit. If the player doesn’t press the correct arrow key, or the beat reaches the bottom of the
screen before any key is pressed, the beat lights up red and disappears; we refer to this as a miss.
After the Game
Once the timer hits 0, the game ends. At this stage, all the beats are removed from the screen, and no
more points will be awarded. The final score is shown on the screen.
SimpleGame
To program BeatHero, you will be using a game engine called SimpleGame which is based on PyGame
and PyGameZero! You can download it here. You will have access to all the documentation on how
SimpleGame works and how to install it. We also provide you with a sample code as a starting point for
your game. After you press the space key on your keyboard, the music starts, and a single beat pointing
to the right falls down the screen. You can write code inside any of the provided functions in this file, but
you will still need to add additional functions.
The SimpleGame package comes with a module named simplegame. All functions available through the
module are listed on here. Before beginning to code, carefully read the documentation for each
SimpleGame function (docstrings) to understand what is available to you. You are only allowed to use
the capabilities of this module for this assignment. Additionally, in your IDE, if you hover over a function
name, you will see its description, parameters (if any) and return value (if any).
In the starter code, you’ll notice three functions (update, draw, and on_key_down) that are called
internally. This means there’s no need for you to call these functions anywhere in your code, as they will
automatically be called by the game engine at the appropriate times.
update()
Like many other game engines, SimpleGame uses a game loop, which is called 60 times per second. The
60 fps (frames per second) allows the game to be updated constantly, to maintain a smooth gameplay
which is very fundamental for real-time games. In your starter code, inside the update() function, we
have provided a frameCounter which you can use to calculate the time that has passed between
different actions.
This is where you should code your game logic, such as animating/moving game elements, updating
scores, checking game conditions, etc.
draw()
This function is called every time something changes on your screen, e.g. a beat moves down by a few
pixels. Similar to simplegraphics, the (0, 0) coordinates are at the top-left of the screen and the order in
which you draw your game element matters. If you put any game logic inside this function, it will
considerably affect your game speed, even making it laggy.
Except for loops and conditions, your code should only use this function for drawing on the screen. The
drawing functions available through SimpleGame are draw_background_image(), draw_element(), and
draw_text_on_screen(). Note that you cannot draw an element before first creating it.
on_key_down()
This function is an event handler that gets called anytime a key on your keyboard is pressed. The integer
value representing the key is passed to the get_key_pressed() function from the simplegame module
and stored in the key_pressed variable inside this function. You only need to compare this value to see if
it’s a desired key, and if not, you may ignore it. Try printing the key_pressed variable and see what it
shows when you press different keys on your keyboard.
Functions inside the simplegame Module
Here, we quickly review some of the functions that are available to you through the simplegame
Module.
Creating, Drawing and Rotating Movable Elements
To place any image on the screen, you first need to call the create_element() function. You will pass the
name of the image file (without the .png extension) along with the starting position and it will return a
dictionary with a single key that contains the id for that specific element. You are encouraged to add
other key-values to this dictionary to control your elements. Note that creating an element won’t make
it appear on the screen. To do that, you must use draw_element(). To rotate the element clockwise, you
must use rotate_by().
Look inside the images folder to find a variety of beats, arrows, backgrounds, and many more.

When generating beats, you must randomly rotate the image by 0, **, 180 or 270 degrees, and
randomly choose the stream (1,2,3) the beat falls through. Stream is the path in which the beat falls
straight down the screen. You need to keep track of which stream the beat belongs to have it move
down the screen. There is quite a lot of information that is associated with every beat, so make sure you
take advantage of these dictionaries. Here are some ideas for keys you can add to your element
dictionary:
• stream / column (1,2,3): Which stream the beat should appear and move to.
• zone (‘orange’, ‘pink’, ‘blue’): Which zone the beat is falling through currently.
• moving / active (True/False): Once a key is pressed, the lowest beat must stop moving and
instead momentarily show whether the player hit the correct or wrong key.
• scored / status ('hit', 'miss', 'superhit', etc.): Keeping track of whether the beat was scored or
not before removing the key permanently.
• speed (‘slow’, ‘medium’,’fast’): Keeping track of speed of the beat
• direction ('left', 'right', 'up', 'down'): This will be helpful to see if the correct key was pressed.
You can also create a dictionary to represent zones with relevant characteristics, such as for zone A:
• zone (‘orange’, ‘pink’, ‘blue’): The zone this dictionary represents
• speed (‘slow’, ‘medium’,’fast’): Keeping track of speed of the zone
• points (‘+1’, ‘+2’, ‘+3’): Keeping track of points a hit in each zone can score
Retrieving Info from the Game Engine
The following functions allow you to get real-time information about elements on the screen.
get_image() retrieves the string name of the image of the element.
get_position() retrieves the position of an element i.e. x, y coordinates
get_rotation_angle() retrieves the rotation angle of an element, clockwise, from its original orientation
Music and Sound
Music and sound behave differently. A music track is long and looped indefinitely, while a sound clip is
short and only plays once.
Your game must play background music using manage_background_music() function. The music files can
be found under the music folder in your project. When you play a music file, it will loop indefinitely until
you stop or pause it.
Your game must also play sound clips corresponding to hit or missed beats by using play_sound_clip()
function. Some sound files can be found under the sounds folder in your project.
Scheduling Callback for Functions:
Callback functions accept the name of the function that is scheduled to be (a) called after a specified
interval of time using schedule_callback_after() or (b) called repeatedly every specified interval
schedule_callback_every(). If you want to cancel a callback to a function that you already scheduled, you
can call cancel_callback_schedule() at any point. Note that when you pass a function to another one as
an argument, it cannot take any parameters, and you need to remove the brackets in front of it. You
must also pass an immutable integer/float for seconds. If you need to change the callback time, you
need to cancel the current one and reschedule a new one. These functions are useful for momentarily
changing the image of an element or for actions that happen repeatedly. You are not required to use
these, as you can achieve the same using the frameCounter inside your update() function.
Getting started
1. Unzip the Provided File
- Download the ZIP file from here for this assignment.
- Extract its contents to a preferred folder on your computer.
2. Setting Up Your Environment with PyCharm
- Open PyCharm and navigate to `File` > `Open...`, then select the directory where you extracted the
assignment files.
- In Pycharm, locate the terminal window (usually found at the bottom). You might need to go to
View -> Tool Windows -> Terminal to get the terminal to appear.
3. Install Required Package
- In the PyCharm terminal, type the following command and press Enter:
- pip install SimpleGame-2.6.7.tar.gz (the same as the filename in your BeatHero directory)
- This command installs the necessary SimpleGame package, which contains the module with the
functions and utilities you'll need to develop this game.
- Open beatHeroStarter.py file and run it.
Suggested Algorithm
1. Create all the visual elements you plan to have in your game (except for the beats), using width
and length of the window to determine the positioning of each element.
2. Draw the elements associated with each stage of the game (before, during, and after) and any
text that you’d want to show on the screen in your draw() function.
3. Set up the timer counting down and set the condition for when the timer reaches 0 seconds.
By this point, you will be able to run your game, and go through all three stages.
4. Change the ‘generate_beat()’ function in the starter code so that it creates a beat with a random
orientation, and assign it to a random stream. After creating a beat, add it to ‘beatList’.
5. During the game, repeatedly generate random beats. (e.g. every second)
6. In your draw() function, draw every member of the ‘beatList’ inside the during the game section.
7. Using the same logic, in update(), have the beats move down a couple of pixels on each frame.
The falling beats should not overlap with widgets at the top of the screen (e.g. score and timer).
By this point, you will see new beats at the interval you specified, and they all fall down.
8. Create a function that determines which beat is the lowest beat on the screen.
9. Write logic that anytime an arrow key is pressed, it compares the lowest beat’s direction with
the key_pressed.
10. Write the logic for updating the lowest beat’s status after an arrow key is pressed:
a. Stop its movement.
b. According to whether it was a hit/miss, write a function that
i. Change its image.
ii. Play the corresponding sound clip.
iii. If a hit, display how many points they scored beside the beat (+1, +2, +3 for
zones A, B, C, respectively)
iv. Make the beat disappear after the user is able to see them (0.**0.3 seconds).
v. Update the total score.
11. Inside update(), write a logic that will keep track of any beat that reaches the end of the screen,
and use the same miss function for it.
By this point, beats will be falling down the screen on three different streams, and you’re able
to play the game.
12. Write logic that calculates the specific y-position representing a threshold between the zones
(zone A to zone B and from zone B to zone C). Each beat should start at the top of zone A -
orange. For each zone:
a. A function for changing the color (changes images) of the beat when entering a new
zone.
b. A function for speeding up the rate at which beats are generated and are moving down
the screen as the beat enters a new zone.
c. A function that increases the number of points added to the score when the beat enters
a new zone.
13. Update the score text during the game on the top and after the game.
Requirement Checklist
• You must use lists, dictionaries, and tuples in your program.
• Play background music.
• Play 2 different sound clips to indicate hit/miss beats.
• 3 different streams of beats flowing from top to the bottom of the screen.
• A random stream for each beat.
• When entering a new zone:
a. random rotation
b. beat color according to the zone
c. speed of the movement increases
d. point of value increases
• 5 different arrow images used for beats (orange, pink, blue, hit, miss).
You are not allowed to use more than 5 arrow images in your code.
• Text/image with number of points added to score beside a hit beat. No text beside a missed
beat.
• A countdown timer visible on the screen which would end the game when it reaches zero.
• Real-time score of the player during the game, and the final score when the game ends.
• A visual representation of the keys pressed by the player during the game.
Optional
You are not required to use our images, but you’re strictly prohibited from using 4 different images for
up, down, left and right as you need to handle that in your code by rotating the same image. If you use
different images, music and sound clips, make sure they fulfill the criteria mentioned in the SimpleGame
documentation. If you're adding your own arrows, ensure that all arrow images have the same angle,
rather than having separate images for each rotation. You are only allowed to use png images and wav
music or sounds. Make sure to use only lowercase names for the files and add them to their
corresponding folders.
Grading
The assignment will be given a plus/minus letter grade, with the grade based on the program’s
level of functionality and conformance to the specifications. Fully meeting the specified
requirements will result in an A. An A+ may be awarded to particularly impressive submissions.
As a reminder, the University of Calgary assigns the following meaning to letter grades:
A: Excellent – Superior performance showing a comprehensive understanding of the subject
matter
B: Good – Clearly above average performance with generally complete knowledge of the
subject matter
C: Satisfactory – Basic understanding of the subject matter
D: Minimal Pass – Marginal performance; Generally insufficient preparation for subsequent
courses in the same subject
F: Fail – Unsatisfactory performance
How to get an A+
For students wanting to do extra work to receive an A+, you can do one of the following options. Note
that because this is optional, TAs and instructors will not be able to help you figure out how to achieve
things in this section (either in implementation or debugging).
- Have a second play mode in which the player loses if they miss three beats, and they win if they
last the timer. The player must be able to choose the game mode before starting the game.
- Add 3 randomly selected Super-Beat (find a new image for it), where if the player hits the right
key for it, all beats currently on the screen disappear (and you get corresponding points).
- Add at least two of the following: (1) Extra control elements to the screen e.g. controlling the
starting speed of beats, (2) Extra capabilities to the already existing elements e.g. the timer
changes color from green to red gradually as the player nears the end of the game.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 



 

掃一掃在手機打開當前頁
  • 上一篇:CSCI 2122代寫、代做C/C++編程語言
  • 下一篇:代寫聚寬量化策略 聚寬代碼代寫
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    久久精品在线免费视频| 成年人网站国产| 亚洲永久激情精品| 欧美影视一区二区| 国内精品小视频在线观看| 99免费视频观看| 色狠狠久久aa北条麻妃| 一区二区视频国产| 欧美在线视频一区| 国产精品亚洲片夜色在线| 国产成人免费av电影| 在线码字幕一区| 韩日精品中文字幕| 日产日韩在线亚洲欧美| 日韩免费av片在线观看| 国产精品一色哟哟| 久久精品国产精品| 日本中文字幕不卡免费| 国产免费一区视频观看免费| 91福利视频在线观看| 久久天天躁夜夜躁狠狠躁2022| 日本高清不卡在线| 99久久99| 亚洲v欧美v另类v综合v日韩v| 国产日本欧美在线| 国内精品美女av在线播放| 久久久久久a亚洲欧洲aⅴ| 一本大道熟女人妻中文字幕在线| 狠狠综合久久av| 久久av免费观看| 中国人体摄影一区二区三区| 国模杨依粉嫩蝴蝶150p| 日韩亚洲综合在线| 久久精品久久精品亚洲人| 日本一区二区三区四区在线观看| 99久久国产宗和精品1上映 | 久久久久资源| 性视频1819p久久| 国产精品 欧美在线| 亚洲一区二区三区乱码| 国产99午夜精品一区二区三区| 精品一区日韩成人| 日韩中文字幕在线视频播放 | 欧美最猛性xxxx| 精品国偷自产在线| 免费高清一区二区三区| 国产精品男人的天堂| 欧美在线国产精品| 国产精品视频精品| 国产999精品视频| 国产剧情久久久久久| 国产99视频精品免视看7| 国产精品一区二区欧美 | 日韩高清国产一区在线观看 | 日韩在线观看精品| 欧美日韩一区二区在线免费观看| 日韩中文字幕在线精品| 欧美亚洲激情在线| 国产精品久久久久久久天堂| 蜜臀av性久久久久蜜臀av| 欧美猛交ⅹxxx乱大交视频| 精品一区在线播放| 欧美激情视频在线观看| www插插插无码免费视频网站| 国产精品精品视频| 黄色一级片网址| 日韩中文字幕视频| 日本www在线视频| 日韩色av导航| 国产中文字幕91| 欧美片一区二区三区| 99久久久精品免费观看国产| 亚洲aaa激情| 精品国内亚洲在观看18黄| 国产免费一区二区三区视频| 亚洲精品乱码久久久久久自慰| 久久久久久av无码免费网站下载| 欧洲成人一区二区| 精品伦理一区二区三区| 91免费看片在线| 久久影院理伦片| 国产精品久久久久久久久久久久冷| 精品国产无码在线| 国产精品久久精品| 精品午夜一区二区| 欧美激情一区二区久久久| 久久人人爽人人爽人人片av高请| 青青青国产在线视频| 国产精品无码免费专区午夜| 国产精品一区久久久| 日本不卡一区二区三区在线观看| 国产精品入口日韩视频大尺度 | 亚洲第一综合网站| 久久精品国产99国产精品澳门| 男人的天堂成人| 亚洲国产精品一区在线观看不卡 | 九色一区二区| 国产伦一区二区三区色一情| 日韩久久一级片| 欧美激情一级精品国产| 久久久久久久爱| 粉嫩av免费一区二区三区| 日韩国产精品一区二区| 国产99久久精品一区二区永久免费| 国产mv免费观看入口亚洲| 黄色免费福利视频| 亚洲精品久久久久久一区二区| 国产精品免费一区二区三区四区| 国产精品69久久| 国产一区二区香蕉| 欧美一级特黄aaaaaa在线看片| 国产精品无码专区在线观看| 91精品久久久久久久久久入口| 国产一区二区四区| 欧美少妇一区二区三区| 亚洲 国产 欧美一区| 欧美精品在线看| 久久久久久久久久亚洲| 91免费欧美精品| 国产色婷婷国产综合在线理论片a| 亚洲一区二区三区精品动漫| 久久亚洲私人国产精品va| 久久久久久久久网| 91精品国产99久久久久久 | 萌白酱国产一区二区| 久久精品中文字幕免费mv| 久久久免费看| www.久久草| 国产狼人综合免费视频| 精品日韩美女| 精品伦精品一区二区三区视频| 日韩视频亚洲视频| 久久精品在线免费视频| 国产精品10p综合二区| 久久久久久国产精品mv| 久久99精品久久久久久青青日本| 国产成人亚洲综合无码| 国产成人免费电影| 久久精品人人做人人爽| 国产精品青草久久久久福利99| 国产精品男女猛烈高潮激情| 久久亚洲私人国产精品va| 九九精品在线视频| 亚洲国产精品www| 日本午夜人人精品| 欧美尤物一区| 国内精品久久久久伊人av| 欧美国产一区二区在线| 精品一区二区视频| 国产在线观看精品一区二区三区| 国内一区二区在线视频观看| 欧美日韩亚洲一二三| 国产一区福利视频| 欧美激情国产精品日韩| 激情综合网婷婷| 国产麻花豆剧传媒精品mv在线| 国产免费一区二区三区在线能观看| 国产免费成人在线| 99热一区二区三区| 超碰国产精品久久国产精品99| 久久久99爱| 日韩少妇与小伙激情| 久久久久北条麻妃免费看| 久久久999成人| 久久99亚洲热视| 制服诱惑一区| 无码人妻精品一区二区三区99v| 少妇久久久久久被弄到高潮| 日本一本a高清免费不卡| 欧洲午夜精品久久久| 国内精品400部情侣激情| 国产视频不卡| 97成人在线视频| 国产成人成网站在线播放青青| 国产精品久久97| 亚洲在线视频一区二区| 日本一区二区在线视频观看| 欧美日韩国产高清视频| 色播五月综合| 国产中文字幕亚洲| 97久久精品视频| 久久久久久久有限公司| 国产精品二区二区三区| 痴汉一区二区三区| 青春草国产视频| 国产日韩在线一区二区三区| 7777精品视频| 久久免费看av| 久久av中文字幕| 岛国一区二区三区高清视频| 欧美精品一区在线发布| 国产美女网站在线观看| 国产又粗又爽又黄的视频| 苍井空浴缸大战猛男120分钟| 国产高潮呻吟久久久| 国产精品麻豆免费版 | 日本国产在线播放| 国产三区二区一区久久| 久久男人av资源网站| 国产精品看片资源|