mirror of
https://github.com/csd4ni3l/game-of-life.git
synced 2026-01-01 04:23:42 +01:00
use numpy instead of bitmasks and get atleast 15x speedup, change default cols and rows to 128x96 for more space.
This commit is contained in:
@@ -3,11 +3,10 @@ from arcade.types import Color
|
||||
from arcade.gui.widgets.buttons import UITextureButtonStyle, UIFlatButtonStyle
|
||||
from arcade.gui.widgets.slider import UISliderStyle
|
||||
|
||||
COLS = 80
|
||||
ROWS = 60
|
||||
CELL_SIZE = 10
|
||||
SPACING = 2
|
||||
NEIGHBORS = [(-1, 0), (-1, 1), (-1, -1), (0, 1), (0, -1), (1, 0), (1, 1), (1, -1)]
|
||||
COLS = 128
|
||||
ROWS = 96
|
||||
CELL_SIZE = 6
|
||||
SPACING = 1.75
|
||||
|
||||
discord_presence_id = 1363780625928028200
|
||||
log_dir = 'logs'
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import arcade.gui, arcade
|
||||
from game.game_of_life import precompute_neighbor_masks
|
||||
|
||||
button_texture = arcade.gui.NinePatchTexture(64 // 4, 64 // 4, 64 // 4, 64 // 4, arcade.load_texture("assets/graphics/button.png"))
|
||||
button_hovered_texture = arcade.gui.NinePatchTexture(64 // 4, 64 // 4, 64 // 4, 64 // 4, arcade.load_texture("assets/graphics/button_hovered.png"))
|
||||
|
||||
create_sound = arcade.Sound("assets/sound/create.mp3")
|
||||
destroy_sound = arcade.Sound("assets/sound/destroy.mp3")
|
||||
theme_sound = arcade.Sound("assets/sound/music.mp3")
|
||||
|
||||
NEIGHBOUR_MASKS = precompute_neighbor_masks()
|
||||
theme_sound = arcade.Sound("assets/sound/music.mp3")
|
||||
Reference in New Issue
Block a user