Java implementation of chess