From 0b4aa00ed8a7c2da407005fa738163aa7ddc6381 Mon Sep 17 00:00:00 2001
From: Alex Reinhardt <alexander.reinhardt@tu-dortmund.de>
Date: Sat, 21 Oct 2023 12:19:11 +0200
Subject: [PATCH] License, Changes to Package.json, Variables for Name and
 Password

---
 LICENSE.txt  | 5 +++++
 main.ts      | 8 ++++++--
 package.json | 7 +++++++
 3 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100644 LICENSE.txt

diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..0e77b64
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,5 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/main.ts b/main.ts
index d3babf6..1b2cc7e 100644
--- a/main.ts
+++ b/main.ts
@@ -1,12 +1,16 @@
 import {Socket} from 'bun'
 
+
+let name = 'Meow :3'
+let password = 'MeowMeow'
+
+
 let field: number[][] = []
 
 type Player = {name: string, x: number, y: number, self: boolean}
 let players: Map<number, Player> = new Map();
 let self = -1
 
-
 await Bun.connect({
     hostname: 'game.hackatron.de',
     port: 4000,
@@ -88,7 +92,7 @@ function command(socket: Socket, args: string[]) {
 
 function motd(socket: Socket, message: string) {
     console.info(`MOTD: ${message}`)
-    sendJoin(socket, 'Meow :3', 'MeowMeow')
+    sendJoin(socket, name, password)
 }
 
 function error(socket: Socket, error: string) {
diff --git a/package.json b/package.json
index b145231..a899475 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,13 @@
 {
   "name": "hackatron",
   "module": "main.ts",
+  "version": "1.0.0",
+  "author": "Alex Reinhardt",
+  "license": "MIT",
+  "main": "main.ts",
+  "scripts": {
+      "start": "bun run main.ts"
+  },
   "devDependencies": {
     "bun-types": "latest"
   },
-- 
GitLab