[-]
[+]
|
Deleted |
_service:tar_git:harbour-sailgo.changes
|
@@ -1,20 +0,0 @@
-* Fri Oct 29 2021 Mark Washeim <blueprint@poetaster.de> - 0.2
-- [DEV] : Add Abstract controller stub.
-- [DEV] : Add a data model for the board.
-- [DEV] : Avoid forbidden recurrent moves
-- [DEV] : begin moveAnalysis file and algo
-- [DEV] : few improvements in controller
-- [DEV] : Implement basic controller and improve data model.
-- [DEV] : Improve controller.
-- [DEV] : Initial commit.
-- [DEV] : Initial port to Sailfish OS.
-- [DEV] : Make board clickable (no action yet).
-- [DEV] : Prisonners algo
-- [FIX] Group on left side are now ok
-- [FIX] : Hover is disabled by default for all platform. We enable it for desktop.
-- [UI] : Add hover effect.
-- [UI] : High resolution SVG rendering.
-- [UI] : Improve wasted space in svg images for pieces. Restore default board.
-- [UI] : Intelligent board resize.
-- [UI][SAILFISHOS] : Simple board zooming.
-
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -1,8 +1,8 @@
<services>
<service name="tar_git">
<param name="url">https://github.com/poetaster/SailGo.git</param>
- <param name="branch">master</param>
- <param name="revision">0.3</param>
+ <param name="branch">main</param>
+ <param name="revision">0.4.0</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/README.md
^
|
@@ -2,3 +2,7 @@
A Go game for Sailfish
This is a two, human, player version of the game. This fork aims to eventually add an AI. Ouch.
+
+The original is at:
+https://github.com/LouJo/SailGo/
+This is not a fork because issues were off and I could not turn them on in the fork.
|
|
Added |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/Screenshot_1.png
^
|
|
Added |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/cover.png
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/harbour-sailgo.desktop
^
|
@@ -4,7 +4,7 @@
Icon=harbour-sailgo
Exec=harbour-sailgo
Name=SailGo
-# translation example:
-# your app name in German locale (de)
-Name[de]=harbour-sailgo
+[X-Sailjail]
+OrganizationName=de.poetaster
+ApplicationName=harbour-moremahjong
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/harbour-sailgo.pro
^
|
@@ -23,16 +23,15 @@
OTHER_FILES += qml/harbour-sailgo.qml \
rpm/harbour-sailgo.changes.in \
rpm/harbour-sailgo.spec \
- rpm/harbour-sailgo.yaml \
translations/*.ts \
harbour-sailgo.desktop \
harbour-sailgo.png \
# to disable building translations every time, comment out the
# following CONFIG line
-#CONFIG += sailfishapp_i18n
+CONFIG += sailfishapp_i18n
-#TRANSLATIONS += translations/harbour-sailgo-de.ts
+TRANSLATIONS += translations/harbour-sailgo-de.ts
HEADERS += \
src/common/abstractboardcontroller.h \
|
[-]
[+]
|
Added |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/harbour-sailgo.pro.user
^
|
@@ -0,0 +1,1117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 4.15.2, 2022-01-05T18:58:43. -->
+<qtcreator>
+ <data>
+ <variable>EnvironmentId</variable>
+ <value type="QByteArray">{3ceef8b1-654e-453b-a12e-c7b75ae67ba1}</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.ActiveTarget</variable>
+ <value type="int">2</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.EditorSettings</variable>
+ <valuemap type="QVariantMap">
+ <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
+ <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
+ <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
+ <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
+ <value type="QString" key="language">Cpp</value>
+ <valuemap type="QVariantMap" key="value">
+ <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
+ </valuemap>
+ </valuemap>
+ <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
+ <value type="QString" key="language">QmlJS</value>
+ <valuemap type="QVariantMap" key="value">
+ <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
+ </valuemap>
+ </valuemap>
+ <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
+ <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
+ <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
+ <value type="int" key="EditorConfiguration.IndentSize">4</value>
+ <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
+ <value type="int" key="EditorConfiguration.MarginColumn">80</value>
+ <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
+ <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
+ <value type="int" key="EditorConfiguration.PaddingMode">1</value>
+ <value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
+ <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+ <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
+ <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
+ <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
+ <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
+ <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
+ <value type="int" key="EditorConfiguration.TabSize">8</value>
+ <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
+ <value type="bool" key="EditorConfiguration.UseIndenter">false</value>
+ <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
+ <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
+ <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
+ <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
+ <value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
+ <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+ <value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.PluginSettings</variable>
+ <valuemap type="QVariantMap">
+ <valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
+ <value type="bool" key="AutoTest.Framework.Boost">true</value>
+ <value type="bool" key="AutoTest.Framework.CTest">false</value>
+ <value type="bool" key="AutoTest.Framework.Catch">true</value>
+ <value type="bool" key="AutoTest.Framework.GTest">true</value>
+ <value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
+ <value type="bool" key="AutoTest.Framework.QtTest">true</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
+ <value type="int" key="AutoTest.RunAfterBuild">0</value>
+ <value type="bool" key="AutoTest.UseGlobal">true</value>
+ <valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
+ <value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
+ <value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.BuildSystem</value>
+ <valuemap type="QVariantMap" key="ClangTools">
+ <value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
+ <value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
+ <value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
+ <value type="int" key="ClangTools.ParallelJobs">2</value>
+ <valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
+ <valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
+ <valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
+ <value type="bool" key="ClangTools.UseGlobalSettings">true</value>
+ </valuemap>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.0</variable>
+ <valuemap type="QVariantMap">
+ <value type="QString" key="DeviceType">Mer.Device.Type</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">SailfishOS-3.4.0.24-armv7hl (in Sailfish SDK Build Engine)</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">SailfishOS-3.4.0.24-armv7hl (in Sailfish SDK Build Engine)</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">SailfishOS-3.4.0.24-armv7hl.default</value>
+ <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
+ <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">1</value>
+ <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
+ <value type="int" key="EnableQmlDebugging">0</value>
+ <value type="bool" key="MerBuildConfiguration.SignPackages">false</value>
+ <value type="QString" key="MerBuildConfiguration.SigningPassphraseFile"></value>
+ <value type="QString" key="MerBuildConfiguration.SigningUser">mark washeim <blueprint@poetaster.de> [1E9C8B72D3BFF67F6B2C729CDCCDDCEE92836931]</value>
+ <value type="QString" key="MerSfdkConfigurationAspect.Options"></value>
+ <value type="QString" key="MerSpecFileAspect.Path"></value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/mwa/src/sailfish/build-harbour-sailgo-SailfishOS_3_4_0_24_armv7hl_default-Debug</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/mwa/src/sailfish/build-harbour-sailgo-SailfishOS_3_4_0_24_armv7hl_default-Debug</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+ <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+ <value type="QString" key="MerClearBuildEnvironmentStep.Arguments">reset</value>
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerClearBuildEnvironmentStep</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+ <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+ <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
+ <value type="int" key="RunSystemFunction">1</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
+ <value type="bool" key="MerBuildConfiguration.SignPackages">false</value>
+ <value type="QString" key="MerBuildConfiguration.SigningPassphraseFile"></value>
+ <value type="QString" key="MerBuildConfiguration.SigningUser">mark washeim <blueprint@poetaster.de> [1E9C8B72D3BFF67F6B2C729CDCCDDCEE92836931]</value>
+ <value type="QString" key="MerSfdkConfigurationAspect.Options"></value>
+ <value type="QString" key="MerSpecFileAspect.Path"></value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/mwa/src/sailfish/build-harbour-sailgo-SailfishOS_3_4_0_24_armv7hl_default-Release</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/mwa/src/sailfish/build-harbour-sailgo-SailfishOS_3_4_0_24_armv7hl_default-Release</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+ <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+ <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+ <value type="QString" key="MerClearBuildEnvironmentStep.Arguments">reset</value>
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerClearBuildEnvironmentStep</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+ <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/qml/elements/GoBoard.qml
^
|
@@ -2,10 +2,21 @@
Item {
id: board
- property int boardSize: 13
+ property bool debug: false
+ property int boardSize: 13
property bool hoverEnabled: false
+ function getMarkers(index){
+ var markers = [42,48,84,120,126]
+ if ( markers.indexOf(index) !== -1) {
+ if (debug) console.debug('index: ' + index);
+ return "black"
+ } else {
+ return "empty"
+ }
+ }
+
Grid {
anchors.centerIn: parent
anchors.fill: parent
@@ -17,6 +28,7 @@
Repeater {
model : boardListModel
+ property string curentMarker: "empty"
MouseArea {
id: area
@@ -36,14 +48,35 @@
anchors.fill: parent
state: squareState
+ onStateChanged: {
+ if (debug) console.debug('squareState: ' + pieceState);
+ if (debug) console.debug('index: ' + model.index);
+ }
+ GoPiece {
+ x: parent.width/3 + 2
+ y: parent.width/3 + 2
+ id: marker
+ width:parent.width / 4
+ height:parent.width / 4
+ state: getMarkers(model.index)
+ /*onStateChanged: {
+ var markers = [42,48,133,139]
+ if ( markers.indexOf(model.index) !== -1) {
+ if (debug) console.debug('index: ' + model.index);
+ currentMarker = "black"
+ } else {
+
+ }
+
+ }*/
+
+ }
GoPiece {
id: hoverPiece
-
anchors.fill: parent
- state: area.containsMouse ? boardController.nextPlayer : "empty"
-
opacity: 0.5
+ state: area.containsMouse ? boardController.nextPlayer : "empty"
}
@@ -51,8 +84,12 @@
anchors.centerIn: parent
width: parent.width
height: width
-
state: pieceState
+ onStateChanged: {
+ if (debug) console.debug('pieceState: ' + pieceState);
+ if (debug) console.debug('index: ' + model.index);
+ }
+
}
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/qml/sailfishos/pages/About.qml
^
|
@@ -27,19 +27,22 @@
text: ""
}
Label {
+ width: parent.width
+ horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter
linkColor: "#ffffff"
text: "<a href=\"https://github.com/LouJo/SailGo\">LouJo</a> \n" +
"\n ©2015 Louis-Joseph Fournier \n"
color: Theme.primaryColor
wrapMode: TextEdit.WordWrap
- width: parent.width
onLinkActivated: {
Qt.openUrlExternally(link)
}
}
Label {
width: parent.width - (2 * Theme.paddingLarge)
+ horizontalAlignment: Text.AlignHCenter
+ anchors.horizontalCenter: parent.horizontalCenter
wrapMode: Text.WrapWord
text: " ©2021 Mark Washeim \n\n" + qsTr("GPLv2 license.")
color: Theme.primaryColor
@@ -50,11 +53,12 @@
text: ""
}
Label {
+ width: parent.width
+ horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.primaryColor
linkColor: "#ffffff"
wrapMode: TextEdit.WordWrap
- width: parent.width
//font.pixelSize: units.fx("small")
text: "<a href=\"https://github.com/poetaster/harbour-sailgo\">Source: github</a>"
onLinkActivated: {
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/qml/sailfishos/pages/FirstPage.qml
^
|
@@ -35,11 +35,12 @@
Page {
id: page
+ property var model: boardListModel
+
SilicaFlickable {
id: flickable
anchors.fill: parent
-
PullDownMenu {
MenuItem {
text: qsTr("About")
@@ -49,6 +50,9 @@
}
MenuItem {
text: qsTr("New game")
+ onClicked: {
+ boardController.resetBoard();
+ }
}
}
@@ -61,6 +65,7 @@
title: qsTr("SailGo")
}
+
PinchArea {
z:10
id: pinchArea
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/src/common/abstractboardcontroller.cpp
^
|
@@ -5,7 +5,7 @@
{
this->model_ = model;
this->nextPlayer_ = BlackPlayer;
- this->analysis = new MoveAnalysis(model);
+ this->analysis = new MoveAnalysis(model);
}
AbstractBoardController::~AbstractBoardController()
@@ -24,6 +24,16 @@
switchPlayer();
}
+void AbstractBoardController::resetBoard()
+{
+ qDebug("Reset");
+ int n = 0;
+ while (n < 169 ) {
+ this->model_->setPiece(n, model_->NoPiece);
+ n++;
+ }
+}
+
void AbstractBoardController::playMove(int line, int column)
{
playMove(model_->gridToLinearIndex(line, column));
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/src/common/abstractboardcontroller.h
^
|
@@ -19,6 +19,7 @@
Q_INVOKABLE void playMove(int linearIndex);
Q_INVOKABLE void playMove(int line, int column);
+ Q_INVOKABLE void resetBoard();
QString nextPlayer();
player_t nextPlayerIndex();
@@ -38,7 +39,7 @@
};
player_t nextPlayer_;
BoardModel * model_;
- MoveAnalysis *analysis;
+ MoveAnalysis *analysis;
};
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/src/common/boardmodel.h
^
|
@@ -30,11 +30,11 @@
BlackPiece
};
- inline piece_t operator[] (int i) { return p_pieces[i]; }
+ inline piece_t operator[] (int i) { return p_pieces[i]; }
int rowCount(const QModelIndex & parent = QModelIndex()) const;
int columnCount(const QModelIndex & parent = QModelIndex()) const;
- unsigned int nslotsCount() const;
+ unsigned int nslotsCount() const;
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
QHash<int, QByteArray> roleNames() const;
@@ -46,14 +46,15 @@
void setPiece(int row, int column, PieceState state);
void setPiece(int linearIndex, PieceState state);
- void setPieceTmp(int linearIndex, piece_t state);
- void prisoner(int linearIndex);
+ void setPieceTmp(int linearIndex, piece_t state);
+ void prisoner(int linearIndex);
- void setForbiddenPlay(int linearIndex);
+ void setForbiddenPlay(int linearIndex);
bool isForbidden(int linearIndex);
bool isEmpty(int row, int column);
bool isEmpty(int linearIndex);
+
signals:
public slots:
@@ -61,9 +62,9 @@
private:
int nrows_;
int ncolumns_;
- int nslots;
+ int nslots;
piece_t * p_pieces;
- int forbidden; // to avoid recursive play
+ int forbidden; // to avoid recursive play
};
#endif // BOARDMODEL_H
|
[-]
[+]
|
Added |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/translations/harbour-sailgo-de.ts
^
|
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1">
+<context>
+ <name>About</name>
+ <message>
+ <location filename="../qml/sailfishos/pages/About.qml" line="22"/>
+ <source>SailGo</source>
+ <translation>SailGo</translation>
+ </message>
+ <message>
+ <location filename="../qml/sailfishos/pages/About.qml" line="44"/>
+ <source>GPLv2 license.</source>
+ <translation>GPLv2 Lizens</translation>
+ </message>
+</context>
+<context>
+ <name>CoverPage</name>
+ <message>
+ <location filename="../qml/sailfishos/cover/CoverPage.qml" line="44"/>
+ <source>SailGo</source>
+ <translation>SailGo</translation>
+ </message>
+</context>
+<context>
+ <name>FirstPage</name>
+ <message>
+ <location filename="../qml/sailfishos/pages/FirstPage.qml" line="46"/>
+ <source>About</source>
+ <translation>Über SailGo</translation>
+ </message>
+ <message>
+ <location filename="../qml/sailfishos/pages/FirstPage.qml" line="52"/>
+ <source>New game</source>
+ <translation>Neues Spiel</translation>
+ </message>
+ <message>
+ <location filename="../qml/sailfishos/pages/FirstPage.qml" line="65"/>
+ <source>SailGo</source>
+ <translation>SailGo</translation>
+ </message>
+</context>
+</TS>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailgo-0.4.0.tar.bz2/translations/harbour-sailgo.ts
^
|
@@ -2,9 +2,20 @@
<!DOCTYPE TS>
<TS version="2.1">
<context>
+ <name>About</name>
+ <message>
+ <source>SailGo</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>GPLv2 license.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>CoverPage</name>
<message>
- <source>My Cover</source>
+ <source>SailGo</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -18,11 +29,8 @@
<source>SailGo</source>
<translation type="unfinished"></translation>
</message>
-</context>
-<context>
- <name>main</name>
<message>
- <source>Hello World</source>
+ <source>About</source>
<translation type="unfinished"></translation>
</message>
</context>
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-sailgo.yaml
^
|
@@ -1,48 +0,0 @@
-Name: harbour-sailgo
-Summary: A Go game for Sailfish
-Version: 0.3
-Release: 1
-# The contents of the Group field should be one of the groups listed here:
-# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS
-Group: Qt/Qt
-URL: https://github.com/poetaster/SailGo
-License: GPLv2
-# This must be generated before uploading a package to a remote build service.
-# Usually this line does not need to be modified.
-Sources:
-- '%{name}-%{version}.tar.bz2'
-Description: |
- A Go game for SailfishOS
-Configure: none
-# The qtc5 builder inserts macros to allow QtCreator to have fine
-# control over qmake/make execution
-Builder: qtc5
-
-# This section specifies build dependencies that are resolved using pkgconfig.
-# This is the preferred way of specifying build dependencies for your package.
-PkgConfigBR:
- - sailfishapp >= 1.0.2
- - Qt5Core
- - Qt5Qml
- - Qt5Quick
-
-# Build dependencies without a pkgconfig setup can be listed here
-# PkgBR:
-# - package-needed-to-build
-
-# Runtime dependencies which are not automatically detected
-
-Requires:
- - sailfishsilica-qt5 >= 0.10.9
-
-# All installed files
-
-Files:
- - '%{_bindir}'
- - '%{_datadir}/%{name}'
- - '%{_datadir}/applications/%{name}.desktop'
- - '%{_datadir}/icons/hicolor/*/apps/%{name}.png'
-
-# For more information about yaml and what's supported in Sailfish OS
-# build system, please see https://wiki.merproject.org/wiki/Spectacle
-
|