I’m currently working on a project where I have a game board similar to a match-3 style game. I have 2 scripts right now: game.script and board.script.
game.script - handles all things related to gameplay and validating the players input and managing what to do with the data
board.script - essentially handles the gameboard itself and is essentially a data structure for it. game.script posts messages to the board.script to tell it what to do.
The problem I’m having is I’m trying to do something along the lines of determining whether a boardspot is a valid one for the player to do an action upon. I’m getting input in my game.script, but essentially I’m trying to do a IsValid(x, y) function onto the board.script and get the value back into the game.script.
What is the best method for this, or am I completely doing this the wrong way?