Exit Full View

Gidea / src / main / webapp / games / slidingblocks / boards / cow / data.js

board = new Board( 9,9,   30,30,   26,29 );
board.background = "background.png";

var piece1 = new Piece( "1", "piece1.png" );
piece1.addElement( 0, 0 );
piece1.addElement( 1, 0 );
piece1.addElement( 2, 0 );
piece1.addElement( 0, 1 );
piece1.addElement( 1, 1 );
piece1.addElement( 2, 1 );


var piece2 = new Piece( "2", "piece2.png" );
piece2.addElement( 0, 0 );
piece2.addElement( 1, 0 );
piece2.addElement( 2, 0 );
piece2.addElement( 0, 1 );
piece2.addElement( 1, 1 );
piece2.addElement( 2, 1 );
piece2.addElement( 0, 2 );
piece2.addElement( 1, 2 );
piece2.addElement( 2, 2 );

var piece3 = new Piece( "3", "piece3.png" );
piece3.addElement( 0, 0 );
piece3.addElement( 1, 0 );
piece3.addElement( 2, 0 );
piece3.addElement( 0, 1 );
piece3.addElement( 1, 1 );
piece3.addElement( 2, 1 );
piece3.addElement( 0, 2 );
piece3.addElement( 1, 2 );
piece3.addElement( 2, 2 );

var piece4 = new Piece( "4", "piece4.png" );
piece4.addElement( 0, 0 );
piece4.addElement( 1, 0 );
piece4.addElement( 2, 0 );
piece4.addElement( 0, 1 );
piece4.addElement( 1, 1 );
piece4.addElement( 2, 1 );


var piece5 = new Piece( "5", "piece5.png" );
piece5.addElement( 0, 0 );
piece5.addElement( 1, 0 );
piece5.addElement( 2, 0 );
piece5.addElement( 0, 1 );
piece5.addElement( 1, 1 );
piece5.addElement( 2, 1 );


var piece6 = new Piece( "6", "piece6.png" );
piece6.addElement( 0, 0 );
piece6.addElement( 1, 0 );
piece6.addElement( 2, 0 );
piece6.addElement( 3, 0 );
piece6.addElement( 4, 0 );
piece6.addElement( 5, 0 );
piece6.addElement( 0, 1 );
piece6.addElement( 1, 1 );
piece6.addElement( 2, 1 );
piece6.addElement( 3, 1 );
piece6.addElement( 4, 1 );
piece6.addElement( 5, 1 );


var piece7 = new Piece( "7", "piece7.png" );
piece7.addElement( 0, 0 );
piece7.addElement( 1, 0 );
piece7.addElement( 2, 0 );
piece7.addElement( 0, 1 );
piece7.addElement( 1, 1 );
piece7.addElement( 2, 1 );
piece7.addElement( 0, 2 );
piece7.addElement( 1, 2 );
piece7.addElement( 2, 2 );

var piece8 = new Piece( "8", "piece8.png" );
piece8.addElement( 0, 0 );
piece8.addElement( 1, 0 );
piece8.addElement( 2, 0 );
piece8.addElement( 0, 1 );
piece8.addElement( 1, 1 );
piece8.addElement( 2, 1 );
piece8.addElement( 0, 2 );
piece8.addElement( 1, 2 );
piece8.addElement( 2, 2 );


board.setFixed( 6, 0 );
board.setFixed( 7, 0 );
board.setFixed( 8, 0 );

board.addPiece( piece1, 0, 2 );
board.addPiece( piece4, 3, 2 );
board.addPiece( piece3, 6, 1 );
board.addPiece( piece5, 0, 4 );
board.addPiece( piece8, 3, 4 );
board.addPiece( piece2, 6, 4 );
board.addPiece( piece7, 0, 6 );
board.addPiece( piece6, 3, 7 );


solution = new Solution( board );

