Java implementation of noughts and crosses.