-
Notifications
You must be signed in to change notification settings - Fork 3
YourOwnProject
独立开发的project
(平台,功能,技术和种类的数据结构规定分别在对应的文件中,目前它们只有属性,目前还没有方法)
所属开发平台
所选的功能,可能会有多种功能
所使用的技术,可能会使用多种技术
最后预算
在第几天发布
最终定价
影响力,仅仅和project自身属性有关,初始为0
长度为6的数组,分别表示 低级未发现bug数,低级已发现bug数,中级未发现bug数,中级已发现bug数,高级未发现bug数,高级已发现bug数
目前bug有三种严重程度
return false
对于独立开发项目,永远都不不会超过截止时间
设置自己的平台,并且预算增加,难度增加
-
this.platForm_=platform -
this.budget_+=platform.budget_ -
this.difficulty_ += this.platform_.difficulty_
取消自己所选的平台,撤去这个平台对project的属性的影响
-
this.budget_-=this.platform_.budget_ this.difficulty_ -= this.platform_.difficulty_this.platform_= null
设置自己的功能,并且附加这个功能对属性的影响
-
this.functions_包含func -
this.requireFuncion_+=func.function_ this.difficulty_ += func_.difficulty_
目前就是直接加,以后有了具体机制再说
撤销这个功能对自己属性的影响,并且把这个功能从功能列表中删去
- 从
this.function_中找到和func同名功能tempfunc -
this.requireFuncion_-=tempfunc.function_ this.difficulty_ -= tempfunc.difficulty_- 把
tempfunc从this.function_中除去
撤销自己的所有功能,撤销所有功能对自己属性的影响
-
遍历
this.function_,每个功能设为function-
this.budget_-=function.budget_ this.difficulty_ -= function.difficulty_
-
-
设置自己的
this.function_的长度为0
设置自己的技术,并且需要的预算增加,难度增加
-
this.techs包含tech -
this.budget_+=tech.budget_ -
this.difficulty_ += tech.difficulty_
撤销tech对自己属性的影响,并把它从this.techs_中除去
-
this.budget_-=tech.budget_ -
this.difficulty_-=tech.difficulty_ - 从
this.techs_中找到和tech的name_相同的元素 - 把这个元素从
this.techs_中除去
撤销自己的所有技术,撤销这些技术给自己的属性的影响
具体逻辑同上面的功能
boolean init(Platform platform, ProjectType[] types, Function[] funcs, string name, Technology[] techs)
根据玩家选择,设置相应的platform,type,function,name和technology
首先根据当前平台,技术的选择,计算最终的预算,记为budget_,设置好event属性,注意force=false,并分发"MONEYCUT",获得返回值
如果是false,说明操作失败,返回false结束
如果为true,说明支付成功,执行下面:
- 返回 true
this.publishDay_ = day
return this.publishDay_
根据Ve = F * F / 1000返回预期定价
this.price_ = price
t表示自软件发布以来经历的时间t
如果this.m_ == 0,表示是第一次更新,那么根据
m = sqrt(7E + 3P) *F *(t + sqrt(I))/t
Ve = F * F / 1000 , 其中Ve为预期定价
m' = Ve * m / V ,其中 V 为定价,即this.price_,Ve即getExpectPrice(),
计算,this.m_ = m'
如果this.m_ != 0,那么按照this.m_=f(p,t)*this.m_,进行更新
但是目前f(p,t)公式还没有明确。
returnthis.m_
即公式中的t,从发布开始到现在过了多少天
return nowday - this.publishDay_
按照 已发现:未发现 = 6:4 设置已发现bug和未发现bug数量,设置好this.bugnum_
通过生成随机数的方式确定数量,比例大约等于6:4
规定eBug = cc.Enum({ low : 0, mid : 1, high: 2, }); 按照level,让相应级别的未发现bug数减去num(注意最小数量为0),已发现bug数加上num
按照level,让相应级别的已发现bug数减去num(注意最小数量为0)
- 这两个表格主要作用跟考勤差不多
| 第一周贡献分 | 周一 | 周二 | 周三 | 周四 | 周五 | 周六 | 周日 |
|---|---|---|---|---|---|---|---|
| 蔡帜 | 1 | 1 | 1 | 1 | 1 | ||
| 王子铭 | 1 | 1 | 1 | 1 | |||
| 游心 | 1 | 1 | 1 | 1 | 1 | ||
| 解小锐 | 1 | 1 | 1 | 1 | 1 | 1 | |
| 李金奇 | 1 | 1 | |||||
| 杨森 | 1 | ||||||
| 陈鑫 | 1 | ||||||
| 王辰昱 | 1 | 1 | 1 | ||||
| 赵晓宇 | 1 |
| 第二周贡献分 | 周一 | 周二 | 周三 | 周四 | 周五 | 周六 | 周日 |
|---|---|---|---|---|---|---|---|
| 蔡帜 | 1 | 1 | 1 | ||||
| 王子铭 | 1 | 1 | 1 | 1 | |||
| 游心 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 解小锐 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 李金奇 | 1 | 1 | 1 | 1 | 1 | 1 | |
| 杨森 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 陈鑫 | 1 | 1 | 1 | 1 | 1 | 1 | |
| 王辰昱 | 1 | 1 | 1 | 1 | 1 | ||
| 赵晓宇 | 1 | 1 | 1 | 1 |
纪念刷夜小团队:
- 游心,解小锐,李金奇,王辰昱,杨森