Code covered by the BSD License  

Highlights from
Boggle (V2.0)

image thumbnail

Boggle (V2.0)

by

 

08 Aug 2011 (Updated )

The traditional Boggle Master Game from Hasbro

makeGrid
function cube_letters = makeGrid
%Function to make a random grid
%SCd 12/01/2010
%

    %Boggle 5x5 cubes: Every 6 letters is a cube
    %Found here: http://en.wikipedia.org/wiki/Talk%3ABoggle
    cubes = ['AAAFRSAAEEEEAAFIRSADENNNAEEEEMAEEGMUAEGMNNAFIRSYBJKQXZCCNSTWCEIILTCEILPTCEIPSTDDLNORDHHLORDHHNOTDHLNOREIIITTEMOTTTENSSSUFIPRSYGORRVWHIPRRYNOOTUWOOOTTU'];
        
    %Assign the cubes to random places
    cube_lox = randperm(25).'-1;
    
    %Pick the letter index on the cube
    cube_idx = ceil(rand(25,1)*6);
    
    %Extract the letters and make them into the grid
    cube_letters = reshape(cubes(cube_lox*6+cube_idx),[5 5]);

end

Contact us