I've written two logical algorithms for tictactoe. One is if the computer is going first, and the other is for if the user player is going first. The way I formed them (not dealing with a computer yet) was in a basic "do this, then base next move on what they do" basis. I'm wondering how I can get that to translate into a function that accepts a boardstate and acts upon at any state. It's not a translation I can make directly, do you know what I mean? Any suggestions would be helpful. I don't want to use another algorithm.