Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
添加Mk-47
Browse files Browse the repository at this point in the history
  • Loading branch information
xxzl0130 committed Nov 26, 2022
1 parent 3294f3f commit c0c2e2f
Show file tree
Hide file tree
Showing 9 changed files with 339 additions and 208 deletions.
8 changes: 8 additions & 0 deletions ChipSolver/ChipSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ ChipSolver::ChipSolver(QObject* parent):
squadConfig.maxValue.defbreakValue = maxValues["def_break"].toInt();
squadConfig.maxValue.hitValue = maxValues["hit"].toInt();
squadConfig.maxValue.reloadValue = maxValues["reload"].toInt();
if (maxBlocks.contains("free"))
{
squadConfig.maxValue.squad = maxBlocks["free"].toInt();
}
else
{
squadConfig.maxValue.squad = 0;
}
squadConfig.color = obj["color"].toInt();
squadConfig.palindrome = obj["palindrome"].toInt();

Expand Down
2 changes: 2 additions & 0 deletions ChipSolver/ChipSolver.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@
<file>Resources/PP-93-2-result.json</file>
<file>Resources/PP-93-4-result.json</file>
<file>Resources/PP-93-result.json</file>
<file>Resources/Mk-47.json</file>
<file>Resources/Mk-47-result.json</file>
</qresource>
</RCC>
1 change: 1 addition & 0 deletions ChipSolver/Resources/Mk-47-result.json

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions ChipSolver/Resources/Mk-47.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "Mk-47",
"optional": {
"Mk-47" : 0
},
"width": 8,
"height": 8,
"blocks": 38,
"chips":[5061,5051],
"map": [
"11100111",
"11100111",
"11000011",
"10000001",
"00000000",
"00000000",
"01100110",
"11000011"
],
"color": 2,
"palindrome": 0,
"MaxBlocks": {
"damage": 10,
"def_break": 5,
"hit": 7,
"reload": 14,
"free": 2
},
"MaxValues": {
"damage": 120,
"def_break": 142,
"hit": 131,
"reload": 209
}
}
3 changes: 2 additions & 1 deletion ChipSolver/Resources/PP-93.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"damage": 16,
"def_break": 2,
"hit": 6,
"reload": 7
"reload": 7,
"free": 2
},
"MaxValues": {
"damage": 169,
Expand Down
3 changes: 3 additions & 0 deletions ChipSolver/Resources/squads.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@
"填满": "PP-93-result.json",
"最多空2格": "PP-93-2-result.json",
"最多空4格": "PP-93-4-result.json"
},
"Mk-47": {
"Mk-47": "Mk-47-result.json"
}
}
2 changes: 1 addition & 1 deletion CodeX/AboutDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

AboutDialog::AboutDialog(QWidget *parent)
: QDialog(parent),
version(2,4,3),
version(2,5,0),
ui(new Ui::AboutDialog()),
accessManager_(new QNetworkAccessManager(this))
{
Expand Down
2 changes: 1 addition & 1 deletion CodeX/SettingWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void SettingWindow::reset()
dynamic_cast<QSpinBox*>(this->ui->gridLayout->itemAtPosition(i + 1, 2)->widget())->setValue(value.defbreakBlock);
dynamic_cast<QSpinBox*>(this->ui->gridLayout->itemAtPosition(i + 1, 3)->widget())->setValue(value.hitBlock);
dynamic_cast<QSpinBox*>(this->ui->gridLayout->itemAtPosition(i + 1, 4)->widget())->setValue(value.reloadBlock);
dynamic_cast<QSpinBox*>(this->ui->gridLayout->itemAtPosition(i + 1, 5)->widget())->setValue(0);
dynamic_cast<QSpinBox*>(this->ui->gridLayout->itemAtPosition(i + 1, 5)->widget())->setValue(value.squad);
}
this->ui->numbersSpinBox->setValue(1000);
this->ui->maxSpinBox->setValue(10000);
Expand Down
Loading

0 comments on commit c0c2e2f

Please sign in to comment.