# Pygame snippets and random code
This repository contains several Pygame games. Some of them are
useful to reuse and to extend, other are just text snippets with test
code.

## Games
In this section, all the games are [listed](#index) and described. For
instructions on how to run the games, read the
[`src/README.md`](http://notabug.org/jorgesumle/pygame_stuff/src/master/src/README.md)
file.

### Index
1. [Empty window](#empty-window)
2. [Full screen](#full-screen)
3. [Transparent rectangle](#transparent-rectangle)
4. [Cat animation](#cat-animation)
5. [Jumping square](#jumping-square)
6. [Bullet dodger](#bullet-dodger)
7. [Repeating background](#repeating-background)

### Empty window
Just a base Pygame window. It has an icon and a title, but it's empty.

![Empty window](https://notabug.org/jorgesumle/pygame_stuff/raw/master/snapshots/empty_window.png)

### Full screen
A game in which you can toggle between normal and full screen mode
pressing F11. The hardest part of the game comes when you're in full
screen mode. You must exit this mode pressing the Escape button.

![Fullscreen (normal mode)](https://notabug.org/jorgesumle/pygame_stuff/raw/master/snapshots/full_screen-%28normal_mode%29.png)
![Fullscreen (fullscreen mode)](https://notabug.org/jorgesumle/pygame_stuff/raw/master/snapshots/full_screen-%28full_screen_%20mode%29.png)

### Transparent rectangle
Just a transparent rectangle. There is some text behind it.

![A transparent background made with Pygame](https://notabug.org/jorgesumle/pygame_stuff/raw/master/snapshots/transparent_rectangle.png)

### Cat animation
A walking cat. It never stops.

![A walking cat](https://notabug.org/jorgesumle/pygame_stuff/raw/master/snapshots/cat_animation.gif)

### Jumping square
A square that jumps when you press the up arrow key (UP).

![A square that jumps](https://notabug.org/jorgesumle/pygame_stuff/raw/master/snapshots/jumping_square.gif)

### Bullet dodger
A fun and challenging mouse game where you must dodge bullets. How many points will you get?

![Bullet dodger](https://notabug.org/jorgesumle/pygame_stuff/raw/master/snapshots/bullet_dodger.png)

### Repeating background
This code creates a background with a image smaller than the window's
resolution. It works by repeating the image until the background is
filled.

![Repeating background](https://notabug.org/jorgesumle/pygame_stuff/raw/master/snapshots/repeating_background.png)
