From 92f381be06651ca6aec8d93da799dc44a40e3eb0 Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Sat, 2 Apr 2022 12:17:31 -0500 Subject: [PATCH] add example game --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 6f6b8b3..8a5f35c 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,22 @@ ``` bash pip install git+https://github.com/WaylonWalker/pygame-starter ``` + +## Example Game + +You can make a quick game by inheriting from Game, and calling +`.run()`. This example just fills the screen with an aqua color, but +you can put all of your game logic in the `game` method. + +``` python +from pygame_starer import Game + +class MyGame(Game): + def game(self): + self.screen.fill((128, 255, 255)) + +if __name__ == "__main__": + game = MyGame() + game.run() + +```