solution.addMove("id4", 0,0);
solution.addMove("id5", 0,2);
solution.addMove("id8", 3,0);
solution.addMove("id7", 3,3);
solution.addMove("id10", 0,4);
solution.addMove("id11", 0,7);
solution.addMove("id9", 6,6);
solution.addMove("id7", 6,4);
solution.addMove("id10", 3,4);
solution.addMove("id5", 0,5);
solution.addMove("id4", 0,3);
solution.addMove("id8", 0,0);
solution.addMove("id6", 3,0);
solution.addMove("id7", 6,1);
solution.addMove("id10", 6,3);
solution.addMove("id6", 3,4);
solution.addMove("id7", 3,0);
solution.addMove("id10", 6,1);
solution.addMove("id6", 3,2);
solution.addMove("id9", 6,4);
solution.addMove("id11", 3,7);
solution.addMove("id5", 0,7);
solution.addMove("id4", 0,5);
solution.addMove("id8", 0,2);
solution.addMove("id7", 0,0);
solution.addMove("id6", 3,0);
solution.addMove("id9", 3,4);
solution.addMove("id10", 6,4);
solution.addMove("id6", 6,1);
solution.addMove("id9", 3,0);
solution.addMove("id4", 3,3);
solution.addMove("id5", 0,5);
solution.addMove("id11", 0,7);
solution.addMove("id10", 6,6);
solution.addMove("id4", 6,4);
solution.addMove("id9", 3,4);
solution.addMove("id6", 3,0);
solution.addMove("id4", 6,1);
solution.addMove("id9", 6,3);
solution.addMove("id6", 3,4);
solution.addMove("id4", 3,0);
solution.addMove("id9", 6,1);
solution.addMove("id6", 3,2);
solution.addMove("id10", 6,4);
solution.addMove("id11", 3,7);
solution.addMove("id5", 0,7);
solution.addMove("id8", 0,4);
solution.addMove("id6", 3,4);
solution.addMove("id7", 3,2);
solution.addMove("id8", 0,0);
solution.addMove("id6", 0,4);
solution.addMove("id7", 3,5);
solution.addMove("id4", 3,3);
solution.addMove("id8", 3,0);
solution.addMove("id6", 0,0);
solution.addMove("id7", 0,5);
solution.addMove("id4", 0,3);
solution.addMove("id7", 3,5);
solution.addMove("id4", 3,3);
solution.addMove("id5", 0,5);
solution.addMove("id11", 0,7);
solution.addMove("id10", 6,6);
solution.addMove("id4", 0,3);
solution.addMove("id7", 6,4);
solution.addMove("id8", 3,4);
solution.addMove("id9", 3,0);
solution.addMove("id7", 6,1);
solution.addMove("id8", 6,3);
solution.addMove("id4", 3,3);
solution.addMove("id5", 3,5);
solution.addMove("id6", 0,4);
solution.addMove("id9", 0,0);
solution.addMove("id7", 3,0);
solution.addMove("id8", 6,1);
solution.addMove("id4", 3,2);
solution.addMove("id5", 6,4);
solution.addMove("id4", 3,5);
solution.addMove("id7", 3,3);
solution.addMove("id9", 3,0);
solution.addMove("id6", 0,0);
solution.addMove("id4", 0,3);
solution.addMove("id7", 0,5);
solution.addMove("id4", 3,5);
solution.addMove("id7", 3,3);
solution.addMove("id6", 0,4);
solution.addMove("id9", 0,0);
solution.addMove("id7", 3,0);
solution.addMove("id4", 3,2);
solution.addMove("id5", 3,5);
solution.addMove("id10", 6,4);
solution.addMove("id11", 3,7);
solution.addMove("id6", 0,6);
solution.addMove("id4", 0,4);
solution.addMove("id7", 3,3);
solution.addMove("id9", 3,0);
solution.addMove("id4", 0,0);
solution.addMove("id6", 0,2);
solution.addMove("id11", 0,7);
solution.addMove("id10", 6,6);
solution.addMove("id5", 0,5);
solution.addMove("id7", 6,4);
solution.addMove("id5", 3,5);
solution.addMove("id6", 0,4);
solution.addMove("id4", 0,2);
solution.addMove("id9", 3,2);