十五周个人作业
用户故事:
作为一个观众,我希望了解某一场比赛的比分,以便了解赛况。(满意条件:精确到每一局的结果比分)。
估计时间(min) | 实际时间(min) | |
计划 | 30 | 40 |
估计完成需要的时间 | 300 | 200 |
开发 | 180 | 200 |
需求分析 | 30 | 30 |
生成设计文档 | 20 | 20 |
设计复审 | 30 | 30 |
代码规范 | 20 | 20 |
具体设计 | 40 | 40 |
具体编码 | 230 | 200 |
代码复审 | 50 | 20 |
测试 | 40 | 40 |
报告 | 50 | 40 |
测试报告 | 20 | 10 |
计算工作量 | 10 | 10 |
事总结后 | 20 | 20 |
if (game.PartNum < 4)//前四局的加分计算和判断。
{
if (game.ScoreA >= 24 && game.ScoreB >= 24)//当两队24分平的情况。
{
if (Math.Abs(game.ScoreA - game.ScoreB) == 2)
{
if (game.ScoreA > game.ScoreB)
{
game.PsA += 1;
PsA.Text = game.PsA.ToString();
game.ScoreA = 0;
ScoreA.Text = game.ScoreA.ToString();
game.ScoreB = 0;
ScoreB.Text = game.ScoreB.ToString();
}
else
{
game.PsB += 1;
PsB.Text = game.PsB.ToString();
game.ScoreA = 0;
ScoreA.Text = game.ScoreA.ToString();
game.ScoreB = 0;
ScoreB.Text = game.ScoreB.ToString();
}
}
}
else if(game.ScoreA<24||game.ScoreB<24) //当两队没有达到24分平的时候。
{
if (game.ScoreA == 25)
{
game.PsA += 1;
PsA.Text = game.PsA.ToString();
game.ScoreA = 0;
ScoreA.Text = game.ScoreA.ToString();
game.ScoreB = 0;
ScoreB.Text = game.ScoreB.ToString();
}
else if (game.ScoreB == 25)
{
game.PsB += 1;
PsB.Text = game.PsB.ToString();
game.ScoreA = 0;
ScoreA.Text = game.ScoreA.ToString();
game.ScoreB = 0;
ScoreB.Text = game.ScoreB.ToString();
}
}
}
else if (game.PartNum == 4)//第五局的加分计算和判断。
{
if (game.ScoreA >= 14 && game.ScoreB >= 14)//当两队24分平的情况。
{
if (Math.Abs(game.ScoreA - game.ScoreB) == 2)
{
if (game.ScoreA > game.ScoreB)
{
game.PsA += 1;
PsA.Text = game.PsA.ToString();
}
else
{
game.PsB += 1;
PsB.Text = game.PsB.ToString();
}
}
}
else if (game.ScoreA < 14 || game.ScoreB < 14) //当两队没有达到24分平的时候。
{
if (game.ScoreA == 15)
{
game.PsA += 1;
PsA.Text = game.PsA.ToString();
}
else if (game.ScoreB == 15)
{
game.PsB += 1;
PsB.Text = game.PsB.ToString();
}
}
}
else
{
Response.Write("<script>alert('比赛已结束');</script>");
}