Difference between revisions of "Assessment 2008 Easy"

From Progzoo
Jump to: navigation, search
(Naughts and Crosses)
Line 66: Line 66:
 
</answer>
 
</answer>
 
</question>
 
</question>
 +
 +
 +
==Go==
 +
<question className='Raster' imgOut='flag.png' copyFile='go.png' width='160' height='160'>
 
[[Image:go.png|frame|Go]]
 
[[Image:go.png|frame|Go]]
 +
*There are 19 lines across and 19 down
 +
*The separation is 8
 +
*The background is 160x160
 +
<prog>
 +
static void drawFlag(Graphics2D g){
 +
}
 +
</prog>
 +
<answer>
 +
static void drawFlag(Graphics2D g){
 +
  BufferedImage img= new BufferedImage(QwidthQ,QheightQ,
 +
      BufferedImage.TYPE_INT_ARGB);
 +
  try{
 +
    img = (BufferedImage)ImageIO.read(new File("go.png"));
 +
    g.drawImage(img,0,0,null);
 +
  }catch(Exception e){}
 +
}
 +
</answer>
 +
</question>
 +
 +
 +
 +
==Go==
 +
<question className='Raster' imgOut='flag.png' copyFile='solitaire.png' width='144' height='144'>
 
[[Image:solitaire.png|frame|Solitaire]]
 
[[Image:solitaire.png|frame|Solitaire]]
 +
*Each circle has radius 6
 +
*The circles are 16 apart
 +
*The background is 144x144
 +
<prog>
 +
static void drawFlag(Graphics2D g){
 +
}
 +
</prog>
 +
<answer>
 +
static void drawFlag(Graphics2D g){
 +
  BufferedImage img= new BufferedImage(QwidthQ,QheightQ,
 +
      BufferedImage.TYPE_INT_ARGB);
 +
  try{
 +
    img = (BufferedImage)ImageIO.read(new File("solitaire.png"));
 +
    g.drawImage(img,0,0,null);
 +
  }catch(Exception e){}
 +
}
 +
</answer>
 +
</question>
 +
 +
 +
 +
 +
==Go==
 +
<question className='Raster' imgOut='flag.png' copyFile='solitaire.png' width='144' height='144'>
 
[[Image:connect4.png|frame|Connect 4]]
 
[[Image:connect4.png|frame|Connect 4]]
 +
*Each circle has radius 12
 +
*The circles are 32 apart
 +
*The background is 288x256
 +
<prog>
 +
static void drawFlag(Graphics2D g){
 +
}
 +
</prog>
 +
<answer>
 +
static void drawFlag(Graphics2D g){
 +
  BufferedImage img= new BufferedImage(QwidthQ,QheightQ,
 +
      BufferedImage.TYPE_INT_ARGB);
 +
  try{
 +
    img = (BufferedImage)ImageIO.read(new File("solitaire.png"));
 +
    g.drawImage(img,0,0,null);
 +
  }catch(Exception e){}
 +
}
 +
</answer>
 +
</question>

Revision as of 01:33, 12 October 2008

Naughts and Crosses

Naughts and Crosses
  • The lines use rounded end-caps (see Drawing_Lines)
  • The lines have thickness 10
  • Each line is 150
  • The background is 200x200


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

Chess

Simple Chess Board
  • The background is 160x160


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


Go

Go
  • There are 19 lines across and 19 down
  • The separation is 8
  • The background is 160x160


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


Go

Solitaire
  • Each circle has radius 6
  • The circles are 16 apart
  • The background is 144x144


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



Go

Connect 4
  • Each circle has radius 12
  • The circles are 32 apart
  • The background is 288x256


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