第二次结对编程作业
1.博客及仓库地址
本人仓库地址
2.具体分工
黄益颂:java写AI
汪倍民:网页前端html,与服务器的交互
3.PSP表格
Planning |
计划 |
60 |
90 |
Estimate |
估计这个任务需要多少时间 |
10 |
10 |
Development |
开发 |
600 |
850 |
Analysis |
需求分析 (包括学习新技术) |
120 |
150 |
Design Spec |
生成设计文档 |
20 |
30 |
Design Review |
设计复审 |
30 |
45 |
Coding Standard |
代码规范(为开发制定合适的规范) |
15 |
25 |
Design |
具体设计 |
100 |
110 |
Coding |
具体编码 |
150 |
175 |
Code Review |
代码复审 |
30 |
30 |
Test |
测试(自我测试,修改代码,提交修改) |
150 |
200 |
Reporting |
报告 |
40 |
60 |
Test Repor |
测试报告 |
10 |
10 |
Size Measurement |
计算工作量 |
20 |
25 |
Postmortem & Process Improvement Plan |
事后总结, 并提出过程改进计划 |
20 |
30 |
Total |
总计 |
1375 |
1840 |
4.解题思路描述和设计实现说明
1.网络接口的使用
type: "POST",
dataType: "json",
url: "http://api.revth.com/auth/register2",
data: JSON.stringify(reg_data), //提交的数据
contentType: "application/json;charset-UTF-8",
success: function (result) { //todo
console.log(result); //打印服务端返回的数据(调试用)
if (result.status == 0) {
// alert("注册成功");
$('<div>').appendTo('body').addClass('alert alert-success').html('注册成功').show().delay(1500).fadeOut();
window.location.href = './index.html'
};
},
error: function () {
alert("注册失败")
}
type: "POST",
dataType: "json",
url: "http://api.revth.com/auth/login",
data: JSON.stringify(login_data), //提交的数据
contentType: "application/json;charset-UTF-8",
success: function (result) {
if (result.status == 0) {
alert("登录成功");
window.location.href = './menu.html'
};
},
type: "POST",
url: "http://api.revth.com/game/open",//请求url
contentType: "application/json;charset=UTF-8",
cacheontrol: "no-cache, no-store, max-age=0, must-revalidate",
success: (data) => {
document.getElementsByTagName("title")[0].innerText = '游戏中...等待出牌';
localStorage.setItem('id', data.data.id);
localStorage.setItem('card', data.data.card);
window.location.href = "./game.html";
type: "GET",
url: "http://api.revth.com/rank",
contentType: "application/json;charset-UTF-8"
url: "http://api.revth.com/history/" + Math.floor(20000 * Math.random()),
contentType: "application/json;charset-UTF-8",

5.关键代码解释
6.性能分析与改进
7.单元测试
8.贴出github的代码迁入记录

9.遇到的代码异常或结对困难及解决方法
ajax发post和get |
好多种 |
是 |
github的使用:徽章?开源协议?持续集成?分支? |
找了一堆网站看了看,一个人开分支意义不大 |
否 |
10.评价你的队友
阿颂一直在打代码,太强了
学习进度条
3 |
1000 |
2500 |
20 |
25 |
学了一下web,头疼 |