diff --git a/package.json b/package.json index 377ddae..75eeba5 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "netrisse", "description": "a network version of tetris for the console/terminal", "version": "2.0.0", - "main": "netrisse.js", + "main": "./src/netrisse.js", "bin": { - "netrisse": "./netrisse.js" + "netrisse": "./src/netrisse.js" }, "dependencies": { "mersenne-twister": "^1.1.0", diff --git a/algorithms.js b/src/algorithms.js similarity index 100% rename from algorithms.js rename to src/algorithms.js diff --git a/board.js b/src/board.js similarity index 99% rename from board.js rename to src/board.js index 312d217..aef90ba 100644 --- a/board.js +++ b/src/board.js @@ -1,5 +1,5 @@ -const { shapes } = require('./shapes'); -const Shape = require('./shape'); +const { shapes } = require('../shapes'); +const Shape = require('../shape'); const directions = require('./directions'); const Rando = require('./rando'); const { messageTypeEnum } = require('netrisse-lib'); diff --git a/client.js b/src/client.js similarity index 100% rename from client.js rename to src/client.js diff --git a/directions.js b/src/directions.js similarity index 100% rename from directions.js rename to src/directions.js diff --git a/game.js b/src/game.js similarity index 100% rename from game.js rename to src/game.js diff --git a/netrisse.js b/src/netrisse.js similarity index 96% rename from netrisse.js rename to src/netrisse.js index f0a2eb9..454cd7e 100644 --- a/netrisse.js +++ b/src/netrisse.js @@ -1,10 +1,10 @@ -const Board = require('./board'); +const Board = require('./src/board'); const Screen = require('./screen'); const Game = require('./game'); -const directions = require('./directions'); -const algorithms = require('./algorithms'); +const directions = require('./src/directions'); +const algorithms = require('./src/algorithms'); const MersenneTwister = require('mersenne-twister'); -const NetrisseClient = require('./client'); +const NetrisseClient = require('./src/client'); const { debug, messageTypeEnum } = require('netrisse-lib'); const withResolvers = require('promise.withresolvers'); diff --git a/pause.js b/src/pause.js similarity index 100% rename from pause.js rename to src/pause.js diff --git a/rando.js b/src/rando.js similarity index 100% rename from rando.js rename to src/rando.js diff --git a/screen.js b/src/screen.js similarity index 100% rename from screen.js rename to src/screen.js diff --git a/shape.js b/src/shape.js similarity index 99% rename from shape.js rename to src/shape.js index 25bc5fb..2bc2a4b 100644 --- a/shape.js +++ b/src/shape.js @@ -1,5 +1,5 @@ const { shapes } = require('./shapes'); -const directions = require('./directions'); +const directions = require('./src/directions'); const { messageTypeEnum } = require('netrisse-lib'); module.exports = class Shape { diff --git a/shapes.js b/src/shapes.js similarity index 100% rename from shapes.js rename to src/shapes.js diff --git a/test/algorithm-test.js b/test/algorithm-test.js index 936a3d3..0a6a91a 100644 --- a/test/algorithm-test.js +++ b/test/algorithm-test.js @@ -1,4 +1,4 @@ -const { easy, frustrationFree, random, tooEasy } = require('../algorithms'); +const { easy, frustrationFree, random, tooEasy } = require('../src/algorithms'); const MersenneTwister = require('mersenne-twister'); const seed = new MersenneTwister().random_int(); diff --git a/test/rando-test.js b/test/rando-test.js index 3d508a3..11b3e71 100644 --- a/test/rando-test.js +++ b/test/rando-test.js @@ -1,5 +1,5 @@ const MersenneTwister = require('mersenne-twister'); -const Rando = require('../rando'); +const Rando = require('../src/rando'); const assert = require('node:assert'); const seed = new MersenneTwister().random_int();