Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Commit 15e08d6

Browse files
committed
Heavy renaming and 0-check fix
1 parent 81cc34b commit 15e08d6

20 files changed

Lines changed: 52 additions & 878 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.user

BinaryFun.pro.user

Lines changed: 0 additions & 799 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Desktop Entry]
22
Type=Application
33
X-Nemo-Application-Type=silica-qt5
4-
Icon=BinaryFun
5-
Exec=BinaryFun
4+
Icon=harbour-binaryfun
5+
Exec=harbour-binaryfun
66
Name=Binary Fun
77
# translation example:
88
# your app name in German locale (de)

BinaryFun.pro renamed to harbour-binaryfun.pro

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@
1010
# - translation filenames have to be changed
1111

1212
# The name of your application
13-
TARGET = BinaryFun
13+
TARGET = harbour-binaryfun
1414

1515
CONFIG += sailfishapp
1616

17-
SOURCES += src/BinaryFun.cpp
17+
SOURCES += src/harbour-binaryfun.cpp
1818

19-
DISTFILES += qml/BinaryFun.qml \
19+
DISTFILES += qml/harbour-binaryfun.qml \
2020
qml/Bit.qml \
2121
qml/cover/CoverPage.qml \
2222
qml/pages/Game.qml \
2323
qml/pages/Menu.qml \
24-
rpm/BinaryFun.changes.in \
25-
rpm/BinaryFun.changes.run.in \
26-
rpm/BinaryFun.spec \
27-
rpm/BinaryFun.yaml \
24+
rpm/harbour-binaryfun.changes.in \
25+
rpm/harbour-binaryfun.changes.run.in \
26+
rpm/harbour-binaryfun.spec \
27+
rpm/harbour-binaryfun.yaml \
2828
translations/*.ts \
29-
BinaryFun.desktop \
29+
harbour-binaryfun.desktop \
3030
qml/pages/LeaderBoard.qml
3131

3232
SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172
@@ -39,4 +39,4 @@ CONFIG += sailfishapp_i18n
3939
# planning to localize your app, remember to comment out the
4040
# following TRANSLATIONS line. And also do not forget to
4141
# modify the localized app name in the the .desktop file.
42-
TRANSLATIONS += translations/BinaryFun-de.ts
42+
TRANSLATIONS += translations/harbour-binaryfun-de.ts

qml/Bit.qml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ Loader {
3737
var indices = root.matrix.slice(0, bits);
3838
var transformed = [];
3939
indices.forEach(function(elem) {
40-
transformed.unshift((pad((parseInt(elem) >>> 0).toString(2), bits))[grid.row - 1]);
40+
transformed.push((pad((parseInt(elem) >>> 0).toString(2), bits))[grid.row - 1]);
4141
});
4242

4343
var transformed_num = parseInt(transformed.join(""), 2);
4444
this.text = transformed_num;
4545
root.matrix[index] = transformed_num;
46+
if (transformed_num === 0) { // A rather dumb fix.
47+
root.check(index - 1);
48+
root.check(index - 1);
49+
}
4650
} else if (index !== bits){
4751
var num = Math.floor(Math.random() * (Math.pow(2, bits) - 1)) + 1;
4852
this.text = num;

0 commit comments

Comments
 (0)