From cae03e02954b88b1194fd386bd27591cea5d7e45 Mon Sep 17 00:00:00 2001 From: ctcpip Date: Sat, 1 Jun 2024 03:22:01 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20organize=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- algorithms.js => src/algorithms.js | 0 board.js => src/board.js | 4 ++-- client.js => src/client.js | 0 directions.js => src/directions.js | 0 game.js => src/game.js | 0 netrisse.js => src/netrisse.js | 8 ++++---- pause.js => src/pause.js | 0 rando.js => src/rando.js | 0 screen.js => src/screen.js | 0 shape.js => src/shape.js | 2 +- shapes.js => src/shapes.js | 0 test/algorithm-test.js | 2 +- test/rando-test.js | 2 +- 14 files changed, 11 insertions(+), 11 deletions(-) rename algorithms.js => src/algorithms.js (100%) rename board.js => src/board.js (99%) rename client.js => src/client.js (100%) rename directions.js => src/directions.js (100%) rename game.js => src/game.js (100%) rename netrisse.js => src/netrisse.js (96%) rename pause.js => src/pause.js (100%) rename rando.js => src/rando.js (100%) rename screen.js => src/screen.js (100%) rename shape.js => src/shape.js (99%) rename shapes.js => src/shapes.js (100%) 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();