EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
Python代写
您的位置: 主页 > 编程案例 > Python代写 >
代做Python:python作业代写 cs代写 GUI 游戏Minecraft & Terraria Assignment - Python代做
发布时间:2021-07-25 15:26:55浏览次数:
Code is readable. Appropriate and meaningful identifier names have been used. Simple and clear code structure. Repeated code has been avoided.15%   Code QualityCode has been simplified where appropriate and is not overly convoluted. 10% Documented clearly and concisely, without excessive or extraneous comments. 15%    Functionality Components are functional, without major bugs or unhandled exceptions.Assessed through user testing/playing, not automated testing.60%   4. Task 1 – Basic GUIThere are a significant number of comments inapp.pyintended to help you complete this task.4.1. App ClassWrite amainfunction that launches theNinedraftGUI. Call thismainfunction inside anif name == block.ModifyNinedraftso that the title of the window is set to something appropriate (i.e. Ninedraft, etc.).4.2. Mouse Controls4.2.1. Moving: TargetWhen the player s mouse is moving over the game world, show the target cursor over the block position they have moused over. If the mouse leaves the game world (either to another widget or out of the window), or moves out of range, hide the preview.Due to the program structure, once the appropriate tkinter event is bound, the only code that needs be added to achieve this isin Ninedraft.redraw(Mouse coordinates for the target cursor are saved when the mouse moves so thatredrawcan usethem when it is drawing).See the_mouse_move, redrawmethods onNinedraftand theshow_target, hide_targetmethods onGameView ingame.py .4.2.2. Left Click: Attacking (Mining)Allow the player to attack (mine) their target block by clicking the left mouse button. Code already exists to call the attack method of the player s effective item and to mine the block.Most of this logic is already implemented. You need to bind the mouse button retrieve what the block drops when it is fully mined.Further, when a block is successfully mined, reduce the player s health/food by an amount of your choosing according to the following rules:If the player has food ( 0), decrease their food Otherwise, decrease their healthSee the_left_clickmethod onNinedraft .4.2.3. Right Click: Using or PlacingWhen the player right clicks, one of two things should happen:If the player is targeting a block, use that blockOtherwise, place the active item (see place)Code has been provided that implements this functionality. You only need to bind the appropriate mouse event.See the_right_clickmethod onNinedraft .See  the  init  , _left_click, _right_click, redrawmethods onNinedraftand theshow_target,hide_targetmethods onGameViewin game.py .4.3. StatusView ClassDefine a class namedStatusViewwhich inherits fromtk.Frame . This class is used to display information to the playerabout their status in the game. The StatusView s widgets must:be updated whenever necessary (i.e. when gaining or losing health or food)be laid out approximately according to Basic GUIExamplecontain the following widgets:Health (first row; left) A label to display the amount of health the player has remaining, with an image of a heart to the left. The health must be rounded to the nearest 0.5 (i.e. half or whole).Food (first row; right) A label to display the amount of food the player has remaining, with an image of a drumstick to the left. The food must be rounded to the nearest 0.5 (i.e. half or whole).Note: For convenience, you should have a setter method for each of the relevant widgets. i.e. set_health(health) , etc.TheStatusViewclass should be added to the application in a frame below theGameView .4.4. Basic ItemsOne basic type of item is that which drops a block form of itself when placed. For example:When the stone item is placed, it is logical that a stone block should appearFurther, when a stone block is mined, it also is logical that it should drop a stoneitem(s)The classBlockItem , found initem.py , represents an item as per #1 above.For this task, modify thecreate_itemfunction so that it can generate wood stone items. These should be instances of theBlockItemclass. E.g. wood = create_item( wood ) wood BlockItem( wood ) wood.place() [( block , ( wood,))] block_id = wood.place()[0][1]  create id)ResourceBlock( wood )You do not need to modify create_block , as the relevant code to create wood stone blocks already exists.4.5. Keyboard Controls4.5.1. MovementWhen the player presses the space bar, they should jump into the air. This can be achieved by modifying their velocity. Set the velocity to something reasonable, that meets the following requirements:The y-component must be negative (because computer graphics are drawn with the positive y-axis facing down)The x-component must not be zero, but should be different to what it was (i.e. if the player was moving left, when they jump, they should also keep moving left, but at a different speed)Double/triple/etc. jumping is allowed, so you do not need to check that the player is on the ground before jumping4.5.2. HotbarWhen the player presses a number key (1-9, 0), the corresponding item in the hotbar should be selected. If the corresponding item is already selected, it should instead be deselected. Note that 1 corresponds to the first (leftmost) item in the hotbar, and 0 to the last (rightmost), etc.4.6. File Menu DialogsImplement a menu bar, with aFilemenu. The File menu should have the following entries:New Game : Restarts the gameExit : Exits the applicationWhen the player attempts to exit the application, either by the file menu or otherwise, they should first be prompted with a dialog to confirm that they indeed want to quit the application. Further, if the player dies, they should be informed of this with a dialog, and asked if they want to restart the game.Note: On Mac OS X (and similar), the file menu should appear in the global menu bar (top of the screen).5. Task 2 – Intermediate FeaturesFor any subclasses you implement, in addition to the required methods listed, you will also need to override any relevantmethods from the super class that would raiseNotImplementedError . You will also need to modify the relevantcreate_*functions to allow your new things/items to be created.5.1. More ItemsImplement the following subclasses of theItemclass and add them to the game:5.1.1. FoodItemImplement a class calledFoodItemwhich inherits fromItem . When aFoodItem(item_id: str, strength: float)object is instantiated, it needs to be given an item identifier and a strength. The class must have the following method:get_strength() - float: Returns the amount of food/health to be recovered by the player by when used.place() - float: Returns an effect that represents an increase in the player s food/healthAdd a stack of 4 of these to the starting hotbar, and modify the food item with 2-strength)create_itemfunction so that leaf blocks can drop apples (aWhen food is placed, increase the player s health/food by an amount equal to the food s strength, according to the following rules:If the player has lost food ( maximum), increase their food Otherwise, increase their healthNothing should physically be placed in the world. For example: apple = FoodItem( apple , 2) apple.place() [( effect , ( food , 2))] apple.get_strength() 2SeeNinedraft.run_effect5.1.2. ToolItemImplement a class calledToolItemwhich inherits fromItem . When equipped, tools damage certain blocks faster than thehands, and are able to mine materials that the hands cannot (such as stone from stone blocks). A tool is depleted when its durability reaches zero.When aToolItem(item_id: str, tool_type: str, durability: float)object is instantiated, it needs to be given anitem identifier, the type of tool it will be and the tool s durability. The class must have the following methods:get_type() - str: Returns the tool s type.get_durability() - float: Returns the tool s remaining durability.can_attack() - bool: Returns True iff the tool is not depleted.attack(successful: bool): Attacks with the tool; if the attack was not successful, the tool s durability should be reduced by one.Note: For tools made of a material, such as the stone axe, theitem_idshould be{material}_{tool_type} , according tothe break tables in item.pyFor example diamond_axe = ToolItem( diamond_axe , axe , 1337) diamond_axe.get_type() axe diamond_axe.get_max_stack_size() 1 for _ in range(1295): diamond_axe.attack(False)  diamond_axe.get_durability() 425.2. CraftingThe process of turning items into new items is called Crafting. The player can craft items and reorder their inventory/hotbar in a crafting screen. When the player presses the e key, the basic crafting screen should toggle (switch between showing in a new window hiding). You may assume the player will not interact with the game world while a crafting window is open.Add theCRAFTING_RECIPES_2x2constant toapp.pywith at least three additional recipes of your own, and modifyNinedraft._trigger_craftingto open the simple crafting window. Initially, this will only show the inventory hotbar.Next, in the filecrafting.py , complete theGridCrafterViewclass according to the comments. You do not need to modifyany other code in this file ( GridCrafterViewis already instantiated inCraftingWindow._load_crafter_view ).SeeCraftingWindow GridCrafter incrafting.py5.2.1. SnippetsThese can also be found in 5.3. CraftingTableBlockImplement a class calledCraftingTableBlockwhich inherits fromResourceBlock . When used, this block should triggerthe crafting table screen. From the block s perspective, this can be achieved by returning an effect from the When mined with the correct tool, this block should drop an item form of itself. For example:usemethod. table = CraftingTableBlock() table.use()( crafting , crafting_table ) table.get_drops(0, True) [( item , ( crafting_table ,))]Add the 2 2 recipe to create the crafting table toCRAFTING_RECIPES_2x2 . Further, add theCRAFTING_RECIPES_3x3constant toapp.pywith at least three additional recipes of your own.Lastly, extend theNinedraft._trigger_craftingmethod to open the crafting table screen.5.3.1. SnippetsThese can also be found in  6. Task 3 – Advanced Features6.1. MobsMobs are non-player-characters in the game. They are living (have health) and can move around. Some mobs can harm the player.To complete this sub-task, in addition to subclassing Mob , you will need to add additional blocks items to the game,including the relevantcreate_*function, and drawing method(s) to theWorldViewRouterclass. Further, you will need tohandle the case where the player attacks (left-clicks) a mob.6.1.1. SheepImplement a class calledSheepwhich inherits fromMob .Sheep move around randomly and do not damage the player.When attacked, a sheep should drop wool ( wool = BlockItem( wool ) ), without taking damage. This wool should be able to be dropped as a block and should be included in at least one crafting recipe.6.1.2. BeesImplement a class calledBeewhich inherits fromMob .Bees swarm the player, and individually cause a small amount of damage. They move slightly quicker than the player, and swarm toward the player in a semi-random fashion. If there is a honey block ( honey = ResourceBlock( honey , ) ) nearby (within 10 blocks), they will instead swarm to the honey.The player can attack bees, and with simple tools they should individually be destroyed in one hit.When the player mines a hive block ( hive = HiveBlock( hive ) ), 5 bees should spawn and begin to swarm toward the player.6.2. FurnaceThe furnace allows the player access to another form of crafting, called smelting (also known as cooking, baking, melting, drying, or burning). This process involves two items, a fuel source and the item to be heated. For example, the player can cook an apple on wood to produce a cooked apple.Allow the player to craft a furnace on the crafting table by using a ring of stone (a 3 3 grid, with nothing in the centre). This should yield an item that can be placed as a furnace block, which when used opens the smelting screen, and when mined with a pickaxe drops an item form of itself.Ensure that the smelting screen shows some sort of icon to represent the smelting — you may use a simple canvas shape in place of the flame shown above.Lastly, add at least five smelting recipes to create items. You are encouraged to add new items/blocks to make this interesting (i.e. diamond, gold, grain, etc.), although this is not required.7. CSSE7030 Task – Independent Research7.1. Advanced FeatureThis task involves adding a bow arrow tool to the game. Add it to the player s starting inventory.When attacking, the bow should fire a flaming arrow at a trajectory matching the mouse s position relative to the player. Forexample, if the player is centred at(200, 200) , and the cursor is at(100, 100) , the bow should fire at a 45 degree angleto the left. The further the mouse is from the player, the stronger the arrow should fire, up to some maximum (i.e. 4 blocks away).It is intended that gravity should cause the arrow to drop, and not necessarily pass through the position on the cursor. Further, the bow should always fire, regardless of whether the target is in range.Physics in Ninedraft is implemented in theWorldclass using the pymunk library, so to successfully complete this task, youwill need to research this library and subclass World .Further, to achieve full marks for this task, the flaming arrow must immediately destroy certain blocks on contact:Wood is instantly destroyed and drops nothingHive blocks are instantly destroyed, and drop honey ( BlockItem( honey ) ) without spawning any bees.8. Assignment SubmissionNote: There will not be a practical interview for the third assignment.Your assignment must be submitted via the assignment three submission link on Blackboard. You must submit a zip file,a3.zip , containing the support code.app.pyand all the files required to run your application (including images). Your zip file must include allLate submission of the assignment will not be accepted. Do not wait until the last minute to submit your assignment, as the time to upload it may make it late. Multiple submissions are allowed, so ensure that you have submitted an almost complete version of the assignment well before the submission deadline. Your latest, on time, submission will be marked. Ensure that you submit the correct version of your assignment. An incorrect version that does not work will be marked as your final submission.In the event of exceptional circumstances, you may submit a request for an extension. See the course profile for details of how to apply for an extension. Requests for extensions must be made no later than 48 hours prior to the submission deadline. The expectation is that with less than 48 hours before an assignment is due it should be substantially completed and submittable. Applications for extension, and any supporting documentation (e.g. medical certificate), must be submitted via my.UQ. You must retain the original documentation for a minimum period of six months to provide as verification should you be requested to do so.Change LogVersion 1.1.0 May 17It is recommended that you immediately update your support code. However, if you began working on the assignment in version 1.0.0, you may submit it with version 1.0.0 of the support code.Assignment SheetRedistributed some marks within tasks to more accurately reflect difficulty Clarified how food/health changes in 4.2. Mouse Controls 5.1.1. FoodItemClarified termstarget/attack/mine/use/placein 4.2. Mouse ControlsClarified concepts expanded description in 4.4. Basic ItemsSignificantly clarified crafting in 5.2. Crafting, 5.3. CraftingTableBlock, 6.2. Furnace (added snippets to the first two) Fixed typographical errors, annotated relevant types, added minor clarificationsAdded screenshots of crafting to online view; also available in blackboard Reformatted example code to be in the same form as running in IDLESupport FilesStandardised parameter names:app.py:create_block(block_id) ,create_item(item_id)block.py:get_drops( , correct_item_used)method ofBlock its subclassesAdded comments to 100% of provided source code that requires themMovedWorldViewRouter togame.py , and added parameters to init ; should now be instantiated inapp.pywithWorldViewRouter(BLOCK_COLOURS, ITEM_COLOURS)AddedItem.get_max_durabilitymethod added durability display to hotbarFixed items not being picked up when colliding with player Mobs:Renamedcreature.py tomob.pyRenamed all instances of creature inworld.pyto mob (case-insensitive)Added abstractMobclass exampleBirdclassAddedtime_delta game_dataparameters toPhysicalThing.stepto prevent hacky solutions fortask3/post-gradMovedPlayer s health to parent class to share withMobMergedgeometry.pyintocore.py(to try and reduce overwhelming number of files)Added optional parameters taskcollision_types, thing_categories toWorld inworld.pyto simplify post-graduateAddedcrafting.pywith template for crafting view widget

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。