I created some Class called Brain:
Now from another module I want to access the public data. Is this possible? I get a nullpointer exception if I try for example (from main module):
Do I HAVE to write getter/setter for all (trivial) data? This would be slightly disappointing, just now I was thinking this feature is so great.
(please don't lecture me about OO principles, I am aware)
Thanks for any help!
Bas
B4X:
Sub Class_Globals
Type TMove(MType As Int,FRow As Int, FCol As Int , TRow As Int, TCol As Int)
Public WhiteToMove As Int
Public BMove As TMove
Public Square(9,9), HFence(9,9), VFence(9,9) As Int
Public WRow, WCol, BRow,BCol As Int
Public GameMoves As List
Public FenceCount(2)
Private Processed(9,9) As Int
Public Ply As Int
Public Nodes As Int
End Sub
Now from another module I want to access the public data. Is this possible? I get a nullpointer exception if I try for example (from main module):
B4X:
If QBrain.Ply == 0 then...
Do I HAVE to write getter/setter for all (trivial) data? This would be slightly disappointing, just now I was thinking this feature is so great.
(please don't lecture me about OO principles, I am aware)
Thanks for any help!
Bas