Skip to content

Commit

Permalink
Fixed Icon
Browse files Browse the repository at this point in the history
  • Loading branch information
INeido committed May 26, 2023
1 parent 999ee4d commit 648d450
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ A Conway's Game of Life implementation using numpy and pygame.

## Description

This project has no particular aim. It is a purely a personal project and barely maintained.
This project has no particular aim. It is a purely personal project and barely maintained.

It is a CLI based [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life): implementation using numpy for fast calculations and pygame for an interactive simulation.
It is a CLI based [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) implementation using numpy for fast calculations and pygame for an interactive simulation.

No Hashlife or Quicklife algorithm support (yet).

Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "CGOL"
version = "0.9.3"
version = "0.9.4"
description = "A whack Conway's Game of Life implementation."
readme = "README.md"
requires-python = ">=3"
Expand Down Expand Up @@ -35,4 +35,7 @@ Repository = "https://github.com/INeido/CGOL/"
Issues = "https://github.com/INeido/CGOL/issues"

[project.scripts]
cgol = "cgol.__main__:main"
cgol = "cgol.__main__:main"

[tool.setuptools.package-data]
cgol = ["icon.png"]
3 changes: 2 additions & 1 deletion src/cgol/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from .world import *
from .utils import *
from .parser import *
import pkg_resources
import pygame
import numpy

Expand Down Expand Up @@ -78,7 +79,7 @@ def setup_pygame(self, rw, rh) -> None:
"""
pygame.init()
pygame.display.set_caption("CGOL", "CGOL")
icon = pygame.image.load('src/img/icon.png')
icon = pygame.image.load(pkg_resources.resource_filename("cgol", "icon.png"))
pygame.display.set_icon(icon)
self.dis = pygame.display.set_mode((rw, rh), pygame.RESIZABLE, 8,)
self.clock = pygame.time.Clock()
Expand Down
Binary file added src/cgol/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/img/icon.png
Binary file not shown.

0 comments on commit 648d450

Please sign in to comment.