All pastes #217210 Raw Edit

Something

public text v1 · immutable
#217210 ·published 2006-10-23 14:43 UTC
rendered paste body
Chess Game :

This is just pseudo-code
************************
Board x;
Stack temp1, temp2;

temp = x.generate();

Board y = temp1.pop();

temp2=y.generate();

************************

generate: returns a Stack with all possible moves from a considered Board. So a Stack with Boards !!

Question: Should it be created an abstract class Movement and from that class its extended by some pieces classes like Pawn, King, Queen, etc ! How this class should be connected to Board class in order to achive the pseudo-code. Did you know any other good solution, in order to achieve the pretension of the pseudo-code ??