I changed the logo colours, since the colour blue just didn't look natural beside a "wooden" board. Current version:
Apart from that I did some actual development and introduced two dialog windows: One that allows you to choose the target game server and input your credentials. The other one pops up when you invite someone and specify the length of the match. Nothing too exciting.
Posts mit dem Label python werden angezeigt. Alle Posts anzeigen
Posts mit dem Label python werden angezeigt. Alle Posts anzeigen
Samstag, 30. Juni 2012
Sonntag, 27. Mai 2012
meowBG, a wxPython based backgammon client
A friend of mine is currently developing a backgammon server, and the idea of building a client was appealing, so I've started to expand my Python GUI programming knowledge a littler further and tried out wxPython.
A little background first: For reasons unknown to me, the name of the web server under development is "Tiger Gammon" (German site), and it's a nice alternative to FIBS, the First Internet Backgammon Server. Both servers communicate with clients over the telnet protocol, which seems odd at first. But when FIBS was born in 1992, that was probably the obvious choice. Tigergammon, on the other hand, strives to be a better FIBS, and thus uses telnet as well. So my client will have to follow that path.
In the meantime my wxPython client has grown pretty nice, but it's not ready for being shown off in public. But as of today, the client has its own splash screen, and I like it so much that I wanted to share it here. Since it's a client for tigergammon, I called it "meowBG", and when I found an old picture of our cat Alice sitting in a waste-paper basket, the logo just fell into place …
I ought to polish it a little more, but for my limited GIMP skills I guess that's as good as it gets. Should meowBG ever be released I may need a talented designer.
Posts about the client itself are soon to follow. Currently it looks like this ...
... which is not perfect but a decent start. Network play over either FIBS or tigergammon is already possible, but the user interface is still far from intuitive. Stay tuned!
Dienstag, 28. Juni 2011
An Ook! interpreter in Python
A recent geocache introduced me to an esoteric language named "Ook!", which was designed for Orang-Utans to communicate without arousing human suspicion.
It's pretty simple, as the language consists of only three syntax elements:
- Ook.
- Ook!
- Ook?
That's it. To make the language a little more powerful, elements are grouped into pairs, e.g. "Ook. Ook!" or "Ook? Ook.". So we have nine possible pairs and thus nine distinct commands, only eight of which are actually used ("Ook? Ook?" has been supplied with no deeper meaning ... maybe it's left for the Orang-Utan to express "WTF are you talking about?!").
When I felt an itch to implement an Ook! interpreter, I discovered that Ook! is all but identical to the well-known Brainfuck, since both languages have eight commands, and there exists a one-to-one mapping between them.
Furthermore, since Brainfuck is already a "minimal" language in that any command consists of one character only, I started off with the BF interpreter.
(Ok, to be totally honest, I started off implementing the Ook! interpreter, which eventually had bugs I wasn't able to track down anymore ... :) only then I realized what a stupid plan it was to begin with the Ook! part and started all over again, this time implementing the BF part first)
After finishing that, the remaining task was to implement a preprocessor which would turn an Ook! listing into a BF listing, and I was done.
If you're curious about the result, grab the code from github.
(It's my first project on github btw, and I absolutely recommend the github for mac application)
Abonnieren
Posts (Atom)



