Unbeatable Tic Tac Toe – Rule Based Algorithms

May 19, 2015

Continuing my work with Java, recently, I developed an unbeatable Tic Tac Toe game in Java.

Tic Tac Toe Tie Game

Tic Tac Toe Tie Game

While you can find many such programs online, I think that I’m the only person to create the kinds of algorithms I have.

Coming from a database background, I implemented a number of database like structures in memory. An array list of remaining cells. A Decision Table. And a lookup table for intersections of runs.

Here’s how I did it.

——-

Many Event Handlers:

Read the rest of this entry »


Java error: non-static method cannot be referenced from a static context

April 16, 2015

Recently, while writing a java program, I got the classic Java error:
non-static method cannot be referenced from a static context.

No doubt, other young java practitioners have had this error.

Here, I’ve laid out a simple program, with explanations, so that you can avoid the problem. Voila: Read the rest of this entry »


%d bloggers like this: