![]() Maybe you should consider using that IDE for Java? Or maybe there's plugins that help in VsCode that would help you. Returns such as this one: if (Math.abs(this.getY() - y) = 2 & Math.abs(this.getX() - x) = 1 || Math.abs(this.getY() - y) = 1 & Math.abs(this.getX() - x) = 2) return false Could be simplified to: return Math.abs(this.getY() - y) = 2 & Math.abs(this.getX() - x) = 1 || Math.abs(this.getY() - y) = 1 & Math.abs(this.getX() - x) = 2 Īlso: When I open this project in IntelliJ I get quite a lot of warnings and suggestions on how to improve the code. ![]() Maybe personal preference, but I think your "Piece" class should be its own file since it's used by a bunch of different classes the two main requirements for a decent chess engine are. You could probably benefit from having a bit more structure using different packages Do we need a graphical environment it is totally possible to code the game. You tend to do if(mate(color) = true) but you can just write if(mate(color)) Consider using the enhanced for-loop instead of the index one, it makes for easier reading(IMO). The source code is released under: Java Source Code Player import de. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |