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()
            drawCircle(0, -160, 120, 20);
            drawStringCentered(0, "X", -160, 120);

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

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden /  Ändern )

Google Foto

Du kommentierst mit Deinem Google-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s