EE308 LAB2-2

lsqlsq123000 2022-11-11 23:53:37
The Link Your Classhttps://bbs.csdn.net/forums/MUEE308FZU202201
The Link of Requirement of This Assignmenthttps://bbs.csdn.net/topics/608859318
MU STU ID and FZU STU ID20122772_832001311
Teammate's MU STU ID and FZU STU ID20124503_832001306
Teammate's blog linkhttps://bbs.csdn.net/topics/609240670
GitHub linkhttps://github.com/li123sq/lab2-2
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


 

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 first responsible for the product design of our team by using AXURE PR9, while my teammates were learning VS software while I was doing product design. After finishing the product design, I joined in the study of VS. Then the two of us wrote the code together to complete the project. I was responsible for writing the interaction between buttons and Windows, and my teammates were responsible for the random number generation and determination of dice.In the process of completing tasks, our team members would keep proper communication with each other, discuss with them when faced with difficulties, and let each other know the progress of their tasks at any time. When the task is completed to a certain extent, we will merge the corresponding parts of the code for code detection, so as to complete the task more efficiently. This is the experience of our group.

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

In this experiment, I learned professional knowledge about VS and winform. I think this experiment is a new breakthrough for me and my teammates. I hope we can absorb the experience from this experiment and better apply it to the next experiment.

...全文
47 回复 打赏 收藏 举报
写回复
回复
切换为时间正序
请发表友善的回复…
发表回复
发帖
FZU-SE-EE308-2022秋

286

社区成员

福州大学 梅努斯国际工程学院 软件工程(2022秋) 教学
软件工程 高校
社区管理员
  • LinQF39
加入社区
帖子事件
编辑了帖子 (查看)
2022-11-17 00:47
编辑了帖子 (查看)
2022-11-17 00:24
编辑了帖子 (查看)
2022-11-17 00:07
编辑了帖子 (查看)
2022-11-12 00:03
编辑了帖子 (查看)
2022-11-11 23:54
编辑了帖子 (查看)
2022-11-11 23:54
展开
社区公告
暂无公告