hi

i have an n*n page (n is a power of 2) with an empty place in it, and i want to fill in this sqaure with right trominos (a tromino has an 'L' shape)

i want to show the empty spaces with zeros and the ones filled with trominos with ones.
everytime a tromino is placed in the sqaure page, the page must be displayed on teh monitor with the 0s and 1s.

I am really stuck on this.....i'd be very happy for any help
many thanks in advance

send me a copy of your work and i'll try to polish it

i've got the algorithm but haven't got started on the c++ program yet..i desperately need help with the cpp code plz

input: n,a power of 2(the board size); and the location L of the missing square
OUtput: A tiling of a deficient n*n board

procedure tile(n,L)

if n=2 then
begin
//the board is a right tromino T
tile with T
return
end

divide the board into four (n/2)*(n/2) boards
rotate the board so that the missing square is in tthe upper left quadrant
place one right tromino in the centre
//consider each of the squares covered by the centre tromino as
//missing and donate the missing squares as m1,m2,m3,m4

call tile (n/2,m1)
call tile(n/2,m2)
call tile(n/2,m3)
call tile(n/2,m4)

end tile

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.