最后一个求助贴~没有好人就闪了
首先来到这个论坛是为了完成一个宠物算档器的winform软件,本人不是贪婪的求完整代码,这款软件完成了也是共享给小伙伴了完全不是一款商业软件。但是到了论坛发了几贴求助帖感觉太冷淡了,(不过还是感谢给我第一帖红字的那个大神我想没红字也没那么容易得到代码吧),虽然有大神给了一大串的代码不过我也不能确认是否正确,来了这么多天渐渐的感到貌似你们这些真正的程序员过分看重代码的保密性了,既然这样又何必要搞个论坛呢?一点分享开源的胸怀都没有又怎么达到一定的高度仅仅到个人能开发出像国外微软之类的成果吗。搞了半天全都是自己去看书,自己解决,我又何必来论坛?真正把编程当职业的当然去看书去了还来论坛问不知道等多久才有回答这么不效率?况且回答还不一定呢,好多水贴大家都懂。我不是职业编程所以来论坛来网上寻求帮助,码了这么多字最后希望有好人能解决一下,代码DEBUG已经没有报错不过点了Takkun并没有得到结果。这是最后一个求助帖,解决不了也就算了完全靠自己就靠自己吧using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string str1 = textBox1.Text;
string str2 = textBox2.Text;
string str3 = textBox3.Text;
string str4 = textBox4.Text;
string str5 = textBox5.Text;
string str6 = textBox6.Text;
string str7 = textBox7.Text;
string str8 = textBox8.Text;
string str9 = textBox9.Text;
string str10 = textBox10.Text;
string str11 = textBox11.Text;
string str12 = textBox12.Text;
string str13 = textBox13.Text;
string str14 = textBox14.Text;
string str15 = textBox15.Text;
string str16 = textBox16.Text;
string str17 = textBox17.Text;
string str18 = textBox18.Text;
int ZD,VIT, STR, DEX, AGL, MAG, HP, MP, ATK, DEF, INT, MND, ACT, RCV, HIT, AVD, LUC, TEC;
double ZXX ;
double.TryParse(str1, out ZXX);
int.TryParse(str2, out VIT);
int.TryParse(str3, out STR);
int.TryParse(str4, out DEX);
int.TryParse(str5, out AGL);
int.TryParse(str6, out MAG);
int.TryParse(str7, out HP);
int.TryParse(str8, out MP);
int.TryParse(str9, out ATK);
int.TryParse(str10, out DEF);
int.TryParse(str11, out INT);
int.TryParse(str12, out MND);
int.TryParse(str13, out ACT);
int.TryParse(str14, out RCV);
int.TryParse(str15, out HIT);
int.TryParse(str16, out AVD);
int.TryParse(str17, out LUC);
int.TryParse(str18, out TEC);
double rVIT, rSTR, rDEX, rAGL, rMAG, rHP, rMP, rATK, rDEF, rINT, rMND, rACT, rRCV, rHIT, rAVD, rLUC, rTEC;
for (rVIT = VIT - 0.4; rVIT <= VIT + 0.4; rVIT += 0.2)
{
for (rSTR = STR - 0.4; rSTR <= STR + 0.4; rSTR += 0.2)
{
for (rDEX = DEX - 0.4; rDEX <= DEX + 0.4; rDEX += 0.2)
{
for (rAGL = AGL - 0.4; rAGL <= AGL + 0.4; rAGL += 0.2)
{
for (rMAG = MAG - 0.4; rMAG <= MAG + 0.4; rMAG += 0.2)
{
rAVD = rDEX * 2 + rAGL * 2;
rMND = rVIT * 1 + rSTR * 0.5 + rMAG * 2.5;
rLUC = rDEX * 2 + rAGL * 1.4 + rMAG * 0.6;
rACT = rSTR * 0.4 + rDEX * 1.6 + rAGL * 0.6;
rATK = rVIT * 1 + rSTR * 2.4 + rDEX * 0.2 + rAGL * 0.4;
rDEF = rVIT * 1.8 + rSTR * 1.2 + rDEX * 0.2 + rAGL * 0.8;
rHIT = rSTR * 1.4 + rDEX * 1.5 + rAGL * 0.6 + rMAG * 0.5;
rRCV = rVIT * 2.3 + rSTR * 1.2 + rAGL * 0.2 + rMAG * 0.3;
rHP = rVIT * 9.3 + rSTR * 3 + rDEX * 0.6 + rAGL * 0.6 + rMAG * 1.5;
rMP = rVIT * 9 + rSTR * 1.5 + rDEX * 3 + rAGL * 0.6 + rMAG * 9;
rINT = rVIT * 0.2 + rSTR * 1.2 + rDEX * 0.4 + rAGL * 0.2 + rMAG * 2;
rTEC = rVIT * 0.3 + rSTR * 0.2 + rDEX * 0.9 + rAGL * 2 + rMAG * 0.6;
ZD = (int)(ZXX * 2 + 2 - rVIT - rSTR - rDEX - rAGL - rMAG)*5;
if (AVD == (int)rAVD &&
MND == (int)rMND &&
LUC == (int)rLUC &&
ACT == (int)rACT &&
ATK == (int)rATK &&
DEF == (int)rDEF &&
HIT == (int)rHIT &&
RCV == (int)rRCV &&
HP == (int)rHP &&
MP == (int)rMP &&
INT == (int)rINT &&
TEC == (int)rTEC)
{ textBox19.Text = Convert.ToString(ZD); }
}
}
}
}
}
}
}
}
算出来应该是2
[ 本帖最后由 espressocis 于 2014-1-19 16:49 编辑 ]