Type=StaticCode
Version=4.3
ModulesStructureVersion=1
B4A=true
@EndOfDesignText@
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals

End Sub

#Region Setting

Sub loadDefaultSetting(sGameNumber As String)
If File.Exists(File.DirInternal,"settingGame" & sGameNumber & ".app") = False Then
 Dim m1 As Map
 m1.Initialize
 m1.Put("stage","1")
 m1.put("timeout","29")
 m1.Put("showsecond","3000")
 File.WriteMap(File.DirInternal,"settingGame" & sGameNumber & ".app",m1)
End If
End Sub

Sub saveData(sFilename As String,sKey As String,sValue As String)
Dim m1 As Map
m1.Initialize
If File.Exists(File.DirInternal,sFilename) = True Then
 m1 = File.ReadMap(File.DirInternal,sFilename)
End If
m1.Put(sKey,sValue)
File.WriteMap(File.DirInternal,sFilename,m1)
End Sub

Sub getData(sFilename As String,sKey As String) As String
Dim m1 As Map
m1.Initialize
If File.Exists(File.DirInternal,sFilename) = True Then
  m1 = File.ReadMap(File.DirInternal,sFilename)
Else
  Return ""
End If
If m1.ContainsKey(sKey) = True Then
 Return m1.get(sKey)
Else
 Return ""
End If
End Sub

Sub RemoveData(sFilename As String,sKey As String) As String
Dim m1 As Map
m1.Initialize
If File.Exists(File.DirInternal,sFilename) = True Then
  m1 = File.ReadMap(File.DirInternal,sFilename)
Else
  Return ""
End If
If m1.ContainsKey(sKey) = True Then
 m1.Remove(sKey)
 File.WriteMap(File.DirInternal,sFilename,m1)
Else
 Return ""
End If
Return ""
End Sub

#End Region
