The reason it doesn't work is because your class BoardState
is an inner, non-static, class inside of IntelligentTicTacToe
. This means that when referring to it, you'll be referring to an instance of the class; the instance isn't available from a static context.
One solution is to declare that class as:
public static class BoardState {
You can read more on inner classes here.