首页 > 代码库 > 第三组 小组作业

第三组 小组作业

计划

 

估计这个任务需要多少时间

200Min

开发

100Min

需求分析

5Min

生成设计文档

5Min

设计复审

5Min

代码规范

5Min

具体设计

10Min

具体编码

55Min

代码复审

15Min

测试

40Min

报告

16Min

测试报告

6Min

计算工作量

5Min

事后总结并提出改进计划

5Min

 

点击得分按钮界面会显示得分情况与没一局的比分;

技术分享技术分享

 

 

 

 

下面是程序代码:

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
int a = 1;
int b = 1;
int i = 1;
private void btnH_Click(object sender, EventArgs e)
{
int H = Convert.ToInt32(txtH.Text);
int L = Convert.ToInt32(txtL.Text);
int H1 = Convert.ToInt32(txtH1.Text);
int L1 = Convert.ToInt32(txtL1.Text);
txtH.Text = (a++).ToString();
if (H >= 24 && (H - L) >0)
{
txtH1.Text = (Convert.ToInt32(txtH1.Text) + 1).ToString();
txtCount.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text + "\r\n";
txtH.Text = "0";
txtL.Text = "0";
a = 1;
if (txtH1.Text == "3")
{
MessageBox.Show("红方胜利");
txtH.Text = "0";
txtH1.Text = "0";
txtL.Text = "0";
txtL1.Text = "0";
txtCount.Clear();
}
}
if (H1 + L1 > 3)
{
if (H >= 14 && (H - L) > 1)
{
txtH1.Text = (Convert.ToInt32(txtH.Text) + 1).ToString();

txtH.Text = "0";
txtL.Text = "0";
txtCount.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text + "\r\n";
a = 1;
if (txtH1.Text == "3")
{
MessageBox.Show("红方胜利");
txtH.Text = "0";
txtH1.Text = "0";
txtL.Text = "0";
txtL1.Text = "0";
txtCount.Clear();
i = 1;
}
}
}
}

private void btnL_Click(object sender, EventArgs e)
{

int H = Convert.ToInt32(txtH.Text);
int L = Convert.ToInt32(txtL.Text);
int H1 = Convert.ToInt32(txtH1.Text);
int L1 = Convert.ToInt32(txtL1.Text);
txtL.Text = (b++).ToString();
if (L>= 24&&(L-H )>0)
{
txtL1.Text = (Convert.ToInt32(txtL1.Text) + 1).ToString();
txtCount.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text + "\r\n";
txtH.Text = "0";
txtL.Text = "0";

b= 1;
if (txtL1.Text=="3")
{
MessageBox.Show("蓝方胜利");
txtH.Text = "0";
txtH1.Text = "0";
txtL.Text = "0";
txtL1.Text = "0";
txtCount.Clear();
}
}
if(H1+L1>3)
{
if (L >= 14 && (L - H) > 1)
{
txtL1.Text = (Convert.ToInt32(txtL.Text) + 1).ToString();
txtCount.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text + "\r\n";
txtH.Text = "0";
txtL.Text = "0";
b = 1;
if (txtL1.Text == "3")
{
MessageBox.Show("蓝方胜利");
txtH.Text = "0";
txtH1.Text = "0";
txtL.Text = "0";
txtL1.Text = "0";
txtCount.Clear();
i = 1;
}
}
}

}

 





}

 

第三组 小组作业