Update the Matching Game - applications/matching/MatchingGame.ring - Better Format!
@@ -137,19 +137,19 @@ oApp = New QApp {
buttonExit = new QPushButton(win) {
setFont(new qFont("Verdana",C_FONTSIZE,50,0))
settext("Exit")
- setClickEvent("pQuit()")
+ setClickEvent("CloseGame()")
}
ButtonCear = new qPushButton(win) {
setFont(new qFont("Verdana",C_FONTSIZE,50,0))
settext("Clear")
- setClickEvent("pClear()")
+ setClickEvent("Clear()")
}
ButtonSolve = new qPushButton(win) {
setFont(new qFont("Verdana",C_FONTSIZE,50,0))
settext("Solve")
- setClickEvent("pSolve()")
+ setClickEvent("Solve()")
}
LayoutButtonRow1.AddWidget(labelSort)
@@ -221,10 +221,10 @@ func newGame
Button4[x].setstylesheet("background-color: ;")
next
-func pQuit
+func closeGame
win.close()
-func RandomList aInput
+func randomList aInput
aOutput = []
while len(aInput) > 1
nIndex = random(len(aInput)-1)
@@ -242,8 +242,6 @@ func countryClick nr1
Button3[numCountry].settext(country)
userCountry + country
Button1[nr1].setenabled(false)
- else
- return
ok
func capitalClick nr2
@@ -253,8 +251,6 @@ func capitalClick nr2
Button4[numCapital].settext(capital)
userCapital + capital
Button2[nr2].setenabled(false)
- else
- return
ok
func checkSort
@@ -282,7 +278,7 @@ func checkSort
next
ok
-func pClear
+func clear
numCountry = 0
numCapital = 0
for n = 1 to limit
@@ -294,7 +290,7 @@ func pClear
Button4[n].setstylesheet("background-color:;")
next
-func pSolve
+func solve
for n = 1 to limit
temp1 = Button1[n].text()
Button3[n].settext(temp1)
