The everyday blog of Richard Bartle.
RSS feeds: v0.91; v1.0 (RDF); v2.0; Atom.
Previous entry. Next entry.
8:11pm on Thursday, 3rd March, 2011:
I'm marking CE317 assignments at the moment. I gave them the task of writing a program to play Besikovitch's Game in Lua, which is actually not all that hard unless you want your program to try to win. As usual, these are full of amusing errors made by the students; unfortunately, they're only amusing if you understand programming. Thus, things like the following:
score1 = score1
won(cardsremaining) == true and "i won" or "you won"
are quite entertaining if you're a programmer, but if you're not...
[Note to programmers: won(cardsremaining) returns a Boolean value.]
One thing that all the assignments I've marked so far (and I've marked half of them) have done is ignore the specification. The way Besikovitch's Game works, the two players each pick a card to play and then show them simultaneously. For the game version, the program has to ask what I'm playing and tell me what it's playing, which it can't do simultaneously. One of the players therefore has to show their card first (ie. the program asks my card and then tells me its, or it tells me its card and asks me mine). I said I wanted it to be that the program told me the card it was playing before I told it what card I was playing. So far, every program has done it the other way round.
They clearly haven't tried to play the program against itself...
About this blog.
Copyright © 2011 Richard Bartle (email@example.com).