def init(_boardname=None): global player, game name = _boardname if _boardname is not None else 'pathfindingWorld_MultiPlayer4' game = Game('../Cartes/' + name + '.json', SpriteBuilder) game.O = Ontology( True, '../SpriteSheet-32x32/tiny_spritesheet_ontology.csv') game.populate_sprite_names(game.O) game.fps = 200 # frames per second game.mainiteration() game.mask.allow_overlaping_players = True
def init(n_players): global player, game # pathfindingWorld_MultiPlayer4 name = 'pathfinding' + f'{n_players}' + 'players' game = Game('../Cartes/' + name + '.json', SpriteBuilder) game.O = Ontology(True, '../SpriteSheet-32x32/tiny_spritesheet_ontology.csv') game.populate_sprite_names(game.O) game.fps = 20 # frames per second game.mainiteration() game.mask.allow_overlaping_players = True
import utils.glo as glo from coop.planner import CoopPlanner from coop.players import CoopPlayer from coop.tools import Node from utils.gameclass import Game, check_init_game_done from utils.ontology import Ontology from utils.players import Player from utils.sprite import MovingSprite from utils.spritebuilder import SpriteBuilder # ---- ---- ---- ---- ---- ---- # ---- Main ---- # ---- ---- ---- ---- ---- ---- game = Game() def init(n_players): global player, game # pathfindingWorld_MultiPlayer4 name = 'pathfinding' + f'{n_players}' + 'players' game = Game('../Cartes/' + name + '.json', SpriteBuilder) game.O = Ontology(True, '../SpriteSheet-32x32/tiny_spritesheet_ontology.csv') game.populate_sprite_names(game.O) game.fps = 20 # frames per second game.mainiteration() game.mask.allow_overlaping_players = True # player = game.player