Skip to content
Snippets Groups Projects
Verified Commit 0b4aa00e authored by Alex Reinhardt's avatar Alex Reinhardt
Browse files

License, Changes to Package.json, Variables for Name and Password

parent 00a9aed8
No related branches found
No related tags found
No related merge requests found
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.
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) {
......
{
"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"
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment