// define Piece#1 thePiece = new Piece(); thePiece->SetId(1); sp = new Space(black,0,0); // first Square should always be at 0,0 then others are relative to it sp->SetOccupied(); sp->SetBorder(0); sp->SetBorder(1); sp->SetBorder(2); thePiece->AddSquare(sp); sp = new Space(red,-1,0); sp->SetOccupied(); sp->SetBorder(0); sp->SetBorder(3); thePiece->AddSquare(sp); sp = new Space(black,-1,-1); sp->SetOccupied(); sp->SetBorder(1); sp->SetBorder(3); thePiece->AddSquare(sp); sp = new Space(red,-1,-2); sp->SetOccupied(); sp->SetBorder(1); sp->SetBorder(2); sp->SetBorder(3); thePiece->AddSquare(sp);
You can put it on the Board with this command:
TheBoard.InsertPiece(thePiece,3,3);
Then you can look at it in text format (my favorite) by doing this
TheBoard->Draw();which makes this output
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. . r b r b r b r b . .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. . b r b r b r b r . .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. . r b r b r b r b . .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. . b r b r b r b r . .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .=======..=======. . . . . . . . . . . . . . . . . . .. .| .. |. .. .. .. . r b | R B | r b r b . .. .| .. |. .. .. .. . . . . . . . . . . . . . .=======. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .| |. .. .. .. .. . b r | B | r b r b r . .. .| |. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .| |. .. .. .. .. . r b | R | b r b r b . .. .| |. .. .. .. .. . . . . . . . . . .=======. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. . b r b r b r b r . .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .(If you like, you can see all the Pieces in this format on this page.)
To make pictures using paw, use this command
TheBoard->DrawForPaw();which makes this output
title 'Piece 1' exec StartMovie vec/cre c(8,8) r _ -0.4 0.4 -0.4 0.4 -0.4 0.4 -0.4 0.4 _ 0.4 -0.4 1 -0.4 0.4 -0.4 0.4 -0.4 _ -0.4 0.4 -1 0.4 -0.4 0.4 -0.4 0.4 _ 0.4 -0.4 1 -1 0.4 -0.4 0.4 -0.4 _ -0.4 0.4 -0.4 0.4 -0.4 0.4 -0.4 0.4 _ 0.4 -0.4 0.4 -0.4 0.4 -0.4 0.4 -0.4 _ -0.4 0.4 -0.4 0.4 -0.4 0.4 -0.4 0.4 _ 0.4 -0.4 0.4 -0.4 0.4 -0.4 0.4 -0.4 hi/put/con 100 c lego 100 90 0 2 line 2.96 1.96 2.96 1.04 line 2.04 1.04 2.96 1.04 line 2.04 1.96 2.04 1.04 line 2.96 2.96 2.96 2.04 line 2.04 2.96 2.04 2.04 line 2.04 3.96 2.96 3.96 line 2.04 3.96 2.04 3.04 line 3.04 3.96 3.96 3.96 line 3.96 3.96 3.96 3.04 line 3.04 3.04 3.96 3.04 pic/print Piece1.gifwhich you can cut and paste into paw to get this picture
(You will need to have StartMovie.kumac if you really want to do this.)
|
|
|
|
|
|
|
|
|
|
|
|