• 作业发布
  • 作业布置
  • 全部

Lab_4

`Crown 2021-10-10 02:32:07
The Link Your Class https://bbs.csdn.net/forums/MUEE308FZ?category=0
The Link of Requirement of This Assignmenthttps://bbs.csdn.net/topics/601188617
MU STU ID and FZU STU ID19103779and831902101
Teammate's MU STU ID and FZU STU ID19103611 and 831902129
Teammate's blog linkhttps://bbs.csdn.net/topics/601429349
The Aim of This AssignmentDevelop a BoBing software
Video demo linkhttps://b23.tv/gYOuro

1. PSP Form

Personal Software Process Stages

Estimated Time/minutes

Completed Time/minutes

Planning

60

60

Estimate

30

30

Development

-

-

Analysis

45

60

Design Spec

120

150

Design Review

30

45

Coding Standard

-

-

Design

600

2000

Coding

-

-

Code Review Planning

-

-

Test

30

120

Reporting

-

-

Test Report

-

-

Size Measurement

10

10

Postmortem&Process Improvement

30

30

total

9552515

GitHub Link:https://github.com/Pacey11/Bobing-game

Video demo link:https://b23.tv/gYOuro

 

Foreward
Here we will present a presentation of our experiments, including video presentations, game demos, pros and cons, and lessons learned.These can be seen as follows.

Task description

In this experimental task, we need to create a Bobing game that allows multiple people to participate, and automatically judging the results. It produces random results by rolling six dice.

Preparation

We are going to use VSCode to complete this task.Visual Studio Code is a lightweight Code editor from Microsoft. It is free, open source and powerful. It supports syntax highlighting, intelligent code completion, custom hotkeys, parenthesis matching, code snippets, code comparison Diff, GIT and other features of almost all major programming languages, and supports plug-in extensions, and has been optimized for web development and cloud application development.We plan to use JavaScript and vue to do the experiment.

Key code Presentation


 
  1. function bobing(){

  2. let arr = [];

  3. for(var i=0;i<6;i++){

  4. let num = Math.ceil(Math.random()*6)

  5. arr.push(num)

  6. }

  7. console.log(arr)

  8. let dsArr = [0, 0, 0, 0, 0, 0];

  9. arr.forEach(item => {

  10. dsArr[item - 1]++

  11. });

  12. if (dsArr[3] === 4 && dsArr[0] === 2) {

  13. console.log('状元插金花')

  14. return false;

  15. }

  16. // 4个4 状元

  17. if (dsArr[3] >= 4) {

  18. console.log('状元')

  19. return false;

  20. }

  21. // 3个4 三红

  22. if (dsArr[3] === 3) {

  23. console.log('三红')

  24. return false;

  25. }

  26. // 对堂123456

  27. if (dsArr[0] === 1 && dsArr[1] === 1 && dsArr[2] === 1 && dsArr[3] === 1 && dsArr[4] === 1 && dsArr[5] === 1) {

  28. console.log('对堂')

  29. return false;

  30. }

  31. // 2举

  32. if (dsArr[3] === 2) {

  33. console.log('2举')

  34. return false;

  35. }

  36. // 1秀

  37. if (dsArr[3] === 1) {

  38. console.log('1秀')

  39. return false;

  40. }

  41. // 五个相同及以上 状元

  42. if (dsArr.some(item => { return item > 4 })) {

  43. console.log('状元')

  44. return false;

  45. }

  46. // 4进

  47. if (dsArr.some(item => { return item === 4 })) {

  48. console.log('4进')

  49. return false;

  50. }

  51. // 没有奖励

  52. if (dsArr[3] === 0) {

  53. console.log('没有奖励')

  54. return false;

  55. }

  56. }

The code is written in JavaScript with my own notes.This is the key code for the design of the game, which makes the random result of dice roll work properly and meet the design requirements.


 
  1. "list": [{

  2. "pagePath": "pages/My/zhuye/zhuye",

  3. "iconPath": "static/主页/zhuye.png",

  4. "selectedIconPath": "static/主页/zhuye_1.png",

  5. "text": "主页"

  6. },

  7. {

  8. "pagePath": "pages/My/rules/rules",

  9. "iconPath": "static/组件/1.png",

  10. "selectedIconPath": "static/组件/2.png",

  11. "text": "规则"

  12. }, {

  13. "pagePath": "pages/My/start/start",

  14. "iconPath": "static/组件/3.png",

  15. "selectedIconPath": "static/组件/4.png",

  16. "text": "开始"

  17. }

  18. ]

The above code makes each page of our game realize the function of skipping pages. Click the button at the bottom of the home page to switch to a different interface, similar to the shopping APP Taobao. APP is more convenient to use, there is no need to use redundant return keys.

Presentation of the game

In general, I think the page of our small game is simple and beautiful, and meets the requirements. The following is the display of the game:

1.First, we go to the home page

2.Next, we need to look at the rules of the pie

3.Finally, let's start our blogging game

 

Bright spot

The advantages of our software are:

1. The design page is simple and clear at a glance, which will not cause trouble to players who have not played.

2.If you are careful, you may notice that we have specially designed a significant distinction between the selected and unselected icon. In this way, when we need to expand other functions in the future, it will be convenient for users to know which interface they are browsing.

3. The home page has the historical origin and beautiful meaning of Bopie, which can make players better understand Bopie and deepen their impression.

4. We have carefully considered the game must need background music, we joined the "bo cake together" MP3 files (web page can't hear the sound), because thought he was learning package, you then can do an executable file, can let the user experience personally, but encountered a little problem, too late to realize functions.

 

Some difficulties

The difficulty with this experiment is that:

1. We need to learn to use new tools and new programming languages for new development and creation. I even spent countless hours studying on my own

2. Making home page jumps and rolling dice with random results were both fairly complicated and confusing, but we finally solved them.

3. Image insertion is the most difficult problem. First of all, what we input for image insertion should be the relative position with vUE file, which takes a lot of time to learn by ourselves. Secondly, when setting the background image, the size of the background image selected is different from that of the selected mobile device, so it needs to be adjusted in the later stage. The final position adjustment code also takes a lot of time.

4. Because we didn't open source (we don't like to plagiarize other people's code), we couldn't do the middle animation of dice rolling as we just finished self-learning.

5. The unsolved problem is the implementation of network functions, which we cannot solve at present, so online games are not available for the time being. Hopefully, subsequent research will help us solve this problem.

Summary

This experiment taught us new things and taught us new tools and programming languages to solve problems. This lays the groundwork to help us have some strategies for dealing with these problems in the future. But what we have accumulated so far is far from enough, and we need to do more.I feel like we're taking another big step toward being a programmer, hahaha.

Thanks for watching!

...全文
48 点赞 收藏 回复
写回复
回复
切换为时间正序
请发表友善的回复…
发表回复

还没有回复,快来抢沙发~

相关推荐
发帖
福州大学-软件工程EE308-2021秋
创建于2021-09-10

185

社区成员

福州大学 梅努斯国际工程学院 软件工程 教学
帖子事件
编辑了帖子
2021-10-10 03:09
编辑了帖子
2021-10-10 02:36
编辑了帖子
2021-10-10 02:34
创建了帖子
2021-10-10 02:32
编辑了帖子
2021-10-10 02:32
社区公告
暂无公告