jblog
toc

Random Resource Locator

2015-08-22, post № 57

programming, Python, #address, #com, #domain, #page, #pseudo random, #random, #rrl, #url, #web, #webpage, #webserver, #websize

I once heard that every domain containing three letters of the alphabet and ending with ‘.com’ was assigned to some web server. This would mean, all 𝟣𝟩𝟧𝟩𝟨 [1] domains were used.
To test it, I wrote this little Python program.

Usage

  • To use it, simply press enter to open a random page. Because you often will get redirected, the program will print out the url on the screen.
random-resource-locator-1.png
Source code: random-resource-locator.py

Jasteroids

2015-08-16, post № 56

games, programming, Pygame, Python, #asteroid, #asteroids, #black, #black and white, #comet, #missle, #random rocks, #rock, #rocket, #rocks, #space, #space craft, #space game, #space ship, #white

This game is my interpretation of the all-time classic arcade game Asteroids. Although it plays a little differently, it has all the components of the original game. The rocks are stationary, but — if destroyed — split into two smaller pieces. You can either destroy the rocks via missles or by just flying right into them.

Controls

  • Left arrow key tilts the space craft to the left,
  • Right arrow key tilts the space craft to the right,
  • Up arrow key propels the space craft,
  • ‘Space’ launches a missle.
jasteroids-1.png
jasteroids-3.png
jasteroids-4.png
Source code: jasteroids.py
Extra assets: jasteroids-2.png

Jonnect Jour

2015-08-15, post № 55

games, programming, Pygame, Python, #4, #connect, #connecting, #detection, #four, #four in a row, #game, #IV, #mouse control, #red, #win, #win detection, #yellow

After having programmed Jic-Jac-Joe — where you need to connect three pieces —, I now programmed Connect Four (four pieces).
This version — although it does not have a computer player — includes win detection.

Controls

  • Left-clicking puts your piece where the mouse cursor is positioned,
  • ‘Escape’ restarts the game.
jonnect-jour-1.png
jonnect-jour-3.png
jonnect-jour-5.png
Source code: jonnect-jour.py
Jonathan Frech's blog; built 2021/04/16 21:21:49 CEST