Chess Game Example

From WeizmannWiki
Revision as of 09:46, 28 February 2013 by Jayasree.Nair (Talk | contribs)

Jump to: navigation, search

This is a protected page for the Chess Game Example.


Chess Game Example

  The ChessGameExample is the chess game which can be played between two user, the black and white.The chess game is implemented with some of the rules and restictions of the original chess game.

Game Board

ChessScreenShot.png


Example 1 - LSC for the game



Name Description LSC
Square PieceClick When the user click any square Sq1, and then click any square Sq2, if the board next turn is equals to the Sq1 piece type then the square Sq1 check_Move square Sq2. 
LSC
Square MovePiece When the square Sq1 check_Move square Sq2, canmove is assigned whether the movement of piece from square Sq1 to Sq2 is possible,  if the piece canmove and Sq1 piecetype is not equals to Sq2 piecetype then the square Sq1 move_Piece to square Sq2.
LSC
Square RemovePiece When the square Sq1 move_Piece to square Sq2,  then the square Sq2 emptyPiece the square Sq2.
LSC
Square NextMove When the square Sq1 move_Piece to square Sq2, if the board next turn is "white" the board next turn changes to "black" otherwise if the board next turn is "black" the board next turn changes to "white".
LSC
Square SetSource When the user click any square Sq1, if the Issource is "empty" then the square Sq1's possible positions are set and the IsSource changes to "set".  
LSC
Square ShowMessage When the user click any square Sq1, if the square IsSource is "empty" and the board next turn not equals the Sq1 piecetype then the square showmessage and the Issource is set to "empty".
LSC
Square ShowMessageReset When the user click any square Sq1, if the square IsSource is "empty" and the board next turn not equals the Sq1 piecetype then the square showmessage and the Issource is set to "empty".
LSC
Square ResetPossiblePosition When the user click any square Sq1, the square Sq1 setPossiblePosition and the user click any other square Sq2 then the Sq2 resetPossiblePosition of the Sq1.
LSC


Graph and Connections

Example of a not working LSC


Name LSC Explanation
Square ResetHighlight LSC

when the square sq2 is highlighed and the user click that square Sq2 then the square reset the highlight.                                              Since the Sq2 is dynamic and there are more highlighted squares it leads to the universal binding. The 


   

Example-2 LSCs with Natural Language     


Name Natural Language Text LSC
Square PieceClick When the user click any square Sq1, and then click any square Sq2, if the board next turn is equals to the Sq1 piece type then the square Sq1 check_Move square Sq2. 
LSC