CS5003 — Masters Programming ProjectsAssignment: P2 – Project 2Deadline: Wednesday 3rd April (Week 8) 21:00Credits: 33% of the overall module gradeNOTE: MMS IS THE DEFINITIVE SOURCE FOR DEADLINES AND CREDIT DETAILSYou are expected to have read and understood all the information in this specification and anyaccompanying documents at least a week before the deadline. You must contact the lecturer regardingany queries well in advance of the deadline.AimsThe main aim of this project is to teach you to write a complete web application including both clientand server components. More specifically, it will involve designing and testing an API, implementingthe front-end and back-end in Javascript which communicate through this API, and choosing theright data representation. You will be using Node.js packages such as Express. The use of git versioncontrol system is mandatory for this practical.OverviewYou will create an online game that allows different users to connect and to play against each other.A basic implementation should implement a simplified game of battleship1, where players take it inturns guess where their opponent’s ships are on a 10 x 10 grid. The game is over when one playerhas correctly guessed where all their opponent’s ships are (i.e. when a player has targeted and sunkall their opponent’s ships).Working in pairs, you will implement both the client side (HTML+CSS+JS) and the server side(JavaScript based on Node.js), The server side will implement a RESTful API for exchanging datawith the client. Your webpage will contain client-side JavaScript which makes HTTP calls to the API,and exchanges data with the server using JSON.The client should be able to let a user connect to the server, place their ships on their own grid,target cells on their opponent’s grid, and display the current state of both their own and their opponent’sgrids. Information about which cell has been targeted should be sent to the server via theAPI, and the game state will be held centrally on the server. Your solution should allow two peopleto play against each other from two separate computers.The API should provide services needed to make this happen including, but not limited to:starting a new game configuring the game (player name, size of grid, number/type of ships, game variant, etc. . . ) placing ships on the player’s grid targeting a cell on the opponent’s grid1https://en.wikipedia.org/wiki/Battleship_(game)#Descriptionpage 1 of 5? detecting hit/miss/victory conditionsThis is a fairly open-ended project, but you should ensure your application provides certain corefunctionality as described Section Requirements.RequirementsYour application should provide the functionality described below. You should make sure you havecompleted all the requirements in each section before moving onto the next.BasicYour application should provide the following:Allow a player to start a new game against another player. Allow a player to place their ships on their own grid. Each ship occupies a number of consecutivesquares on the grid, arranged either horizontally or vertically. The number of squares foreach ship is determined by the type of the ship:# Class of ship Size1x Aircraft Carrier 51x Battleship 41x Cruiser 32x Destroyer 22x Submarine 1 Allow a player to target a cell on their opponent’s grid. If the opponent has part of a ship inthe cell, it counts as a ’hit’, if not, it counts as a ’miss’. This should be displayed appropriatelyon each player’s grids. Finish the game appropriately when all parts of all of a player’s ships have been ’hit’.IntermediateYour application should provide all the requirements described in Section Basic, plus the following: Allow a player to enter their name. Allow a player to choose whether each ship is placed horizontally or vertically on the grid. Ensure a player’s ships do not overlap (i.e. only one ship can occupy any cell on a player’sgrid). Ensure a player’s ships remain within the bounds of the grid. Detect when all parts of an individual ship have been ’hit’ and announce that it has been ’sunk’. Keep track of a player’s score (e.g. how many games played/won). Allow a player to stop or restart a game. Deal with this appropriately for a player’s score.AdvancedYour application should provide all the requirements described in Sections Basic and Intermediate,plus the following: Integrate media such as images, animations and sounds (easy — hard).page 2 of 5? Allow the player to configure the game rules, e.g. size of grid, number/type of ships, specificgame variants such as Salvo2(medium) Provide database connectivity to store previous games (medium). Provide real-time interaction using Web Sockets (medium). Allow games to be recorded and replayed (hard). Provide user authentication (hard).DeliverablesA single .zip file must be submitted electronically via MMS by the deadline. It should contain: The entire working copy of your repository, containing the source code and revision history A joint report (around 2000 words), in PDF format detailing the design of your solution, discussingany requirements and design decisions taken, your approach to testing, your approachto team work (e.g. use of tools such as Trello, or techniques such as pair programming), andreflecting on the success of your application and development process. Try to focus on the reasonsfor your decisions rather than just providing a description of what you did. This will bejoint work of both partners. An individual report (around 1000 words), in PDF format describing your own contributionand your own challenges. A short README file describing how to run your server and listing any node packages whichneed to be installed.Submissions in any other formats may be rejected.Marking CriteriaMarking will follow the guidelines given in the school student handbook:https://info.cs.st-andrews.ac.uk/student-handbook/learning-teaching/feedback.html#Mark_DescriptorYour submission will not be evaluated based on aesthetic appeal (this is not a visual designcourse), but use of CSS and DOM scripting which enhances the experience and interactivity willbe rewarded.There will be a group mark (based on the quality of the final application and joint report) and anindividual mark (based on your individual contribution and individual report). The git repositorywill be used during marking to evaluate individual contribution.Your final mark will be the average of the group mark and your individual mark.Some specific descriptors for the group component of the assignment are given below: A poor implementation in the 0–7 grade band will be missing nearly all required functionality.It may contain code attempting a significant part of a solution, but with little success, togetherwith a report describing the problems and the attempts made at a solution. A reasonable implementation in the 8–10 grade band should provide some of the functionalitydescribed in Section Basic, and demonstrate reasonable use of HTML, Javascript and Node.js.The code should be documented well enough to allow the marker to understand the logic. Thereport should describe what was done but might lack detail or clarity.2https://en.wikipedia.org/wiki/Battleship_(game)#Variationspage 3 of 5? A competent implementation in the 11–13 grade band should provide all the functionality describedin Section Basic, demonstrate competent use of HTML and CSS (e.g. for layout andpositioning), allowing players to play a complete game against an online opponent. The codeshould be documented well enough to allow the marker to understand the logic and shouldhave a modular design. The report should describe clearly what was done, with good style. A good implementation in the 14–16 range should provide all the functionality described in SectionBasic and some or all of the functionality from Section Intermediate. It should demonstrategood code quality, good comments, modular design, and proper error handling. All ofthe JSON objects passed through the API must be checked and validated. Good use of CSS forlayout and styling is expected for a submission in this range (not unmodified defaults). Thereport should describe clearly what was done with some justification for decision, with goodstyle, showing a good level of understanding. An excellent implementation in the 17 and higher range should provide all the functionality describedin Sections Basic and Intermediate, and some or all of the functionality from SectionAdvanced. It should demonstrate high-quality code and be accompanied by a clear and wellwrittenreport showing real insight into the subject matter.Note: For this practical you do not need to invent your own extensions. Concentrate on providinghigh quality, sophisticated implementations of the requirements in this specificationand writing an insightful report demonstrating understanding.Some specific descriptors for the individual component of the assignment are given below: A poor contribution in the 0–7 grade band indicates a weak or missing individual report, demonstratingconfusion and misunderstanding of the topic. Little or no contribution to the finalsoftware, adding little to no value and focussing on only one part of the program functionality. A reasonable contribution in the 8–10 grade band indicates an individual report lacking detail orclarity, with a small contribution to the final software, which added little value and focused ononly one part of the program functionality. A competent contribution in the 11–13 grade band indicates– a good individual report, but with a small contribution to the final software, focussing ononly one part of the program functionality.– OR an individual report lacking detail or clarity, but with regular contributions to theproject limited to a few parts of the project. A good contribution in the 14–16 range indicates a good report, regular contributions to theproject, but limited to a few parts of the project. An excellent contribution in the 17 and higher range indicates an excellent individual report,regular and sizeable code contributions throughout the project, and contribution to many importantparts of the project.Word LimitAn advisory word limit of approximately 2000 words applies to the joint report for this assignmentand an advisory word limit of approximately 1000 words applies to the individual report for thisassignment. Word limits exclude references and appendices. No automatic penalties will be appliedbased on report length but your mark may still be affected if the report is short and lacking in detailor long and lacking focus or clarity of expression.A word count must be provided at the start of each report.page 4 of 5Lateness PenaltyThe standard penalty for late submission applies (Scheme B: 1 mark per 8 hour period, or partthereof):https://info.cs.st-andrews.ac.uk/student-handbook/learning-teaching/assessment.html#lateness-penaltiesGood Academic PracticeThe University policy on Good Academic Practice applies:https://www.st-andrews.ac.uk/students/rules/academicpractice/Hints and suggestionsYou do not have to follow any of these suggestions, but you might find some of them useful.Start by spending some time on design – what needs to be done to meet the basic specification.What type of data needs to be represented and where (client or server, database or memory). Whatis the best way to represent the data – objects, classes, JSON objects, etc. Write a basic outline of yourobject/class structure and RESTful API on paper and think whether it makes sense. It pays to spendtime with your partner and discuss this in detail before starting to code.Divide the work into small chunks and decide how to split the work between the two of you.Agree on a rough work plan, and meet regularly to see how the work is progressing – sometimesyou will need to adjust because things turn out to be more difficult than planned.Have the basic requirements working fully before venturing into intermediate or advanced requirements.A clean, fully functional and well-written basic implementation is better than a buggymess with extensions.Try to avoid splitting the work into parts that are mostly separate (like only client-side and onlyserver-side) and working on them independently. Integrating such work at the very end is likelyto be difficult. Try to work on related aspects – like splitting the API between the two of you, orworking on different aspects of the user interface. Then integrate work at regular intervals so youcan look at each other’s code from time to time. It will help you understand your partner’s thinking,help spot problems, and help you pick up good habits and tricks from each other.Make use of existing resources where available – but make sure that there are no licensing issuesand that you credit external sources. A very useful resource for graphics is openclipart.org.FinallyDon’t forget to enjoy yourselves and use the opportunity to experiment and learn! If you have anyquestions or problems please let me know (mailto:ruth.letham@st-andrews.ac.uk) — don’tsuffer in silence!page 5 of 5本团队核心人员组成主要包括硅谷工程师、BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp
网友评论