Can someone help me build a chess game from the scratch using Java OOPS and Design patterns concepts.
A rough model is enough. Are there any links/blogs for this?
Can someone help me build a chess game from the scratch using Java OOPS and Design patterns concepts.
A rough model is enough. Are there any links/blogs for this?
First of all, this is a very broad question.
Second, Object Oriented approaches are somewhat slow, which will decrease the engines play strength.
That said, here is roughly what you need: - a piece class, or an enum, or something similar
a chessboard class, where you can place and move pieces
a move generator, this is a function that lists all legal moves of a chessboard
an evaluation function that "rates" chesspositions, wheter black or white has an advantage
a minimax function, (see google "minimax algorithm"), that returns the best move in a position
some kind of gui for the whole thing
For more info, see the chessprogramming wiki.
I would have a class for the games map, a class for a figure (and childclasses for tower, king aso.). Also probably a class for the player.