EE308 LAB2-2

Hepstos 2022-11-16 23:58:13
The Link Your Classhttps://bbs.csdn.net/forums/MUEE308FZU202201
The Link of Requirement of This Assignmenthttps://bbs.csdn.net/topics/609240670
MU STU ID and FZU STU ID20124503_832001306
Teammate's MU STU ID and FZU STU ID20122772_832001311
Teammate's blog linkhttps://bbs.csdn.net/topics/609129567
GitHub linkGithub
Video demo linkVideo

目录

1.PSP and learning progress bar

2.Key points of programming

3. Pair programming experience

4.Events that take a long time

5.Photo

6.Summary



1.PSP and learning progress bar

Personal Software Process StagesEstimated time (minutes)Real time (minutes)
Planning1020
Estimate--
Development300500
Analysis3040
Design Spec6090
Design Review3030
Coding Standard1010
Design4560
Coding600900
Code Review3060
Test6045
Reporting--
Test Report2015
Size Measurement1020
Postmortem & Process Improvement Plan2060
total12251850

Learning progress bar

weekAdded code (line)Cumulative code (lines)Study Time this week (hours)Cumulative learning time (hours)Important Growth
120020055The first week we learned vs and unity, but unity didn't work after many attempts and we were ready to change direction
2300500611The second week we used vs and learned about winform.

 

 

2.Key points of programming

1.The first key point we think is the random generation of dice roll and the determination of six random dice roll sets.

        private void timer1_Tick(object sender, EventArgs e)
        {
            for (int i=0; i < 7; i++)
                count[i] = 0;
            Random randomNumbers = new Random();
            a[1] = randomNumbers.Next(1, 7); count[a[1]]++;
            pictureBox1.Image = (Image)
                (Properties.Resources.ResourceManager.GetObject(string.Format("_{0}", a[1])));
            a[2] = randomNumbers.Next(1, 7); count[a[2]]++;
            pictureBox2.Image = (Image)
               (Properties.Resources.ResourceManager.GetObject(string.Format("_{0}", a[2])));
            a[3] = randomNumbers.Next(1, 7); count[a[3]]++;
            pictureBox3.Image = (Image)
              (Properties.Resources.ResourceManager.GetObject(string.Format("_{0}", a[3])));
            a[4] = randomNumbers.Next(1, 7); count[a[4]]++;
            pictureBox4.Image = (Image)
               (Properties.Resources.ResourceManager.GetObject(string.Format("_{0}", a[4])));
            a[5] = randomNumbers.Next(1, 7); count[a[5]]++;
            pictureBox5.Image = (Image)
               (Properties.Resources.ResourceManager.GetObject(string.Format("_{0}", a[5])));
            a[6] = randomNumbers.Next(1, 7); count[a[6]]++;
            pictureBox6.Image = (Image)
               (Properties.Resources.ResourceManager.GetObject(string.Format("_{0}", a[6])));
 
        }
        private void Play()
        {
             if (count[4] == 6)
                MessageBox.Show("恭喜你,满堂红!博饼积分+800。\n");
            else if (count[4] == 5)
                MessageBox.Show("恭喜你,五红!博饼积分+300。\n");
            else if (count[4] == 4)
            {
                if (count[1] == 2)
                    MessageBox.Show("恭喜你,状元插金花!博饼积分+1000。\n");
                else
                    MessageBox.Show("恭喜你,状元!博饼积分+500。\n");
            }
            else if (count[4] == 3)
                MessageBox.Show("恭喜你,三红!博饼积分+200。\n");
            else if (count[4] == 2)
            {
                if (count[1] == 4 || count[2] == 4 || count[3] == 4 || count[5] == 4 || count[6] == 4)
                    MessageBox.Show("恭喜你,四进!博饼积分+100。\n");
                else
                    MessageBox.Show("恭喜你,二举!博饼积分+50。\n");
            }
            else if (count[4] == 1)
            {
                if (count[1] == 4 || count[2] == 4 || count[3] == 4 || count[5] == 4 || count[6] == 4)
                    MessageBox.Show("恭喜你,四进!博饼积分+100。\n");
                else if (count[1] == 5 || count[2] == 5 || count[3] == 5 || count[5] == 5 || count[6] == 5)
                    MessageBox.Show("恭喜你,五子!博饼积分+100。\n");
                else if (count[1] == 1 && count[2] == 1 && count[3] == 1 && count[5] == 1 && count[6] == 1)
                    MessageBox.Show("恭喜你,对堂!博饼积分+300。\n");
                else
                    MessageBox.Show("恭喜你,一秀!博饼积分+10。\n");
            }
            else if (count[4] == 0)
            {
                if (count[1] == 6 || count[2] == 6 || count[3] == 6 || count[5] == 6 || count[6] == 6)
                    MessageBox.Show("人品爆发,可惜要接受惩罚...\n");
                else if (count[1] == 5 || count[2] == 5 || count[3] == 5 || count[5] == 5 || count[6] == 5)
                    MessageBox.Show("恭喜你,五子!博饼积分+500。\n");
                else if (count[1] == 4 || count[2] == 4 || count[3] == 4 || count[5] == 4 || count[6] == 4)
                    MessageBox.Show("恭喜你,四进!博饼积分+100。\n");
                else
                    MessageBox.Show("很遗憾,没有积分,下次继续努力!\n");

2.The second key point we consider is the interaction between the button and the window.

public Form1()
        {
            InitializeComponent();
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            GAME g = new GAME();
            g.ShowDialog();
        }
 
        private void button2_Click(object sender, EventArgs e)
        {
            RULE r = new RULE();
            r.ShowDialog();
        }
 
        private void button3_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
 
        private void button6_Click(object sender, EventArgs e)
        {
            GAME g = new GAME();
            g.ShowDialog();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
           // Cursor = new Cursor("1.cur");
        }
    }
}

3. Pair programming experience

In this project, I was mainly responsible for the implementation of the project, and my teammates also put considerable effort into the design of the project. At the beginning, I worked hard to learn all kinds of knowledge and learned how to make games and form programs. My teammates wrote the interactions between buttons and Windows, and I was responsible for generating random numbers and determining dice. In the process of completing the task, our team members will keep proper communication with each other, and will discuss with each other when encountering difficulties, so as to let each other know the progress of the task at any time. Finally, combined with the specific practical experience between the two people, I will try my best to complete the task.

4.Events that take a long time

1)At the beginning, our team planned to make a pie software apk by using VS and unity. At the beginning, we used loop statements and iterative functions in VS to generate six dice and random points on the dice. We could read the roll of one die, but we couldn't read the roll of six dice, and we couldn't fix the bug after many attempts, so we abandoned unity.

2)We learned about form building and various uses of the components in it, such as button interaction and background image Settings.

3)We understood the specific needs of the project, and then began to design the game interface. At first, we hoped to realize the animation of dice throwing through the dynamic graph, but later we thought it was not intuitive enough, so we used the change of the specific points of each dice to realize the display of the specific number.

4)It took us a lot of time to realize the coding of random numbers, and it was also time-consuming for the collection of random numbers to correspond to each award, as well as to display the output results in the form.

 

 

5.Photo

 

 

                                        

 

                                                  

 

6.Summary

After this project, I finally got a preliminary understanding of the implementation of software engineering, and found that I still had many shortcomings, just like I left many regrets in this project. For the code implementation and the use of tools, I often inquire about various knowledge. This experience also makes me more experienced and confident in the future project implementation. Finally, I hope that the next project can achieve better results.

 

 

...全文
480 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

285

社区成员

发帖
与我相关
我的任务
社区描述
福州大学 梅努斯国际工程学院 软件工程(2022秋) 教学
软件工程 高校
社区管理员
  • LinQF39
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