Unsure how to structure by Android application
<p>I'm a newbie to Android development, and am currently developing a game that consists of a grid with images.
So my main Game activity loads a GridView, which in turn is populated by a custom BaseAdapter I've extended. The idea is that when the user clicks an image that the grid is redrawn, then the AI makes a move and the grid is redrawn again etc.
So in my BaseAdapter, when I create an ImageView I'm setting a custom OnClickListener that performs some calculations and then invokes BaseAdapter.notifyDataSetChanged() to update the GridView after.</p>

<p>However, I'm unsure now as to where I should locate the logic for the AI's "move", and how can this be invoked? Instead of having a custom OnClickListener class, should my main Game activity instead implement OnClickListener?</p>

<p>Thanks</p>
