Difference between revisions of "Assessment 2008 Easy"

From Progzoo
Jump to: navigation, search
(Connect 4)
Line 25: Line 25:
 
}
 
}
 
</shell>
 
</shell>
==Noughts and Crosses==
 
<question className='Raster' imgOut='flag.png' copyFile='noughts_and_crosses.png' width='200' height='200'>
 
[[Image:noughts_and_crosses.png|frame|Noughts and Crosses]]
 
*The lines use rounded end-caps (see [[Drawing_Lines]])
 
*The lines have thickness 10
 
*Each line is 150
 
*The background is 200x200
 
<prog>
 
static void drawFlag(Graphics2D g){
 
}
 
</prog>
 
<answer>
 
static int l = 150;
 
static int d = 25;
 
 
static void drawFlag(Graphics2D g){
 
  g.setStroke(
 
  new BasicStroke(10,
 
        BasicStroke.CAP_ROUND,
 
        BasicStroke.JOIN_MITER));
 
  g.setColor(Color.black);
 
  g.drawLine(d+l/3,d,d+l/3,d+l);
 
  g.drawLine(d+2*l/3,d,d+2*l/3,d+l);
 
  g.drawLine(d,d+l/3,d+l,d+l/3);
 
  g.drawLine(d,d+2*l/3,d+l,d+2*l/3);
 
}
 
</answer>
 
</question>
 
 
 
==Chess==
 
==Chess==
 
<question className='Raster' imgOut='flag.png' copyFile='chess.png' width='160' height='160'>
 
<question className='Raster' imgOut='flag.png' copyFile='chess.png' width='160' height='160'>
Line 94: Line 65:
 
}
 
}
 
]]></answer>
 
]]></answer>
 +
</question>
 +
 +
==Noughts and Crosses==
 +
<question className='Raster' imgOut='flag.png' copyFile='noughts_and_crosses.png' width='200' height='200'>
 +
[[Image:noughts_and_crosses.png|frame|Noughts and Crosses]]
 +
*The lines use rounded end-caps (see [[Drawing_Lines]])
 +
*The lines have thickness 10
 +
*Each line is 150
 +
*The background is 200x200
 +
<prog>
 +
static void drawFlag(Graphics2D g){
 +
}
 +
</prog>
 +
<answer>
 +
static int l = 150;
 +
static int d = 25;
 +
 +
static void drawFlag(Graphics2D g){
 +
  g.setStroke(
 +
  new BasicStroke(10,
 +
        BasicStroke.CAP_ROUND,
 +
        BasicStroke.JOIN_MITER));
 +
  g.setColor(Color.black);
 +
  g.drawLine(d+l/3,d,d+l/3,d+l);
 +
  g.drawLine(d+2*l/3,d,d+2*l/3,d+l);
 +
  g.drawLine(d,d+l/3,d+l,d+l/3);
 +
  g.drawLine(d,d+2*l/3,d+l,d+2*l/3);
 +
}
 +
</answer>
 
</question>
 
</question>
  

Revision as of 17:56, 5 March 2009

Chess

Simple Chess Board
  • The background is 160x160


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

Go

Go
  • The board color is 220,179,92
  • There are 19 lines across and 19 down
  • The separation is 8
  • The background is 160x160


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

Noughts and Crosses

Noughts 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]

Solitaire

Solitaire
  • Each circle has radius 6
  • The circles are 16 apart
  • The background is 150x150
  • The big disk has radius 72
  • The green in 39,155,102


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

Connect 4

Connect 4
  • Each circle has radius 8
  • The circles are 20 apart
  • The background is 148x128
  • The color is 160,146,100


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