Difference between revisions of "Assessment 2008 Hard"

From Progzoo
Jump to: navigation, search
(Fanorona)
(Snakes and Ladders)
Line 92: Line 92:
 
}
 
}
 
</prog>
 
</prog>
<answer>
+
<answer><![CDATA[
 
static void drawFlag(Graphics2D g){
 
static void drawFlag(Graphics2D g){
   BufferedImage img= new BufferedImage(241,241,
+
   int d=24;
      BufferedImage.TYPE_INT_ARGB);
+
  g.setColor(Color.black);
   try{
+
   for (int i=0;i<10;i++){
     img = (BufferedImage)ImageIO.read(new File("snakes_and_ladders.png"));
+
     for (int j=0;j<10;j++){
    g.drawImage(img,0,0,null);
+
      g.drawRect(i*d,j*d,d,d);
   }catch(Exception e){}
+
      int k = 1+10*(9-j)+((j%2==1)?i:(9-i));
}  
+
      g.drawString(""+k,i*d,j*d+d);
</answer>
+
    }
 +
   }
 +
}
 +
]]></answer>
 
</question>
 
</question>
  

Revision as of 01:08, 10 November 2008

Fanorona

Fanorona
  • The separation is 20
  • The disks have radius 6
  • The background is 184x104
  • The blue is 64,64,255


[Font] [Default] [Show] [Resize] [History] [Profile]

Snakes and Ladders

Snakes and Ladders
  • The squares are 24
  • The background is 241x241


[Font] [Default] [Show] [Resize] [History] [Profile]

Ludo

Ludo
  • The background is 256x256
  • The gray is 228, 228, 228


[Font] [Default] [Show] [Resize] [History] [Profile]

Cards

Deck of Cards


[Font] [Default] [Show] [Resize] [History] [Profile]

Monopoly

This is a large image and takes too much memory on the the progzoo system. Please use Dr Java or similar.

  • The width of each property is 85
  • The background is 1040x1040
  • You should use strings in the array


Monopoly.png

[Font] [Default] [Show] [Resize] [History] [Profile]