Porównaj commity

...

2 commits

Autor SHA1 Wiadomość Data
nbillard
0788e071b2 res directory for images (maybe other things in the future) 2022-12-01 06:37:38 +01:00
nbillard
e93225377f updated README.md and created res directory 2022-12-01 06:36:38 +01:00
7 zmienionych plików z 29 dodań i 14 usunięć

Wyświetl plik

@ -1,3 +1,18 @@
# Sokoban
projet Web 3Mic
pour ouvrir le projet, tapez la commande suivante dans un terminal:
``` sh
npx serve
```
si cela ne marche pas, essayez
``` sh
python3 -m http.server
```
Puis allez à l'addresse indiquée par npx (ou http://0.0.0.0:8000 pour __python__)

Wyświetl plik

@ -1,4 +1,4 @@
import { Square } from './enums.mjs';
import { Square } from '/modules/enums.mjs';
// Blueprint for the first level
export const level1Blueprint = [[ Square.Wall, Square.Wall, Square.Wall, Square.Wall, Square.Wall, Square.Wall ],

Wyświetl plik

@ -1,6 +1,6 @@
import { Square, CanMove, MoveDirection } from './enums.mjs'
import { Position, copyPosition } from './position.mjs'
import { ForegroundTile, BackgroundTile } from './tiles.mjs'
import { Square, CanMove, MoveDirection } from '/modules/enums.mjs'
import { Position, copyPosition } from '/modules/position.mjs'
import { ForegroundTile, BackgroundTile } from '/modules/tiles.mjs'
// define where the player can move
// generate a level Object from a blueprint

Wyświetl plik

@ -1,8 +1,8 @@
export const images = {
wall: 'wall.png',
floor: 'floor.png',
player: 'mario.png',
box: 'box.png',
destination: 'destination.png',
empty: 'empty.png',
wall: '/res/wall.png',
floor: '/res/floor.png',
player: '/res/mario.png',
box: '/res/box.png',
destination: '/res/destination.png',
empty: '/res/empty.png',
};

Wyświetl plik

@ -1,5 +1,5 @@
import { images } from './ressources.mjs';
import { CanMove, Square } from './enums.mjs';
import { images } from '/modules/ressources.mjs';
import { CanMove, Square } from '/modules/enums.mjs';
class Tile {
constructor(x, y, width, height) {

Wyświetl plik

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 263 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 263 KiB

Wyświetl plik

@ -1,5 +1,5 @@
import { generatePlayground } from './modules/playground.mjs'
import { level1Blueprint } from './modules/levels.mjs'
import { generatePlayground } from '/modules/playground.mjs'
import { level1Blueprint } from '/modules/levels.mjs'
let canvas = document.getElementById('canvas');
let ctx = canvas.getContext('2d');