JavaApp goes to the UK

After the trip to Bletchley Park last friday, a student asked me if I could show him how to write computer programs (I think he mainly thought about ‚computer games‘). Today he and his friend had a closer look with me at the JavaApp framework.

In two hours I gave them a brief introduction (and got them clubbered about the head with information) to programming. They decided to write a version of criss-cross (?, don’t know if it’s correct, it’s Tic Tac Toe in Germany) and this is the result of their doing:

class cross extends JavaApp
{
    int player=1;
    public static void main(String[] args)
    {
        new cross();
    }

    void whenProgramStarts()
    {
        drawLine(0, -320, -50, 320, -50);
        drawLine(0, -320, 50, 320, 50);
        drawLine(0, -50, 240, -50, -240);
        drawLine(0, 50, -240, 50, 240);
    }

    void whenKey1IsPressed()
    {
        if(player==1)
            drawCircle(0, -160, 120, 20);
        else
            drawStringCentered(0, "X", -160, 120);
        if(player==1)
            player=2;
        else
            player=1;
    }
}

Edit: Tommy told me that the game is called ‚Naughts and crosses‘

Erster Tag am Canterbury College

Seit Samstag befinde ich mich nun in England, genauer gesagt in Canterbury. Eben gerade fand die erste Stunde im College statt: Mathematik in pre-A-levels. Das Thema waren quadratische Gleichungen und verschiedene Moeglichkeiten, diese zu loesen.

Interessant ist vor allem, dass die Lehrer von den Schuelern mit ihrem Vornamen angesprochen werden. Eine schoene Sache, da es eine Kommunikation auf Augenhoehe ermoeglicht. Das Problem mit dem Siezen haben die Briten ja ohnehin nicht…